]> git.openstreetmap.org Git - rails.git/blob - app/views/issues/_page.html.erb
Drop support for OAuth 1
[rails.git] / app / views / issues / _page.html.erb
1 <turbo-frame id="pagination" target="_top">
2   <% if @issues.length == 0 %>
3     <% if params[:search_by_user].present? && !@find_user %>
4       <p><%= t ".user_not_found" %></p>
5     <% else %>
6       <p><%= t ".issues_not_found" %></p>
7     <% end %>
8   <% else %>
9     <table class="table table-sm">
10       <thead>
11         <tr>
12           <th><%= t ".status" %></th>
13           <th><%= t ".reports" %></th>
14           <th><%= t ".reported_item" %></th>
15           <th><%= t ".reported_user" %></th>
16           <th><%= t ".last_updated" %></th>
17         </tr>
18       </thead>
19       <tbody>
20         <% @issues.each do |issue| %>
21           <tr>
22             <td><%= t ".states.#{issue.status}" %></td>
23             <td class="text-nowrap"><%= link_to t(".reports_count", :count => issue.reports_count), issue %></td>
24             <td><%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %></td>
25             <td><%= link_to issue.reported_user.display_name, issue.reported_user if issue.reported_user %></td>
26             <td>
27               <% if issue.user_updated %>
28                 <%= t ".last_updated_time_ago_user_html", :user => link_to(issue.user_updated.display_name, issue.user_updated),
29                                                           :time_ago => friendly_date_ago(issue.updated_at) %>
30               <% else %>
31                 <%= friendly_date_ago(issue.updated_at) %>
32               <% end %>
33             </td>
34           </tr>
35         <% end %>
36       </tbody>
37     </table>
38     <%= render "shared/pagination",
39                :newer_key => "issues.page.newer_issues",
40                :older_key => "issues.page.older_issues",
41                :newer_id => @newer_issues_id,
42                :older_id => @older_issues_id %>
43   <% end %>
44 </turbo-frame>