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