2012-03-11 23:08:50 +00:00
|
|
|
- act = action_name.to_sym
|
|
|
|
- contr = controller_name.to_sym
|
|
|
|
|
|
|
|
- content_for :sidebar do
|
|
|
|
%aside
|
|
|
|
.admin-preferences
|
2012-03-20 16:24:18 +00:00
|
|
|
%nav
|
|
|
|
%ul
|
|
|
|
%li{:class => (act == :show && contr == :platforms) ? 'active' : ''}
|
|
|
|
= link_to t("layout.platforms.about"), platform_path(@platform)
|
|
|
|
%li{:class => (contr == :repositories) ? 'active' : ''}
|
|
|
|
= link_to t("layout.repositories.list_header"), platform_repositories_path(@platform)
|
2012-09-06 18:09:10 +01:00
|
|
|
- if can? :show, @platform
|
2012-08-24 16:19:26 +01:00
|
|
|
%li{:class => (act == :index && contr == :maintainers) ? 'active' : nil}
|
|
|
|
= link_to t("layout.platforms.maintainers"), platform_maintainers_path(@platform)
|
2012-07-03 15:34:07 +01:00
|
|
|
- if can? :edit, @platform
|
|
|
|
%li{:class => (contr == :mass_builds && [:index, :create].include?(act)) ? 'active' : ''}
|
|
|
|
= link_to t("layout.platforms.mass_build"), platform_mass_builds_path(@platform)
|
2012-03-20 16:24:18 +00:00
|
|
|
- if can? :read, @platform.products.build
|
|
|
|
%li{:class => (contr == :products) ? 'active' : ''}
|
|
|
|
= link_to t("layout.products.list_header"), platform_products_path(@platform)
|
2012-09-06 18:09:10 +01:00
|
|
|
- if can? :advisories, @platform
|
2012-06-04 20:49:20 +01:00
|
|
|
%li{:class => (contr == :platforms and act == :advisories) ? 'active' : ''}
|
|
|
|
= link_to t("layout.advisories.list_header"), advisories_platform_path(@platform)
|
2012-03-20 16:24:18 +00:00
|
|
|
- if can? :update, @platform
|
|
|
|
%li{:class => (act == :edit && contr == :platforms) ? 'active' : nil}
|
|
|
|
= link_to t("platform_menu.settings"), edit_platform_path(@platform)
|
|
|
|
- if can? :members, @platform
|
|
|
|
%li{:class => (act == :members && contr == :platforms) ? 'active' : nil}
|
|
|
|
= link_to t("layout.platforms.members"), members_platform_path(@platform)
|
2012-07-13 12:18:12 +01:00
|
|
|
- if can? :edit, @platform
|
|
|
|
%li{:class => (act == :index && contr == :key_pairs) ? 'active' : ''}
|
|
|
|
= link_to t("layout.key_pairs.header"), platform_key_pairs_path(@platform)
|
2012-03-20 16:24:18 +00:00
|
|
|
-#- if current_user.owner_of? @platform or current_user.admin?
|
|
|
|
%li{:class => (act == :index && contr == :private_users) ? 'active' : ''}
|
|
|
|
= link_to t("layout.platforms.private_users"), platform_private_users_path(@platform)
|