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

55 lines
1.7 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-05-28 20:59:35 +01:00
li.sidebar-title
span
= t 'top_menu_labels.navigation'
- (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
span.menu-icon.fa class=top_menu_icon(base)
li.sidebar-list
a href="http://repoclosure.openmandriva.org"
| Repoclosure
span.menu-icon.fa.fa-circle-o
2018-08-14 09:08:26 +01:00
li.sidebar-list
2018-08-29 15:49:43 +01:00
a href="https://abf.openmandriva.org/massbuild"
2018-08-14 09:08:26 +01:00
| Mass build status
span.menu-icon.fa.fa-circle-o
2023-03-07 16:55:01 +00:00
/ - if current_user.try(:admin?)
/ li.sidebar-list
/ a href=admin_users_path
/ = t('admins_menu_header')
/ span.menu-icon.fa.fa-lock
2016-05-28 20:59:35 +01:00
- if current_user
2016-05-24 15:01:22 +01:00
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
2016-05-28 20:59:35 +01:00
- else
li.sidebar-title
span
= t 'top_menu_labels.account'
2016-05-24 15:01:22 +01:00
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')
2018-08-29 15:49:43 +01:00
span.menu-icon.fa.fa-user