app/views/chaltron/users/index.html.erb in chaltron-0.3.2 vs app/views/chaltron/users/index.html.erb in chaltron-1.0.0

- old
+ new

@@ -1,52 +1,50 @@ <div class='container-fluid'> - <h3 class='page-header'><%= t '.title' %></h3> + <h3 class='pt-4'><%= t '.title' %></h3> <div class='row'> - <div class='col-md-3 side-filters'> + <div class='col-md-3'> <%= render partial: 'side_filters', locals: { filters: @filters } %> <hr> - <% if ldap_enabled? and !Chaltron.ldap_allow_all %> - <div class='btn-group'> + <% if ldap_enabled? %> + <div class='dropdown pull-right'> <%= content_tag :button, type: 'button', class: 'btn btn-primary dropdown-toggle', - data: {toggle: 'dropdown'}, aria: {expanded: false} do %> - <%= icon :plus, t('.new_user') %> <span class="caret"></span> + data: {toggle: 'dropdown'}, aria: {expanded: false, haspopup: true}, id: 'new_user_button' do %> + <%= icon :plus, t('.new_user') %> <% end %> - <ul class='dropdown-menu' role='menu'> - <li><%= link_to t('.new_ldap_user'), ldap_search_path %></li> - <li><%= link_to t('.new_local_user'), new_user_path %></li> - </ul> + <%= content_tag :div, class: 'dropdown-menu', aria: {labelledby: 'new_user_button'} do %> + <%= link_to t('.new_ldap_user'), ldap_search_path, class: 'dropdown-item' %> + <%= link_to t('.new_local_user'), new_user_path, class: 'dropdown-item' %> + <% end %> </div> <% else %> <%= link_to new_user_path, class: 'btn btn-primary pull-right' do %> <%= icon :plus, t('.new_local_user') %> <% end %> <% end %> </div> <div class='col-md-9'> - <div class='panel panel-default'> - <div class='panel-body'> - <%= content_tag 'table', id: 'users', class: 'table table-striped table-responsive' do %> - <thead> - <tr> - <th class='username'> - <%= User.human_attribute_name(:username) %> - </th> - <th class='fullname'> - <%= User.human_attribute_name(:fullname) %> - </th> - <th class='email'> - <%= User.human_attribute_name(:email) %> - </th> - </tr> - </thead> - <tbody> - <%= render @users %> - </tbody> - <% end %> - </div> + <div class='table-responsive'> + <%= content_tag 'table', id: 'users', class: 'table table-striped' do %> + <thead> + <tr> + <th class='username'> + <%= User.human_attribute_name(:username) %> + </th> + <th class='fullname'> + <%= User.human_attribute_name(:fullname) %> + </th> + <th class='email'> + <%= User.human_attribute_name(:email) %> + </th> + </tr> + </thead> + <tbody> + <%= render @users %> + </tbody> + <% end %> </div> </div> </div> </div>