2012-05-02 10:18:07 +01:00
|
|
|
- namespace = which_menu == 'admins_menu' ? 'admin_' : ''
|
2012-02-08 14:01:00 +00:00
|
|
|
%ul
|
2012-03-19 17:32:02 +00:00
|
|
|
- (collection = t which_menu).each do |base, title|
|
2012-02-08 14:01:00 +00:00
|
|
|
- if can? :index, base.to_s.classify.constantize
|
2012-05-05 17:15:49 +01:00
|
|
|
%li= link_to title, send(:"#{namespace}#{base}_path"), :class => top_menu_class(base)
|
2012-03-31 00:37:54 +01:00
|
|
|
- if current_user.try(:admin?) and which_menu == 'top_menu'
|
2012-06-09 17:04:06 +01:00
|
|
|
%li= link_to t('admins_menu_header'), admin_users_path, :class => top_menu_class('admin')
|