]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/browse/feature.html.erb
Merge remote-tracking branch 'upstream/pull/4480'
[rails.git] / app / views / browse / feature.html.erb
index 38657f4d1fb8f976868bb375b94e0feb206b7088..3b7c64a8db6caa359e956b947b0c70b913573105 100644 (file)
@@ -1,14 +1,22 @@
-<% set_title(t("browse.#{@type}.title", :name => printable_name(@feature))) %>
+<% set_title(t("browse.#{@type}.title_html", :name => printable_name(@feature))) %>
 
-<h2>
-  <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-  <%= raw t("browse.#{@type}.title", :name => printable_name(@feature)) %>
-</h2>
+<%= render "sidebar_header", :title => t("browse.#{@type}.title_html", :name => printable_name(@feature)) %>
 
 <%= render :partial => @type, :object => @feature %>
 
+<% if @feature.visible? %>
+  <div class='secondary-actions'>
+    <%= link_to(t("browse.download_xml"), :controller => "api/#{@type.pluralize}", :action => :show) %>
+  </div>
+<% end %>
 <div class='secondary-actions'>
-  <%= link_to(t('browse.download_xml'), :controller => @type, :action => "read") %>
-  &middot;
-  <%= link_to(t('browse.view_history'), :action => "#{@type}_history") %>
+  <% if @feature.version > 1 %>
+    <%= link_to "<< #{t('browse.version')} #1", :controller => "old_#{@type.pluralize}", :action => :show, :version => 1 %>
+    &middot;
+  <% end %>
+    <%= link_to t("browse.view_history"), :action => "#{@type}_history" %>
+  <% if @feature.version > 1 %>
+    &middot;
+    <%= link_to "#{t('browse.version')} ##{@feature.version} >>", :controller => "old_#{@type.pluralize}", :action => :show, :version => @feature.version %>
+  <% end %>
 </div>