Sha256: 3f71cd342cfa274a5f18e04a1f552891b3976a97287738e832b3aaf51f767e27

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

h2.text-center #{data[:model]} Index
.row
  .col-sm-12
    .table-responsive
      table.table.table-bordered.table-hover.table-sm
        thead.thead-dark
          tr
            - data[:attributes].each do |attribute|
              th.text-center = attribute
            - (data[:actions] - [:new]).size.times do
              th.text-center

        tbody
          - data[:collection].each do |item|
            tr
              - data[:attributes].each do |attribute|
                - attribute = item.read_attribute(attribute)
                - if attribute.is_a? ActiveSupport::TimeWithZone
                  td = l attribute, format: :short
                - else
                  td = attribute

              - (data[:actions] - [:new]).each do |action|
                td[style="width: 0"] = index_actions_link_helper(action, item, data)

- if data[:actions].include?(:new)
  .row
    .col-sm-3.mx-auto = link_to :new, url_for([data[:namespace], :new, data[:model].to_s.downcase]), class: "btn btn-success btn-sm btn-block"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lasha-0.4.2 app/views/lasha/_index_generator.html.slim
lasha-0.4.1 app/views/lasha/_index_generator.html.slim
lasha-0.4.0 app/views/lasha/_index_generator.html.slim
lasha-0.3.4 app/views/shared/_index_generator.html.slim