Sha256: 88bd89b5b5a1f9a109cc8af9d6b989952e9f5b7eaff2c5fc2bc45b1bdd35aff1

Contents?: true

Size: 929 Bytes

Versions: 2

Compression:

Stored size: 929 Bytes

Contents

.row
  .col-md-12
    = haml :'partials/search'
    %table.table.table-striped.table-bordered.table-hover
      %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
  =pagination(list, base_path)

Version data entries

2 entries across 2 versions & 1 rubygems

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