]> git.openstreetmap.org Git - rails.git/blob - app/views/traces/_trace.html.erb
Create base and head branches before running danger
[rails.git] / app / views / traces / _trace.html.erb
1 <tr>
2   <td>
3     <% if Settings.status != "gpx_offline" %>
4       <% if trace.inserted %>
5         <%= link_to trace_icon(trace),
6                     show_trace_path(trace.user, trace),
7                     :class => "d-inline-block" %>
8       <% else %>
9         <span class="text-danger"><%= t ".pending" %></span>
10       <% end %>
11     <% end %>
12   </td>
13   <td>
14     <ul class="list-inline mb-0">
15       <li class="list-inline-item">
16         <%= link_to trace.name, show_trace_path(trace.user, trace) %>
17       </li>
18
19       <% if trace.inserted? %>
20         <li class="list-inline-item">
21           <%= t ".count_points", :count => trace.size %>
22         </li>
23       <% end %>
24
25       <li class="list-inline-item">
26         <% badge_class = case trace.visibility
27                          when "public", "identifiable" then "success"
28                          else "danger"
29                          end %>
30         <span class="badge bg-<%= badge_class %> text-white"><%= t(".#{trace.visibility}") %></span>
31       </li>
32     </ul>
33     <p class="text-body-secondary mb-0">
34       <% if trace.tags.empty? %>
35         <%= t ".details_without_tags_html", :time_ago => friendly_date_ago(trace.timestamp),
36                                             :user => link_to(trace.user.display_name, trace.user) %>
37       <% else %>
38         <%= t ".details_with_tags_html", :time_ago => friendly_date_ago(trace.timestamp),
39                                          :user => link_to(trace.user.display_name, trace.user),
40                                          :tags => safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %>
41       <% end %>
42     </p>
43     <p class="fs-6 mb-0">
44       <%= trace.description %>
45     </p>
46   </td>
47   <td>
48     <% if trace.inserted? %>
49       <nav class="secondary-actions">
50         <ul>
51           <li>
52             <%= link_to t(".view_map"), root_path(:mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}") %>
53           </li>
54           <li>
55             <%= link_to t(".edit_map"), edit_path(:gpx => trace.id) %>
56           </li>
57         </ul>
58       </nav>
59     <% end %>
60   </td>
61 </tr>