blob: 2ae02eac87a94b2d596f89b4196bae9c79218062 [file] [log] [blame]
<% @heading = "Difference Analysis: #{@difference_analysis.title}" %>
<% @overview = "From #{link_to_baseline(@baseline_from, nil)} to #{link_to_baseline(@baseline, nil)}" %>
<p>
<% if cadmin? %>
<div id="menu">
<%= link_to 'delete', :action => 'destroy', :id => @difference_analysis %>
| <%= link_to 'analyze now', :action => 'analyze_now', :id => @difference_analysis %>
</div>
<% end %>
</p>
<%= tabs([["All", url_for(:action => 'show', :id => @difference_analysis.id), params[:action] == "show"],
["Changed", url_for(:action=> 'showchanged', :id => @difference_analysis.id), params[:action] == "showchanged"],
["HTML Changed", url_for(:action=> 'showhtmlchanged', :id => @difference_analysis.id), params[:action] == "showhtmlchanged"],
["New", url_for(:action=>'shownew', :id => @difference_analysis.id),params[:action] == "shownew"],
["Removed", url_for(:action=>'showremoved', :id => @difference_analysis.id),params[:action] == "showremoved"]], 70) %>
<br>
<%= links_to_pages(@difference_analysis_item_pages) if @difference_analysis_item_pages %>
<div class="sectionHeading">Item</div>
<div class="sectionContent">
<table cellpadding="0" cellspacing="0" border="0" class="sectionTable">
<tr>
<td class="sectionTableCell">
<table width="100%">
<tr>
<th>ID</th>
<th>From Page</th>
<th>To Page</th>
<th>Result</th>
<th>Action</th>
</tr>
<% for diff_item in @difference_analysis_items %>
<tr>
<td><%= diff_item.id %></td>
<td><%= link_to_page(@site_from, diff_item.page) if diff_item.result != "NEW" %></td>
<td><%= link_to_page(@site, diff_item.page) if diff_item.result != "REMOVED" && @site %></td>
<td><%= diff_item.result %></td>
<td><%= link_to("Show Changes", :controller => 'difference_analyses', :action => 'show_item', :item_id => diff_item.id ) if diff_item.result == "CHANGED" %>
<%= link_to("Show Changes", :controller => 'difference_analyses', :action => 'show_item', :item_id => diff_item.id, :tab => "html" ) if diff_item.result == "HTMLCHANGED" %>
</td>
</tr>
<% end %>
</table>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Properties</div>
<div class="sectionContent">
<table cellpadding="0" cellspacing="0" border="0" class="sectionTable">
<tr valign="top">
<th scope="row" class="sectionTableHeading">From</th>
<td align="left" class="sectionTableCell"><%= link_to_site(@site_from) %> (<%= link_to_baseline(@difference_analysis.baseline_from, nil) %>)</td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">To</th>
<td align="left" class="sectionTableCell"><%= link_to_site(@site) %> (<%= link_to_baseline(@difference_analysis.baseline, nil) %>)</td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">Created</th>
<td align="left" class="sectionTableCell"><%= @difference_analysis.created_on.strftime("%I:%M %p %d-%b-%y")%></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">New</th>
<td align="left" class="sectionTableCell"><%= DifferenceAnalysisItem.count(["difference_analysis_id = ? and result=?", @difference_analysis.id, "NEW"]) %></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">Removed</th>
<td align="left" class="sectionTableCell"><%= DifferenceAnalysisItem.count(["difference_analysis_id = ? and result=?", @difference_analysis.id, "REMOVED"]) %></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">Changed</th>
<td align="left" class="sectionTableCell"><%= DifferenceAnalysisItem.count(["difference_analysis_id = ? and result=?", @difference_analysis.id, "CHANGED"]) %></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">HTML Changed</th>
<td align="left" class="sectionTableCell"><%= DifferenceAnalysisItem.count(["difference_analysis_id = ? and result=?", @difference_analysis.id, "HTMLCHANGED"]) %></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">Equal</th>
<td align="left" class="sectionTableCell"><%= DifferenceAnalysisItem.count(["difference_analysis_id = ? and result=?", @difference_analysis.id, "EQUAL"]) %></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">Created On</th>
<td align="left" class="sectionTableCell"><%= @difference_analysis.created_on.strftime("%I:%M %p %d-%b-%y") %></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">Updated On</th>
<td align="left" class="sectionTableCell"><%= @difference_analysis.updated_on.strftime("%I:%M %p %d-%b-%y") if @difference_analysis.updated_on %></td>
</tr>
<tr valign="top">
<th scope="row" class="sectionTableHeading">Analyzed On</th>
<td align="left" class="sectionTableCell"><%= @difference_analysis.analyzed_on.strftime("%I:%M %p %d-%b-%y") if @difference_analysis.analyzed_on %></td>
</tr>
</table>
</div>