Sha256: cd170ecf531ebc7bf003f5b143fdbe5880f1a4a76ce27346ab96d894e3b2cb04

Contents?: true

Size: 1.07 KB

Versions: 11

Compression:

Stored size: 1.07 KB

Contents

<div class="page-header">
  <h3>Groups</h3>
  <form class="form-inline">
    <%= select2_tag('group-selector', [],
      placeholder: 'Go to...',
      data_url: admin_groups_path,
      filter_param: :filter_name,
      display_property: :name,
      style: 'min-width: 250px',
      class: 'form-control') %>
  </form>
</div>

<%= render layout: 'kadmin/components/finder', locals: { finder: @finder } do |items| %>
  <%= render partial: 'admin/groups/table', locals: { groups: items } %>
<% end %>

<% content_for(:stylesheets) do %>
  <%= stylesheet_link_tag "kadmin/select2", media: "all" %>
<% end %>

<% content_for(:javascripts) do %>
  <%= javascript_include_tag "kadmin/select2" %>
  <script type="text/javascript">
    $(document).ready(function() {
      var group_path = "<%= admin_group_path(0) %>".split('/').slice(0, -1).join('/');
      $("#group-selector").on("select2:select", function(event) {
        var group = event.params.data;
        if (group.id) {
          document.location.href = group_path + "/" + group.id;
        }
      });
    });
  </script>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kadmin-0.6.7 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.6.6 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.6.5 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.6.4 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.6.3 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.6.1 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.5.7 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.5.6 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.4.2 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.4.1 test/dummy/app/views/admin/groups/index.html.erb
kadmin-0.4.0 test/dummy/app/views/admin/groups/index.html.erb