]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/show.html.erb
Localisation updates from https://translatewiki.net.
[rails.git] / app / views / users / show.html.erb
index 51dcb4f92f5c0da7089392d0da2f0f7e97374828..7e8b451851bf48302f3df1a56c19c53cd1ff3ae7 100644 (file)
@@ -35,7 +35,7 @@
             </li>
           <% end %>
 
             </li>
           <% end %>
 
-          <% if current_user and current_user.moderator? and current_user.blocks_created.exists? %>
+          <% if can?(:create, UserBlock) and current_user.blocks_created.exists? %>
             <li>
               <%= link_to t(".blocks by me"), :controller => "user_blocks", :action => "blocks_by", :display_name => current_user.display_name %>
               <span class='count-number'><%= number_with_delimiter(current_user.blocks_created.active.size) %></span>
             <li>
               <%= link_to t(".blocks by me"), :controller => "user_blocks", :action => "blocks_by", :display_name => current_user.display_name %>
               <span class='count-number'><%= number_with_delimiter(current_user.blocks_created.active.size) %></span>
@@ -96,7 +96,7 @@
             </li>
           <% end %>
 
             </li>
           <% end %>
 
-          <% if current_user and current_user.moderator? %>
+          <% if can?(:create, UserBlock) %>
             <li>
             <%= link_to t(".create_block"), :controller => "user_blocks", :action => "new", :display_name => @user.display_name %>
             </li>
             <li>
             <%= link_to t(".create_block"), :controller => "user_blocks", :action => "new", :display_name => @user.display_name %>
             </li>