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

16 lines
725 B
Plaintext

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