Sha256: 874a3cef44a1813a3101786516fb060f59ba5d32f04f9875a15b766b581d3024

Contents?: true

Size: 1.49 KB

Versions: 4

Compression:

Stored size: 1.49 KB

Contents

%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&.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)&.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)&.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')

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tramway-admin-1.7.8.2 app/views/layouts/tramway/admin/shared/_navbar.html.haml
tramway-admin-1.7.8.1 app/views/layouts/tramway/admin/shared/_navbar.html.haml
tramway-admin-1.7.8 app/views/layouts/tramway/admin/shared/_navbar.html.haml
tramway-admin-1.7.7.1 app/views/layouts/tramway/admin/shared/_navbar.html.haml