]> git.openstreetmap.org Git - rails.git/blob - app/views/issues/show.html.erb
51e179da1de3770179ad6fa870d65fdb44f212d8
[rails.git] / app / views / issues / show.html.erb
1 <% content_for :heading do %>
2         <h2> <%= @issue.status.humanize %> Issue #<%= @issue.id %> <br/></h2>
3         <p><%= @issue.reportable_type %> : <%= reportable_url(@issue.reportable) %></p>
4         <p class="deemphasize">
5                 <small>
6                         <%= @issue.reports.count %> reports | First reported: <%= l @issue.created_at.to_datetime, :format => :friendly %>  <%= "| Last resolved at #{l(@issue.resolved_at.to_datetime, :format =>:friendly)}" if @issue.resolved_at? %> <%= "| Last updated at #{l(@issue.updated_at.to_datetime, :format => :friendly)} by #{@updated_by_admin.display_name}" if @updated_by_admin %>
7                 </small>
8         </p>
9         <p>
10                 <%= link_to t('issues.resolve'), resolve_issue_url(@issue), :method => :post if @issue.may_resolve? %>
11                 <% if @issue.may_ignore? %>
12                         | <%= link_to t('issues.ignore'), ignore_issue_url(@issue), :method => :post %>
13                 <% end %>
14         </p>
15         <p><%= link_to t('issues.reopen'), reopen_issue_url(@issue), :method => :post if @issue.may_reopen? %></p>
16 <% end %>
17
18 <div class="report-related-block">
19
20         <div class="report-block">
21                 <h3>Reports under this issue:</h3>
22
23                 <% if @read_reports.present? %>
24                         <div class="read-reports">
25                                 <h4>Read Reports:</h4>
26                                 <br/>
27                                 <%= render 'reports',reports: @read_reports %>
28                         </div>
29                 <% end %>       
30
31                 <% if @unread_reports.any? %>
32                         <div class="unread-reports">
33                                 <h4>New Reports:</h4>
34                                 <br/>
35                                 <%= render 'reports',reports: @unread_reports %>
36                         </div>
37                 <% end %>       
38                 <br/>
39         </div>
40
41         <div class="related-block">
42                 <h3> Other issues against this user: </h3>
43                         <div class="unread-reports">
44                                 <% if @related_issues.count > 1 %>
45                                         <% @related_issues.each do |issue| %>
46                                                 <% if issue.id != @issue.id %>
47                                                         <%= reports_url(issue) %> <br/>
48                                                 <% end %>
49                                         <% end %>
50                                 <% else %>
51                                         <p>No other reports against this user!</p>
52                                 <% end %>
53                         </div>
54         </div>
55
56 </div>
57
58 <h3>Comments on this issue:</h3>
59         <div class="unread-reports">
60                 <%= render 'comments', comments: @comments %>
61         </div>
62