Sha256: e26d62069ad77d39142a81e9f3fbf60f5504771f231021cf7bbad83834804c1f

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

.row
  .col-md-12
    = haml :'partials/search'
    %table.table.table-striped.table-bordered.table-hover
      %thead.thead-dark
        %tr
          %th Email
          %th Name
          %th Surname
          %th Roles
          %th Signed Up
          %th
      %tbody
        - if list.count > 0
          - list.all.each do |entity|
            %tr
              %td
                - if policy(entity).read?
                  %a{ href: "#{base_path}/#{entity.display_id}" }= entity.email
                - else
                  = entity.email
              %td= entity.name
              %td= entity.surname
              %td= entity.all_roles.map(&:name).map(&:titlecase).join(', ')
              %td= entity.created_at.strftime('%Y-%m-%d')
              %td
                - if policy(entity).update?
                  %a{ href: "#{base_path}/#{entity.display_id}/edit", title: 'Edit' }
                    %i.fa.fa-edit
        - else
          %tr
            %td.text-center{ colspan: 6 } No records

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ditty-0.9.1 views/users/index.haml
ditty-0.9.0 views/users/index.haml