rosa-build/app/views/users/_sidebar.html.haml

16 lines
719 B
Plaintext
Raw Normal View History

- act = action_name.to_sym
- contr = controller_name.to_sym
%aside
.admin-preferences
%ul
- if can? :edit, @user
2012-03-03 16:03:23 +00:00
%li{:class => (act == :edit && :users == contr) ? 'active' : ''}
2012-03-12 15:03:25 +00:00
= link_to t("layout.users.edit"), @user == current_user ? edit_profile_path : edit_user_path(@user)
2012-03-03 16:03:23 +00:00
- if can? :private, @user
%li{:class => (act == :private && contr == :users) ? 'active' : ''}
= link_to t("layout.users.user_private_settings"), user_private_settings_path(@user)
2012-03-03 16:03:23 +00:00
- if can? :show, @user.notifier
%li{:class => (act == :show && contr == :notifiers) ? 'active' : ''}
= link_to t("layout.users.settings_notifier"), user_settings_notifier_path(@user)