]> git.openstreetmap.org Git - rails.git/blob - app/views/old_elements/_actions.html.erb
Move element and history links to breadcrumbs
[rails.git] / app / views / old_elements / _actions.html.erb
1 <div class='secondary-actions mb-3'>
2   <% if !@feature.redacted? %>
3     <%= link_to t("browse.download_xml"), send(:"api_#{@type}_version_path", *@feature.id) %>
4   <% elsif current_user&.moderator? %>
5     <% if !params[:show_redactions] %>
6       <%= link_to t(".view_redacted_data"), :params => { :show_redactions => true } %>
7     <% else %>
8       <%= link_to t(".view_redaction_message") %>
9     <% end %>
10   <% end %>
11 </div>
12
13 <nav>
14   <ol class="breadcrumb mb-1">
15     <li class="breadcrumb-item">
16       <%= link_to t(@type, :scope => "browse.versions_navigation"), @current_feature %>
17     </li>
18     <li class="breadcrumb-item">
19       <%= link_to t("browse.versions_navigation.history"), :action => :index %>
20     </li>
21   </ol>
22 </nav>
23
24 <div class='secondary-actions'>
25   <% if @feature.version > 1 %>
26     <%= link_to({ :version => @feature.version - 1 }, { :class => "icon-link" }) do %>
27       <%= previous_page_svg_tag :height => 11 %>
28       <%= "#{t('browse.version')} ##{@feature.version - 1}" %>
29     <% end %>
30   <% end %>
31   <% if @feature.version > 1 && !@feature.latest_version? %>
32     &middot;
33   <% end %>
34   <% unless @feature.latest_version? %>
35     <%= link_to({ :version => @feature.version + 1 }, { :class => "icon-link" }) do %>
36       <%= "#{t('browse.version')} ##{@feature.version + 1}" %>
37       <%= next_page_svg_tag :height => 11 %>
38     <% end %>
39   <% end %>
40 </div>