Sha256: 15bafe3b2690c43851dd238cc014a4ec5a2ffa0151e7677684c1c633c400ffdd

Contents?: true

Size: 1.72 KB

Versions: 15

Compression:

Stored size: 1.72 KB

Contents

%h1= EgovUtils::User.model_name.human(count: 2)

= bootstrap_form_tag(url: egov_utils.users_path, method: :get, layout: :inline) do |f|
  .form-group
    = f.text_field :search, value: params[:search], label: false, placeholder: t('label_search'), skip_label: true
    = f.hidden_field :default_scope, value: params[:default_scope]
    = f.submit 'Vyhledat', class: 'btn btn-primary btn-sm'

%table.table.table-striped
  %thead
    %th= EgovUtils::User.human_attribute_name('fullname')
    %th= EgovUtils::User.human_attribute_name('provider')
    %th= EgovUtils::User.human_attribute_name('roles')
    %th= EgovUtils::User.human_attribute_name('groups')
    %th= t('label_actions')
  %tbody
    - if @entities.empty?
      %tr
        %td{colspan: 4}= t('label_no_entries')
    - @entities.each do |user|
      %tr
        %td
          %div= user.fullname
          %small= user.login
        %td= 'LDAP' if user.provider
        %td= user.all_role_names.map { I18n.t("roles.#{_1}") }.join(', ')
        %td= user.groups.map(&:name).join(', ')
        %td
          - unless user.active?
            = button_to(t('label_approve'), approve_user_path(user), class: 'btn btn-primary btn-sm', method: :post)
          - if can?(:edit, user)
            = link_to(t('label_edit'), edit_user_path(user), class: 'btn btn-secondary btn-sm')
          - if can?(:delete, user)
            - if user.deleted?
              = button_to(t('label_unarchive'), unarchive_user_path(user), method: :patch, class: 'btn btn-danger btn-sm')
            - else
              = button_to(t('label_archive'), user_path(user), method: :delete, class: 'btn btn-danger btn-sm')

.row
  .col-md-4
    = page_entries_info @entities
  .col-md-4
    = paginate @entities
  .col-md-4

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
egov_utils-1.5.0.alpha16 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha15 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha14 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha13 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha12 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha11 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha10 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha9 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha8 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha7 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha6 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha5 app/views/egov_utils/users/index.html.haml
egov_utils-1.5.0.alpha4 app/views/egov_utils/users/index.html.haml
egov_utils-1.4.5 app/views/egov_utils/users/index.html.haml
egov_utils-1.4.4 app/views/egov_utils/users/index.html.haml