index.html.haml 1.68 KB
Newer Older
Annabel Dunstone's avatar
Annabel Dunstone committed
1
- @no_container = true
Douwe Maan's avatar
Douwe Maan committed
2
- page_title "Groups"
Annabel Dunstone's avatar
Annabel Dunstone committed
3
= render "admin/dashboard/head"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
4

Valery Sizov's avatar
Valery Sizov committed
5
%div{ class: container_class }
Annabel Dunstone's avatar
Annabel Dunstone committed
6
  .top-area
7
8
    .prepend-top-default.append-bottom-default
      = form_tag admin_groups_path, method: :get, class: 'js-search-form' do |f|
Annabel Dunstone's avatar
Annabel Dunstone committed
9
        = hidden_field_tag :sort, @sort
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
        .search-holder
          - project_name = params[:name].present? ? params[:name] : nil
          .search-field-holder
            = search_field_tag :name, project_name, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name'
            = icon("search", class: "search-icon")
          .dropdown
            - toggle_text = @sort.present? ? sort_options_hash[@sort] : sort_title_recently_created
            = dropdown_toggle(toggle_text, { toggle: 'dropdown' })
            %ul.dropdown-menu.dropdown-menu-align-right
              %li.dropdown-header
                Sort by
              %li
                = link_to admin_groups_path(sort: sort_value_recently_created, name: project_name) do
                  = sort_title_recently_created
                = link_to admin_groups_path(sort: sort_value_oldest_created, name: project_name) do
                  = sort_title_oldest_created
                = link_to admin_groups_path(sort: sort_value_recently_updated, name: project_name) do
                  = sort_title_recently_updated
                = link_to admin_groups_path(sort: sort_value_oldest_updated, name: project_name) do
                  = sort_title_oldest_updated
          = link_to new_admin_group_path, class: "btn btn-new" do
            New Group
Annabel Dunstone's avatar
Annabel Dunstone committed
32
  %ul.content-list
Valery Sizov's avatar
Valery Sizov committed
33
    = render @groups
34

Annabel Dunstone's avatar
Annabel Dunstone committed
35
  = paginate @groups, theme: "gitlab"