]> git.openstreetmap.org Git - rails.git/commitdiff
Add "blocks on" and "blocks by" links to the user page when a logged
authorTom Hughes <tom@compton.nu>
Thu, 1 Oct 2009 21:30:45 +0000 (21:30 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 1 Oct 2009 21:30:45 +0000 (21:30 +0000)
in user is looking at their own page.

app/views/user/view.html.erb
config/locales/en.yml

index ab455461f264b7c90bfa21dac31360d4ff366482..4a8fde862f072592f0636544d1111303a19b27f5 100644 (file)
 | <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
 | <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
 | <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
+| <%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %>
+<% if @user and @user.moderator? %>
+| <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %>
+<% end %>
 <% else %>
 <!-- Displaying another user's profile page -->
 <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %>
index 6daf20d349fef39d1b7a8a00f018d44ff352aed0..31fb00201ad0b2be42dd7e38ce4b3d1ae95a3105 100644 (file)
@@ -922,6 +922,8 @@ en:
       my edits: my edits
       my traces: my traces
       my settings: my settings
+      blocks on me: blocks on me
+      blocks by me: blocks by me
       send message: send message
       diary: diary
       edits: edits