rosa-build/app/views/layouts/menu/_new_top.html.slim

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2016-05-24 15:01:22 +01:00
li.sidebar-list
div.form-inline.no-indent
= form_tag search_index_path, method: 'get', role: 'search' do
= text_field_tag 'query', @query, placeholder: t('layout.search.header'), class: 'form-control', ng_show: 'toggle'
2016-04-29 15:10:30 +01:00
-if current_user
2016-05-24 15:01:22 +01:00
li.sidebar-title
span
= t 'top_menu_labels.navigation'
2016-04-29 15:10:30 +01:00
- (collection = t 'top_menu').each do |base, title|
- if policy(base.to_s.singularize.to_sym).index?
li.sidebar-list
a href=send("#{base}_path")
= title
2016-05-24 15:01:22 +01:00
span.menu-icon.fa class=top_menu_icon(base)
li.sidebar-title
span
= t 'top_menu_labels.account'
li.sidebar-list
a href=url_for(current_user)
= current_user.uname
span.menu-icon.fa.fa-user
li.sidebar-list
a href=profile_settings_path
= t('layout.settings.label')
span.menu-icon.fa.fa-wrench
li.sidebar-list
a href=destroy_user_session_path data-method='delete'
= t('layout.logout')
span.menu-icon.fa.fa-sign-out
-else
li.sidebar-list
a href=new_user_registration_path
= t('layout.devise.shared_links.sign_up')
span.menu-icon.fa.fa-key
li.sidebar-list
a href=new_user_session_path
= t('layout.devise.shared_links.sign_in')
span.menu-icon.fa.fa-user