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