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
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (act == :show && contr == :platforms) ? 'active' : ''}
|
2012-03-20 16:24:18 +00:00
|
|
|
= link_to t("layout.platforms.about"), platform_path(@platform)
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (contr == :repositories) ? 'active' : ''}
|
2012-03-20 16:24:18 +00:00
|
|
|
= link_to t("layout.repositories.list_header"), platform_repositories_path(@platform)
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (contr == :contents) ? 'active' : ''}
|
2013-07-05 17:08:09 +01:00
|
|
|
= link_to t('layout.platforms.contents'), platform_contents_path(@platform)
|
2012-09-06 18:09:10 +01:00
|
|
|
- if can? :show, @platform
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (act == :index && contr == :maintainers) ? 'active' : nil}
|
2012-08-24 16:19:26 +01:00
|
|
|
= link_to t("layout.platforms.maintainers"), platform_maintainers_path(@platform)
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (contr == :mass_builds) ? 'active' : ''}
|
2012-07-03 15:34:07 +01:00
|
|
|
= 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
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (contr == :products) ? 'active' : ''}
|
2012-03-20 16:24:18 +00:00
|
|
|
= link_to t("layout.products.list_header"), platform_products_path(@platform)
|
2012-09-06 18:09:10 +01:00
|
|
|
- if can? :advisories, @platform
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (contr == :platforms and act == :advisories) ? 'active' : ''}
|
2012-06-04 20:49:20 +01:00
|
|
|
= link_to t("layout.advisories.list_header"), advisories_platform_path(@platform)
|
2012-03-20 16:24:18 +00:00
|
|
|
- if can? :update, @platform
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (act == :edit && contr == :platforms) ? 'active' : nil}
|
2012-03-20 16:24:18 +00:00
|
|
|
= link_to t("platform_menu.settings"), edit_platform_path(@platform)
|
|
|
|
- if can? :members, @platform
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (act == :members && contr == :platforms) ? 'active' : nil}
|
2012-03-20 16:24:18 +00:00
|
|
|
= link_to t("layout.platforms.members"), members_platform_path(@platform)
|
2012-07-13 12:18:12 +01:00
|
|
|
- if can? :edit, @platform
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (act == :index && contr == :key_pairs) ? 'active' : ''}
|
2012-07-13 12:18:12 +01:00
|
|
|
= link_to t("layout.key_pairs.header"), platform_key_pairs_path(@platform)
|
2014-01-21 04:51:49 +00:00
|
|
|
%li{class: (contr == :tokens) ? 'active' : ''}
|
2013-06-25 08:00:20 +01:00
|
|
|
= link_to t('layout.tokens.header'), platform_tokens_path(@platform)
|