2012-03-22 00:42:56 +00:00
|
|
|
- content_for :sidebar do
|
2011-10-30 22:59:03 +00:00
|
|
|
|
2012-03-22 00:42:56 +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)
|
2013-05-16 21:07:40 +01:00
|
|
|
- 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
|
2012-04-22 10:17:33 +01:00
|
|
|
%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)
|