Sha256: 7e46a743f64750fe2fa74ddac96fb34f12136fee276fd0c11b9086b13abdb234

Contents?: true

Size: 1.14 KB

Versions: 25

Compression:

Stored size: 1.14 KB

Contents

- default_page_title ||= nil; on_site_link ||= nil
- current_title = default_page_title || plural(model_class).capitalize
- title current_title
- state_method ||= :state
- tabs = get_collection
.page-header
  .row
    .col-md-6
      %h1
        = current_title
        = link_to fa_icon(:plus), new_current_model_record_path, class: 'btn btn-primary'
        - if defined? Tramway::Export::Engine
          = render 'tramway/export/button'
    = render 'search', model_class: model_class
%hr
%ul.nav.nav-tabs
  - if params[:search]
    %li.nav-item
      = link_to search_tab_title(@records.total_count), '#', class: 'nav-link active'
    %li.nav-item
      = link_to t('helpers.actions.reset'), records_path(model: params[:model], filter: params[:filter]), class: 'nav-link'
  - else
    - tabs.each_with_index do |tab, index|
      %li.nav-item
        = link_to admin_index_path_of_model(model_class, tab, (params[:filter].present? ? params[:filter] : nil)&.permit!), class: "#{active_tab(tab, index)} nav-link" do
          != tab_title(model_class, tab, @counts[tab], state_method)
%div{ id: (params[:search] ? :search : params[:scope]) }
  = render 'list'

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
tramway-admin-1.28.1.4 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.28.1.3 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.28.1.2 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.28.1 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.28.0.1 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.28 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.27.0.2 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.27.0.1 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.27 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.26.1.3 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.26.1.2 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.26.1.1 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.26.1 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.26 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.25 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.24.0.3 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.24.0.2 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.24.0.1 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.24 app/views/tramway/admin/records/index.html.haml
tramway-admin-1.23.0.3 app/views/tramway/admin/records/index.html.haml