diff options
author | Camil Staps <info@camilstaps.nl> | 2019-02-01 23:03:28 +0300 |
---|---|---|
committer | Camil Staps <info@camilstaps.nl> | 2019-08-07 21:49:16 +0300 |
commit | c90fdfd8c6ec76551b3e7e9a781115bf024a6949 (patch) | |
tree | 2c5a6a544d85266f1ef43f551b5a43e0c3173d08 /app | |
parent | 1ec8c0e837ff4ba42adbc7cc1e9a15a04f2afd7e (diff) |
Starrers view: fix search icon, change placeholder, fix "no starrers" when search does not match
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/starrers/index.html.haml | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/app/views/projects/starrers/index.html.haml b/app/views/projects/starrers/index.html.haml index 3d39331ec62..94f12908209 100644 --- a/app/views/projects/starrers/index.html.haml +++ b/app/views/projects/starrers/index.html.haml @@ -10,21 +10,24 @@ = form_tag request.original_url, method: :get, class: 'form-inline user-search-form flex-users-form' do .form-group .position-relative - = search_field_tag :search, params[:search], { placeholder: _('Find starrers by name'), class: 'form-control', spellcheck: false } + = search_field_tag :search, params[:search], { placeholder: _('Search'), class: 'form-control', spellcheck: false } %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") } = icon("search") - .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 + .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 - if @starrers.size > 0 .row.prepend-top-10 = render partial: 'starrer', collection: @starrers, as: :starrer = paginate @starrers, theme: 'gitlab' - else - .nothing-here-block Nobody has starred this repository yet + - if params[:search].present? + .nothing-here-block No starrers matched your search + - else + .nothing-here-block Nobody has starred this repository yet |