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