%header.page__menu.page__menu--main = link_to Elabs.site_name, main_app.root_path, class: 'page__menu__title' .page__menu__group = icon('users', ['page__menu__group__icon']) = active_link_to _('Authors'), :users .page__menu__group = icon('file', ['page__menu__group__icon']) = active_link_to _('Projects'), :projects = active_link_to _('Articles'), :articles = active_link_to _('Notes'), :notes = active_link_to _('Albums'), :albums = active_link_to _('Uploads'), :uploads .page__menu__group = icon('tags', ['page__menu__group__icon']) = active_link_to _('Languages'), :languages = active_link_to _('Licenses'), :licenses = active_link_to _('Tags'), :tags .page__menu__group = icon('exclamation', ['page__menu__group__icon']) = link_to (show_nsfw? ? _('Hide NSFW') : _('Show NSFW')), params: { show_nsfw: !show_nsfw? } .page__menu__group = icon('language', ['page__menu__group__icon']) = render 'elabs/layouts/language_menu' - unless user_signed_in? .page__menu__group = active_link_to _('Login'), new_user_session_path - if user_signed_in? %header.page__menu.page__menu--member %span.page__menu__title= format(_('%s:'), s: current_user.display_name) .page__menu__group = active_link_to _('Projects'), :member_projects = active_link_to _('Articles'), :member_articles = active_link_to _('Notes'), :member_notes = active_link_to _('Albums'), :member_albums = active_link_to _('Uploads'), :member_uploads .page__menu__group = active_link_to _('Infos'), :member_edit_infos = active_link_to _('Preferences'), :member_edit_preferences = active_link_to _('Account'), edit_user_registration_path = active_link_to member_notifications_path do = _('Notifications') - if notification_count.positive? %span.badge.badge--notification= notification_count = active_link_to _('Log out'), destroy_user_session_path, method: :delete - if current_user.admin? %header.page__menu.page__menu--admin %span.page__menu__title= _('Administration:') .page__menu__group = active_link_to _('Projects'), :admin_projects = active_link_to _('Articles'), :admin_articles = active_link_to _('Notes'), :admin_notes = active_link_to _('Albums'), :admin_albums = active_link_to _('Uploads'), :admin_uploads .page__menu__group = active_link_to _('Tags'), :admin_tags = active_link_to _('Languages'), :admin_languages = active_link_to _('Licenses'), :admin_licenses .page__menu__group = active_link_to _('Users'), :admin_users .page__menu__group = active_link_to _('Reports'), :admin_reports - unless flash.empty? .page__messages - flash.each do |name, message| .alert{ class: "alert--#{name}" }= message