%nav.navbar.navbar-expand-md.navbar-dark.bg-dark -# FIXME use helper methods - if ::Tramway::Admin.customized_admin_navbar.present? = ::Tramway::Admin.customized_admin_navbar - else = link_to @application&.try(:title) || @application&.public_name || t('aplication.title'), ::Tramway::Admin::Engine.routes.url_helpers.root_path, class: 'navbar-brand' %button.navbar-toggler.collapsed{ aria: { controls: :navbar, expanded: "false", label: 'Toggle Navigation' }, data: { target: "#navbar", toggle: :collapse }, type: :button } %span.navbar-toggler-icon .navbar-collapse.collapse#navbar - if signed_in? %ul.navbar-nav - ::Tramway::Admin.singleton_models_for(@application_engine || @application.name)&.each do |model| = model_menu_item model: model, route: ::Tramway::Admin::Engine.routes.url_helpers.singleton_path(model: model) - ::Tramway::Admin.available_models_for(@application_engine || @application.name)&.each do |model| = model_menu_item model: model, route: ::Tramway::Admin::Engine.routes.url_helpers.records_path(model: model, scope: decorator_class(model).collections.first) %ul.nav.navbar-nav.ml-auto - if signed_in? %li.nav-item = link_to '/session', method: :delete, class: 'nav-link' do = fa_icon 'sign-out' = t('helpers.links.sign_out') - else %li.nav-item = link_to new_session_path, class: 'nav-link' do = fa_icon 'sign-in' = t('helpers.links.enter')