]> git.openstreetmap.org Git - rails.git/blob - app/views/issues/show.html.erb
Merge remote-tracking branch 'upstream/pull/4705'
[rails.git] / app / views / issues / show.html.erb
1 <% content_for :heading do %>
2 <h1><%= t ".title", :status => @issue.status.humanize, :issue_id => @issue.id %></h1>
3 <p><%= @issue.reportable.model_name.human %> : <%= link_to reportable_title(@issue.reportable), reportable_url(@issue.reportable) %></p>
4 <p class="text-muted">
5   <small>
6     <%= @issue.assigned_role %>
7     <% if @issue.reports.count > 0 %>
8       | <%= t ".reports", :count => @issue.reports.count %>
9     <% else %>
10       | <%= t ".no_reports" %>
11     <% end %>
12       | <%= t ".report_created_at_html",
13               :datetime => tag.time(l(@issue.created_at.to_datetime, :format => :friendly),
14                                     :datetime => @issue.created_at.xmlschema) %>
15     <% if @issue.resolved_at? %>
16       | <%= t ".last_resolved_at_html",
17               :datetime => tag.time(l(@issue.resolved_at.to_datetime, :format => :friendly),
18                                     :datetime => @issue.resolved_at.xmlschema) %>
19     <% end %>
20     <% if @issue.user_updated %>
21       | <%= t ".last_updated_at_html",
22               :datetime => tag.time(l(@issue.updated_at.to_datetime, :format => :friendly),
23                                     :datetime => @issue.updated_at.xmlschema),
24               :displayname => link_to(@issue.user_updated.display_name, @issue.user_updated) %>
25     <% end %>
26   </small>
27 </p>
28 <nav class="secondary-actions">
29   <ul class="clearfix">
30     <% if @issue.may_resolve? %>
31       <li><%= link_to t(".resolve"), resolve_issue_url(@issue), :method => :post %></li>
32     <% end %>
33     <% if @issue.may_ignore? %>
34       <li><%= link_to t(".ignore"), ignore_issue_url(@issue), :method => :post %></li>
35     <% end %>
36     <% if @issue.may_reopen? %>
37       <li><%= link_to t(".reopen"), reopen_issue_url(@issue), :method => :post %></li>
38     <% end %>
39   </ul>
40 </nav>
41 <% end %>
42
43 <div class="row">
44   <div class="col-md-8">
45     <h3><%= t ".reports_of_this_issue" %></h3>
46
47     <% if @read_reports.present? %>
48     <div class="bg-body-tertiary text-muted">
49       <h4><%= t ".read_reports" %></h4>
50       <%= render "reports", :reports => @read_reports %>
51     </div>
52     <% end %>
53
54     <% if @unread_reports.any? %>
55     <div>
56       <h4><%= t ".new_reports" %></h4>
57       <%= render "reports", :reports => @unread_reports %>
58     </div>
59     <% end %>
60   </div>
61
62   <% if @issue.reported_user %>
63     <div class="col-md-4">
64       <h3><%= t ".other_issues_against_this_user" %></h3>
65       <% if @related_issues.count > 1 %>
66         <ul>
67           <% @related_issues.each do |issue| %>
68             <% if issue.id != @issue.id %>
69               <li><%= link_to reportable_title(issue.reportable), issue %></li>
70             <% end %>
71           <% end %>
72         </ul>
73       <% else %>
74         <p><%= t ".no_other_issues" %></p>
75       <% end %>
76     </div>
77   <% end %>
78 </div>
79
80 <h3><%= t ".comments_on_this_issue" %></h3>
81 <%= render "comments", :comments => @comments %>