summaryrefslogtreecommitdiff
path: root/app/views/explore/groups/index.html.haml
blob: 2ea6cb186558187b19d27566ee9143ebe291b419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.clearfix
  .pull-left
    = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f|
      = hidden_field_tag :sort, @sort
      .form-group
        = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input input-mn-300", id: "groups_search"
      .form-group
        = button_tag 'Search', class: "btn btn-primary wide"

  .pull-right
    .dropdown.inline
      %button.dropdown-toggle.btn{type: 'button', '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 explore_groups_path(sort: sort_value_recently_created) do
            = sort_title_recently_created
          = link_to explore_groups_path(sort: sort_value_oldest_created) do
            = sort_title_oldest_created
          = link_to explore_groups_path(sort: sort_value_recently_updated) do
            = sort_title_recently_updated
          = link_to explore_groups_path(sort: sort_value_oldest_updated) do
            = sort_title_oldest_updated

%hr

%ul.bordered-list
  - @groups.each do |group|
    %li
      .clearfix
        %h4
          = link_to group_path(id: group.path) do
            %i.fa.fa-users
            = group.name
      .clearfix
        %p
          = truncate group.description, length: 150
      .clearfix
        %p.light
          #{pluralize(group.members.size, 'member')}, #{pluralize(group.projects.count, 'project')}
  - unless @groups.present?
    .nothing-here-block No public groups


= paginate @groups, theme: "gitlab"