summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-01-27 12:20:55 +0100
committerCamil Staps <info@camilstaps.nl>2019-08-07 20:49:14 +0200
commitb74c5dbcd18a0d81189a9631504c0c9baf5c21be (patch)
tree06007c8475ada601e1af3abdd410b7d7de4b13a3 /app
parent5e131bcaf19a91b96e7f1adb55fcd93c466e7d46 (diff)
downloadgitlab-ce-b74c5dbcd18a0d81189a9631504c0c9baf5c21be.tar.gz
Add message on starrers view when nobody has starred a repository yet
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/starrers/index.html.haml40
1 files changed, 22 insertions, 18 deletions
diff --git a/app/views/projects/starrers/index.html.haml b/app/views/projects/starrers/index.html.haml
index 7f7e0a93f14..25de8b5afa9 100644
--- a/app/views/projects/starrers/index.html.haml
+++ b/app/views/projects/starrers/index.html.haml
@@ -5,21 +5,25 @@
%span.flex-project-title
= _("Starrers of <strong>%{project_name}</strong>").html_safe % { project_name: sanitize_project_name(@project.name) }
%span.badge.badge-pill= @starrers.size
- .nav-controls
- = 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 }
- %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") }
- = icon("search")
- .dropdown.inline.user-sort-dropdown
- = dropdown_toggle(users_sort_options_hash[@sort], { toggle: 'dropdown' })
- %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
- %li.dropdown-header
- = _("Sort by")
- - users_sort_options_hash.each do |value, title|
- %li
- = link_to filter_user_path(sort: value), class: ("is-active" if @sort == value) do
- = title
-.row.prepend-top-10
- = render partial: 'starrer', collection: @starrers, as: :user
+ - if @starrers.size > 0
+ .nav-controls
+ = 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 }
+ %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") }
+ = icon("search")
+ .dropdown.inline.user-sort-dropdown
+ = dropdown_toggle(users_sort_options_hash[@sort], { toggle: 'dropdown' })
+ %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
+ %li.dropdown-header
+ = _("Sort by")
+ - users_sort_options_hash.each do |value, title|
+ %li
+ = link_to filter_user_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: :user
+-else
+ .nothing-here-block Nobody has starred this repository yet