rosa-build/app/views/projects/base/_sidebar.html.haml

19 lines
881 B
Plaintext
Raw Normal View History

- content_for :sidebar do
2011-10-30 22:59:03 +00:00
- act = action_name.to_sym
- contr = controller_name.to_sym
2012-03-31 14:18:22 +01:00
.admin-preferences
%ul
- if can? :edit, @project
%li{:class => (act == :edit && contr == :projects) ? 'active' : ''}
= link_to t("layout.projects.edit"), edit_project_path(@project)
%li{:class => (act == :sections && contr == :projects) ? 'active' : ''}
= link_to t("layout.projects.sections"), sections_project_path(@project)
- if current_user.admin? # TODO: remove
%li{:class => (contr == :hooks) ? 'active' : ''}
= link_to t("layout.projects.hooks"), project_hooks_path(@project)
2012-03-31 14:18:22 +01:00
- if can? :manage_collaborators, @project
%li{:class => (act == :index && contr == :collaborators) ? 'active' : ''}
2012-04-16 20:22:08 +01:00
= link_to t("layout.projects.edit_collaborators"), project_collaborators_path(@project)