31 lines
1.6 KiB
Plaintext
31 lines
1.6 KiB
Plaintext
- content_for :submenu do
|
|
- act = action_name.to_sym
|
|
- contr = controller_name.to_sym
|
|
nav.navbar.navbar-default role='navigation'
|
|
.container-fluid
|
|
/ Brand and toggle get grouped for better mobile display
|
|
.navbar-header
|
|
.navbar-brand
|
|
= link_to platform_printed_name(@platform), @platform
|
|
/ Collect the nav links, forms, and other content for toggling
|
|
ul.nav.navbar-nav.left-border
|
|
|
|
li class=('active' if act == :show && contr == :platforms || contr == :repositories)
|
|
= link_to t("layout.platforms.about"), platform_path(@platform)
|
|
li class=('active' if contr == :contents)
|
|
= link_to t('layout.platforms.contents'), platform_contents_path(@platform)
|
|
- if policy(@platform).show?
|
|
/ li class=('active' if act == :index && contr == :maintainers)
|
|
/ = link_to t("layout.platforms.maintainers"), platform_maintainers_path(@platform)
|
|
li class=('active' if contr == :mass_builds)
|
|
= link_to t("layout.platforms.mass_build"), platform_mass_builds_path(@platform)
|
|
- if policy(@platform.products.build).show?
|
|
li class=('active' if contr == :products)
|
|
= link_to t("layout.products.list_header"), platform_products_path(@platform)
|
|
- if policy(@platform).update?
|
|
li class=('active' if act == :edit && contr == :platforms)
|
|
= link_to t("platform_menu.settings"), edit_platform_path(@platform)
|
|
- if policy(@platform).local_admin_manage?
|
|
li class=('active' if act == :members && contr == :platforms)
|
|
= link_to t("layout.platforms.members"), members_platform_path(@platform)
|