Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 3c49cda1e53ccfa9968b85d2429efdec6a1d2f12 1 parent 8c28cd3
@vanderhoorn vanderhoorn authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 app/views/shared/_admin_tools.html.haml
View
15 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'
Please sign in to comment.
Something went wrong with that request. Please try again.