index.html.haml 1.46 KB
Newer Older
1 2 3 4
- page_title _("Starrers")

.top-area.adjust
  .nav-text
5 6
    - full_count_title = "#{@public_count} public and #{@private_count} private"
    #{pluralize(@total_count, 'starrer')}: #{full_count_title}
7
  - if @starrers.size > 0 || params[:search].present?
8 9 10 11
    .nav-controls
      = form_tag request.original_url, method: :get, class: 'form-inline user-search-form flex-users-form' do
        .form-group
          .position-relative
12
            = search_field_tag :search, params[:search], { placeholder: _('Search'), class: 'form-control', spellcheck: false }
13 14
            %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") }
              = icon("search")
15 16 17 18 19 20 21 22 23
          .dropdown.inline.user-sort-dropdown
            = dropdown_toggle(starrers_sort_options_hash[@sort], { toggle: 'dropdown' })
            %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
              %li.dropdown-header
                = _("Sort by")
              - starrers_sort_options_hash.each do |value, title|
                %li
                  = link_to filter_starrer_path(sort: value), class: ("is-active" if @sort == value) do
                    = title
24 25
- if @starrers.size > 0
  .row.prepend-top-10
26
    = render partial: 'starrer', collection: @starrers, as: :starrer
27
  = paginate @starrers, theme: 'gitlab'
Camil Staps's avatar
Camil Staps committed
28
- else
29 30 31 32
  - if params[:search].present?
    .nothing-here-block No starrers matched your search
  - else
    .nothing-here-block Nobody has starred this repository yet