Sha256: cffdf19eaea342347b6955f157043d4b6df0140b9597aea11d488f5361a78f47

Contents?: true

Size: 1.63 KB

Versions: 4

Compression:

Stored size: 1.63 KB

Contents

- for_context ||= context

- unless for_context.single? || for_context.filters.empty?
  div class="row admin-it-filters"
    ul class="nav nav-pills nav-stacked col-md-2"
      - for_context.filters.each do |filter, index|
        li class="#{filter == for_context.active_filter ? 'active' : ''}" data-toggle="popup"
          a href="##{filter.name}" data-toggle="pill"
            = filter.display_name
            button(
              class="btn btn-xs btn-danger pull-right fade"
              data-toggle="popup-target"
              data-link==url_for(for_context.url_params(filters: "-#{filter.name}"))
            )
              i class="fa fa-times-circle"

    div class="well tab-content admin-it-filter-content col-md-10"
      - for_context.filters.each do |filter|
        div(
          class="tab-pane fade#{filter == for_context.active_filter ? ' in active' : ''}"
          id==filter.name
        )
          - filter.all_values.each do |v|
            - if filter.values.include?(v[:value])
              - a_class = 'label-success'
              - href = url_for(for_context.url_params( \
                filters: "#{filter.name}(-#{filter.value(v[:value])})", \
                active_filter: filter.name \
              ))
            - else
              - a_class = 'label-info'
              - href = url_for(for_context.url_params( \
                filters: "#{filter.name}(+#{filter.value(v[:value])})", \
                active_filter: filter.name \
              ))
            a class="label #{a_class}" href==href
              = v[:value].to_s + ' '
              span class="badge"
                = v[:count].to_s
            = ' '

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
admin_it-1.0.5 app/views/admin_it/shared/_filters.html.slim
admin_it-1.0.4 app/views/admin_it/shared/_filters.html.slim
admin_it-1.0.3 app/views/admin_it/shared/_filters.html.slim
admin_it-1.0.2 app/views/admin_it/shared/_filters.html.slim