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

37 lines
2.1 KiB
Plaintext
Raw Normal View History

- act = action_name.to_sym
- contr = controller_name.to_sym
- content_for :sidebar do
%aside
.admin-preferences
%nav
%ul
2014-01-21 04:51:49 +00:00
%li{class: (act == :show && contr == :platforms) ? 'active' : ''}
= link_to t("layout.platforms.about"), platform_path(@platform)
2014-01-21 04:51:49 +00:00
%li{class: (contr == :repositories) ? 'active' : ''}
= link_to t("layout.repositories.list_header"), platform_repositories_path(@platform)
2014-01-21 04:51:49 +00:00
%li{class: (contr == :contents) ? 'active' : ''}
= link_to t('layout.platforms.contents'), platform_contents_path(@platform)
- if can? :show, @platform
2014-01-21 04:51:49 +00:00
%li{class: (act == :index && contr == :maintainers) ? 'active' : nil}
= link_to t("layout.platforms.maintainers"), platform_maintainers_path(@platform)
2014-01-21 04:51:49 +00:00
%li{class: (contr == :mass_builds) ? 'active' : ''}
= link_to t("layout.platforms.mass_build"), platform_mass_builds_path(@platform)
- if can? :read, @platform.products.build
2014-01-21 04:51:49 +00:00
%li{class: (contr == :products) ? 'active' : ''}
= link_to t("layout.products.list_header"), platform_products_path(@platform)
- if can? :advisories, @platform
2014-01-21 04:51:49 +00:00
%li{class: (contr == :platforms and act == :advisories) ? 'active' : ''}
= link_to t("layout.advisories.list_header"), advisories_platform_path(@platform)
- if can? :update, @platform
2014-01-21 04:51:49 +00:00
%li{class: (act == :edit && contr == :platforms) ? 'active' : nil}
= 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}
= 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' : ''}
= link_to t('layout.tokens.header'), platform_tokens_path(@platform)