X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ecd81eadbec57582749bb246d74e32ecab74d1d6..2398614349e3ff5605868fea82e013d2a9a16ef9:/app/views/diary_entries/_diary_entry.html.erb?ds=sidebyside diff --git a/app/views/diary_entries/_diary_entry.html.erb b/app/views/diary_entries/_diary_entry.html.erb index fc1cca66e..c7dbec386 100644 --- a/app/views/diary_entries/_diary_entry.html.erb +++ b/app/views/diary_entries/_diary_entry.html.erb @@ -1,4 +1,4 @@ -
+
<% if !@user %> <%= user_thumbnail diary_entry.user %> @@ -37,9 +37,13 @@ <% end %> - <% if current_user && current_user.administrator? %> + <% if can? :hide, DiaryEntry %>
  • - <%= link_to t(".hide_link"), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %> + <% if diary_entry.visible %> + <%= link_to t(".hide_link"), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %> + <% else %> + <%= link_to t(".unhide_link"), unhide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %> + <% end %>
  • <% end %>