Permalink
Browse files

Add a shared 'admin_tools' partial; consistency with the master branch.

  • Loading branch information...
1 parent 8c28cd3 commit 3c49cda1e53ccfa9968b85d2429efdec6a1d2f12 @vanderhoorn vanderhoorn committed Nov 11, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 app/views/shared/_admin_tools.html.haml
@@ -0,0 +1,15 @@
+- if logged_in? && current_user.has_role?('admin', 'editor', 'final_editor')
+ / Admin toolbox
+ #admin_tools
+ %ul
+ - if @node && current_user.role_on(@node)
+ %li
+ = image_tag 'icons/eye.png', :class => 'icon', :alt => t('layouts.lookup_alt'), :title => t('layouts.lookup_title')
+ = link_to t('layouts.lookup'), admin_nodes_path(:active_node_id => @node.id)
+ - else
+ %li
+ = image_tag 'icons/pencil.png', :class => 'icon', :alt => t('layouts.administration_alt'), :title => t('layouts.administration_title')
+ = link_to t('layouts.administration'), admin_nodes_path
+ %li
+ = image_tag 'icons/user_go.png', :class => 'icon', :alt => t('layouts.log_out_alt'), :title => t('layouts.log_out_title')
+ = link_to t('layouts.log_out'), logout_path, :class => 'logout'

0 comments on commit 3c49cda

Please sign in to comment.