]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/show.html.erb
Merge remote-tracking branch 'upstream/pull/2448'
[rails.git] / app / views / users / show.html.erb
index 51dcb4f92f5c0da7089392d0da2f0f7e97374828..0112261099f7502afec57c82b791bbd15ab0adce 100644 (file)
@@ -35,7 +35,7 @@
             </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>
@@ -96,7 +96,7 @@
             </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>
   <% if current_user and @user.id == current_user.id %>
     <% if @user.home_lat.nil? or @user.home_lon.nil? %>
       <div id="map" class="content_map">
-        <p id="no_home_location"><%= raw(t(".if set location", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name))) %></p>
+        <p id="no_home_location"><%= t(".if_set_location_html", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name)) %></p>
       </div>
     <% else %>
       <% content_for :head do %>