app/views/application/_navbar.html.slim
nav.navbar.navbar-static-top.navbar-light.bg-faded.m-b-1
= link_to t('global.brand'), :dashboard, class: 'navbar-brand'
ul.nav.navbar-nav
li.nav-item.dropdown
a.nav-link data-toggle="dropdown"
= icon('caret-down')
.dropdown-menu
- current_user.accessible_wikis.each do |wiki|
= link_to wiki.title, wiki, class: 'dropdown-item'
ul.nav.navbar-nav.pull-right
- if @wiki.try(:persisted?)
li.nav-item
= form_tag search_wiki_path(@wiki), method: :get, class: 'form-inline navbar-form pull-right'
input.form-control.form-control-sm type="text" name="q" placeholder="#{t('.search')}" value="#{params[:q]}"
li.nav-item.hidden-xs-down
li.nav-item.dropdown
a.dropdown-toggle.nav-link data-toggle="dropdown"
= image_tag current_user.avatar(24), size: '24x24'
.dropdown-menu.dropdown-menu-right
h6.dropdown-header= current_user.nickname
= link_to t('global.new_wiki'), :new_wiki, class: 'dropdown-item'
.dropdown-divider
= link_to t('.sign_out'), :sign_out, method: :delete, class: 'dropdown-item'