]> git.openstreetmap.org Git - rails.git/blob - app/views/issues/show.html.erb
732fd2ef2a114c9ac50e1378772e196e99aa313e
[rails.git] / app / views / issues / show.html.erb
1 <% content_for :heading do %>
2 <h2><%= t ".title", :status => @issue.status.humanize, :issue_id => @issue.id %></h2>
3 <p><%= @issue.reportable.model_name.human %> : <%= link_to reportable_title(@issue.reportable), reportable_url(@issue.reportable) %></p>
4 <p class="deemphasize">
5   <small>
6     <%= @issue.assigned_role %>
7     | <%= t ".reports", :count => @issue.reports.count %>
8     | <%= t ".report_created_at", :datetime => l(@issue.created_at.to_datetime, :format => :friendly) %>
9     <%= " | " + t(".last_resolved_at", :datetime => l(@issue.resolved_at.to_datetime, :format =>:friendly)) if @issue.resolved_at? %>
10     <%= " | " + t(".last_updated_at", :datetime => l(@issue.updated_at.to_datetime, :format => :friendly), :displayname => @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><%= t ".reports_of_this_issue" %></h3>
26
27     <% if @read_reports.present? %>
28     <div class="read-reports">
29       <h4><%= t ".read_reports" %></h4>
30       <%= render 'reports', reports: @read_reports %>
31     </div>
32     <% end %>
33
34     <% if @unread_reports.any? %>
35     <div class="unread-reports">
36       <h4><%= t ".new_reports" %></h4>
37       <%= render 'reports', reports: @unread_reports %>
38     </div>
39     <% end %>
40     <br/>
41   </div>
42
43   <% if @issue.reported_user %>
44     <div class="related-block">
45       <h3><%= t ".other_issues_against_this_user" %></h3>
46       <div class="unread-reports">
47         <% if @related_issues.count > 1 %>
48           <% @related_issues.each do |issue| %>
49             <% if issue.id != @issue.id %>
50               <%= link_to reportable_title(issue.reportable), issue %> <br/>
51             <% end %>
52           <% end %>
53         <% else %>
54           <p><%= t ".no_other_issues" %></p>
55         <% end %>
56       </div>
57     </div>
58   <% end %>
59 </div>
60
61 <h3><%= t ".comments_on_this_issue" %></h3>
62 <div class="unread-reports">
63   <%= render 'comments', comments: @comments %>
64 </div>