]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/old_ways/show.html.erb
Add links to reveal/hide redacted version data
[rails.git] / app / views / old_ways / show.html.erb
index b16c6b291cdce8ea1dd828b4c96ddc9c7eedcff6..ecbc6246933c69bd612d076c757f3e8c13e0e815 100644 (file)
@@ -5,11 +5,18 @@
 <%= render :partial => "browse/way", :object => @feature %>
 
 <div class='secondary-actions'>
 <%= render :partial => "browse/way", :object => @feature %>
 
 <div class='secondary-actions'>
-  <% unless @feature.redacted? %>
+  <%= link_to t("browse.view_details"), way_path(@feature.way_id) %>
+  <% if !@feature.redacted? %>
+    &middot;
     <%= link_to t("browse.download_xml"), way_version_path(*@feature.id) %>
     <%= link_to t("browse.download_xml"), way_version_path(*@feature.id) %>
+  <% elsif current_user&.moderator? %>
     &middot;
     &middot;
+    <% if !params[:show_redactions] %>
+      <%= link_to t("browse.view_redacted_data"), old_way_path(*@feature.id, :params => { :show_redactions => true }) %>
+    <% else %>
+      <%= link_to t("browse.view_redaction_message"), old_way_path(*@feature.id) %>
+    <% end %>
   <% end %>
   <% end %>
-  <%= link_to t("browse.view_details"), way_path(@feature.way_id) %>
 </div>
 
 <div class='secondary-actions'>
 </div>
 
 <div class='secondary-actions'>