Sha256: 553311de4f024570183b8c49b9a80a1c9e39e31ce9bc84aebc4bd06ede9d4d66

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

.row
  .col-md-12
    = haml :'partials/search'
    .card.card-default.shadow.table-responsive
      %table.table.table-striped.table-bordered.table-hover.mb-0
        %thead.thead-dark
          %tr
            <%- columns.each do |col| -%>
            %th <%= col.to_s.titleize %>
            <%- end %>
            %th
        %tbody
          - if list.count > 0
            - list.all.each do |entity|
              %tr
                <%- columns.each do |col| -%>
                %td= entity.<%= col %>
                <%- end %>
                %td
                  %a{ href: "#{base_path}/#{entity.display_id}", title: 'Show' }
                    %i.fa.fa-search
                  - if policy(entity).update?
                    %a{ href: "#{base_path}/#{entity.display_id}/edit", title: 'Edit' }
                      %i.fa.fa-edit
          - else
            %tr
              %td.text-center{ colspan: <%= columns.count + 1 %> } No <%= model_name.pluralize %>

      - if list.count > 0
        .card-body
          = pagination(list, base_path)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ditty-0.11.1 lib/ditty/templates/views/index.haml.tt