index.html.haml 2.01 KB
Newer Older
1
%h3.page-title
2
  Groups (#{@groups.total_count})
3
  = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
4
5
6
7
8
9

%p.light
  Group allows you to keep projects organized.
  Use groups for uniting related projects.

%hr
10
= form_tag admin_groups_path, method: :get, class: 'form-inline' do
11
  = hidden_field_tag :sort, @sort
12
  .form-group
13
    = text_field_tag :name, params[:name], class: "form-control input-mn-300"
14
  = button_tag "Search", class: "btn submit btn-primary"
15

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  .pull-right
    .dropdown.inline
      %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
        %span.light sort:
        - if @sort.present?
          = sort_options_hash[@sort]
        - else
          = sort_title_recently_created
        %b.caret
      %ul.dropdown-menu
        %li
          = link_to admin_groups_path(sort: sort_value_recently_created) do
            = sort_title_recently_created
          = link_to admin_groups_path(sort: sort_value_oldest_created) do
            = sort_title_oldest_created
          = link_to admin_groups_path(sort: sort_value_recently_updated) do
            = sort_title_recently_updated
          = link_to admin_groups_path(sort: sort_value_oldest_updated) do
            = sort_title_oldest_updated

36
%hr
37

38
%ul.bordered-list
39
  - @groups.each do |group|
40
41
42
    %li
      .clearfix
        .pull-right.prepend-top-10
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
43
44
          = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-sm"
          = link_to 'Destroy', [:admin, group], data: {confirm: "REMOVE #{group.name}? Are you sure?"}, method: :delete, class: "btn btn-sm btn-remove"
45
46
47

        %h4
          = link_to [:admin, group] do
48
            %i.fa.fa-folder
49
50
51
52
53
54
55
56
            = group.name

          →
          %span.monospace
            %strong #{group.path}/
      .clearfix
        %p
          = truncate group.description, length: 150
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
57
58
59
60
      .clearfix
        %p.light
          #{pluralize(group.members.size, 'member')}, #{pluralize(group.projects.count, 'project')}

61

62
= paginate @groups, theme: "gitlab"