]> git.openstreetmap.org Git - rails.git/blob - app/views/issues/show.html.erb
Call paging heading helpers from partial
[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", :datetime => l(@issue.created_at.to_datetime, :format => :friendly) %>
13     <%= " | #{t('.last_resolved_at', :datetime => l(@issue.resolved_at.to_datetime, :format => :friendly))}" if @issue.resolved_at? %>
14     <%= " | #{t('.last_updated_at', :datetime => l(@issue.updated_at.to_datetime, :format => :friendly), :displayname => @issue.user_updated.display_name)}" if @issue.user_updated %>
15   </small>
16 </p>
17 <nav class="secondary-actions">
18   <ul class="clearfix">
19     <% if @issue.may_resolve? %>
20       <li><%= link_to t(".resolve"), resolve_issue_url(@issue), :method => :post %></li>
21     <% end %>
22     <% if @issue.may_ignore? %>
23       <li><%= link_to t(".ignore"), ignore_issue_url(@issue), :method => :post %></li>
24     <% end %>
25     <% if @issue.may_reopen? %>
26       <li><%= link_to t(".reopen"), reopen_issue_url(@issue), :method => :post %></li>
27     <% end %>
28   </ul>
29 </nav>
30 <% end %>
31
32 <div class="row">
33   <div class="col-md-8">
34     <h3><%= t ".reports_of_this_issue" %></h3>
35
36     <% if @read_reports.present? %>
37     <div class="bg-light text-muted">
38       <h4><%= t ".read_reports" %></h4>
39       <%= render "reports", :reports => @read_reports %>
40     </div>
41     <% end %>
42
43     <% if @unread_reports.any? %>
44     <div>
45       <h4><%= t ".new_reports" %></h4>
46       <%= render "reports", :reports => @unread_reports %>
47     </div>
48     <% end %>
49   </div>
50
51   <% if @issue.reported_user %>
52     <div class="col-md-4">
53       <h3><%= t ".other_issues_against_this_user" %></h3>
54       <% if @related_issues.count > 1 %>
55         <ul>
56           <% @related_issues.each do |issue| %>
57             <% if issue.id != @issue.id %>
58               <li><%= link_to reportable_title(issue.reportable), issue %></li>
59             <% end %>
60           <% end %>
61         </ul>
62       <% else %>
63         <p><%= t ".no_other_issues" %></p>
64       <% end %>
65     </div>
66   <% end %>
67 </div>
68
69 <h3><%= t ".comments_on_this_issue" %></h3>
70 <%= render "comments", :comments => @comments %>