Added IssueComments + ForeignKeys + Indexes
[rails.git] / app / views / issues / show.html.erb
1 <% content_for :heading do %>
2         <h2> Issue #<%= @issue.id %> <br/> <span class="count-number">Status: <strong><%= @issue. status %></strong></span></h2>
3         <p>Issue against: <%= reportable_url(@issue.reportable) %></p>
4         <p>Issue type: <%= @issue.reportable_type %></p>
5         <p class="deemphasize">
6                 <small>
7                         <%= @issue.reports.count %> reports | First reported: <%= l @issue.created_at.to_date, :format => :long %> | <%= "Last resolved at #{l(@issue.resolved_at.to_datetime, :format =>:long)}" if @issue.resolved? %>
8                 </small>
9         </p>
10         <p><%= link_to "Resolve", resolve_issue_url(@issue), :method => :post if @issue.may_resolve? %></p>
11         <p><%= link_to "Ignore", ignore_issue_url(@issue), :method => :post if @issue.may_ignore? %></p>
12         <p><%= link_to "Reopen", reopen_issue_url(@issue), :method => :post if @issue.may_reopen? %></p>
13 <% end %>
14 <h3>Reports under this issue:</h3>
15
16 <% if @read_reports.present? %>
17         <div class="read-reports">
18                 <h4>Read Reports:</h4>
19                 <%= render 'reports',reports: @read_reports %>
20         </div>
21 <% end %>       
22
23 <% if @unread_reports.any? %>
24         <div class="unread-reports">
25                 <h4>New Reports:</h4>
26                 <%= render 'reports',reports: @unread_reports %>
27         </div>
28 <% end %>       
29 <br/>
30 <h3>Comments on this issue:</h3>
31         <div class="unread-reports">
32                 <%= render 'comments', comments: @comments %>
33         </div>