-<% set_title(t("browse.#{@type}.history_title", :name => printable_name(@feature))) %>
+<% set_title(t("browse.#{@type}.history_title_html", :name => printable_element_name(@feature))) %>
-<h2>
- <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
- <%= raw t("browse.#{@type}.history_title", :name => printable_name(@feature)) %>
-</h2>
+<%= render "sidebar_header", :title => t("browse.#{@type}.history_title_html", :name => printable_element_name(@feature)) %>
-<%= render :partial => @type, :collection => @feature.send("old_#{@type}s").reverse %>
+<%= render :partial => "browse/#{@type}", :collection => @feature.send(:"old_#{@type}s").reverse %>
<div class='secondary-actions'>
- <%= link_to(t("browse.download_xml"), :controller => "api/old_#{@type.pluralize}", :action => "history") %>
+ <%= link_to t("browse.download_xml"), :controller => "api/old_#{@type.pluralize}", :action => "history" %>
·
- <%= link_to(t("browse.view_details"), :action => @type) %>
+ <%= link_to t("browse.view_details"), :controller => @type.pluralize, :action => :show %>
+ <% if params[:show_redactions] %>
+ ·
+ <%= link_to t("browse.view_history") %>
+ <% elsif current_user&.moderator? %>
+ ·
+ <%= link_to t("browse.view_unredacted_history"), :params => { :show_redactions => true } %>
+ <% end %>
</div>