2015-10-06 11:30:39 -04:00
|
|
|
.navbar.navbar-default.navbar-static-top.navbar-custom
|
2015-09-30 12:59:25 -04:00
|
|
|
.container
|
2015-10-06 11:30:39 -04:00
|
|
|
.navbar-header
|
|
|
|
button.navbar-toggle.collapsed type='button' data-toggle='collapse' data-target='.navbar-collapse'
|
|
|
|
span.sr-only Toggle navigation
|
|
|
|
span.icon-bar
|
|
|
|
span.icon-bar
|
|
|
|
span.icon-bar
|
|
|
|
= link_to 'DBZDokkan', root_path, class: 'navbar-brand'
|
|
|
|
.collapse.navbar-collapse
|
|
|
|
ul.nav.navbar-nav.navbar-right
|
2015-10-08 15:18:21 -04:00
|
|
|
- if policy(:user).index?
|
|
|
|
li.dropdown
|
|
|
|
a href='#' class='dropdown-toggle' data-toggle='dropdown'
|
|
|
|
= 'Admin '
|
|
|
|
span class='caret'
|
|
|
|
ul.dropdown-menu
|
|
|
|
- if policy(:user).index?
|
|
|
|
li= link_to 'Users', users_path
|
|
|
|
- if policy(:link).index? || policy(:leader_skill).index? || policy(:passive_skill).index? || policy(:super_attack).index?
|
|
|
|
li.dropdown
|
|
|
|
a href='#' class='dropdown-toggle' data-toggle='dropdown'
|
|
|
|
= 'Abilities '
|
|
|
|
span class='caret'
|
|
|
|
ul.dropdown-menu
|
|
|
|
- if policy(:link).index?
|
|
|
|
li= link_to 'Links', links_path
|
|
|
|
- if policy(:leader_skill).index?
|
|
|
|
li= link_to 'Leader Skills', leader_skills_path
|
|
|
|
- if policy(:passive_skill).index?
|
|
|
|
li= link_to 'Passive Skills', passive_skills_path
|
|
|
|
- if policy(:super_attack).index?
|
|
|
|
li= link_to 'Super Attacks', super_attacks_path
|
|
|
|
- if policy(:card).index?
|
|
|
|
li= nav_link_to 'Cards', cards_path
|
|
|
|
- if policy(:character).index?
|
|
|
|
li= nav_link_to 'Characters', characters_path
|
|
|
|
- if policy(:awaken_type).index? || policy(:rarity).index? || policy(:type).index?
|
|
|
|
li.dropdown
|
|
|
|
a href='#' class='dropdown-toggle' data-toggle='dropdown'
|
|
|
|
= 'Others '
|
|
|
|
span class='caret'
|
|
|
|
ul.dropdown-menu
|
|
|
|
- if policy(:awaken_type).index?
|
|
|
|
li= link_to 'Awaken Types', awaken_types_path
|
|
|
|
- if policy(:rarity).index?
|
|
|
|
li= link_to 'Rarities', rarities_path
|
|
|
|
- if policy(:type).index?
|
|
|
|
li= link_to 'Types', types_path
|
2015-09-30 12:59:25 -04:00
|
|
|
- if logged_in?
|
2015-10-06 11:30:39 -04:00
|
|
|
li= link_to 'Log Out', logout_path, method: :delete
|
2015-09-30 12:59:25 -04:00
|
|
|
- else
|
2015-10-06 13:55:12 -04:00
|
|
|
li= link_to 'Log In', login_path(:reddit)
|