Sha256: 0730a93e3768b2189b545cabef004ef90be033868f27c22b4540ba638d9f6db7

Contents?: true

Size: 1.36 KB

Versions: 8

Compression:

Stored size: 1.36 KB

Contents

- for_context ||= context

<!-- toolbar -->
- if for_context.collection?
  - new_context = for_context.resource.contexts.find do |c|
    - c <= AdminIt::NewContext
  - unless new_context.nil?
    = for_context.toolbar.button t('admin_it.action.create'), \
                                 add_class: 'btn-success', \
                                 link: new_context.path, \
                                 icon: 'plus'
  - if resource.collections.size > 1
    - for_context.toolbar.buttons(class: 'pull-right') do |buttons|
      - resource.collections.each do |collection|
        - btn_class = ['btn-default']
        - btn_class << 'active' if collection.context_name == for_context.name
        = buttons.button add_class: btn_class, \
                         link: collection.path, \
                         icon: collection.icon

  - unless for_context.all_filters.empty?
    - for_context.toolbar.buttons(class: 'pull-right admin-it-filters') do |buttons|
      = buttons.button add_class: 'btn-info dropdown-toggle', \
                       add_data: { toggle: 'dropdown' }, \
                       link: '#', icon: 'filter' do |button|
        = t('admin_it.filters') + ' '
        span class="caret"
      ul class="dropdown-menu" role="menu"
        - for_context.all_filters.each do |filter|
          li: a href==url_for(filters: filter.filter_name) =filter.display_name

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
admin_it-1.0.8 app/views/admin_it/shared/_toolbar.html.slim
admin_it-1.0.7 app/views/admin_it/shared/_toolbar.html.slim
admin_it-1.0.6 app/views/admin_it/shared/_toolbar.html.slim
admin_it-1.0.5 app/views/admin_it/shared/_toolbar.html.slim
admin_it-1.0.4 app/views/admin_it/shared/_toolbar.html.slim
admin_it-1.0.3 app/views/admin_it/shared/_toolbar.html.slim
admin_it-1.0.2 app/views/admin_it/shared/_toolbar.html.slim
admin_it-1.0.1 app/views/admin_it/shared/_toolbar.html.slim