Add message on starrers view when nobody has starred a repository yet

This commit is contained in:
Camil Staps 2019-01-27 12:20:55 +01:00
parent 5e131bcaf1
commit b74c5dbcd1
No known key found for this signature in database
GPG Key ID: 4A9BFD4F6A415F83
1 changed files with 22 additions and 18 deletions

View File

@ -5,6 +5,7 @@
%span.flex-project-title %span.flex-project-title
= _("Starrers of <strong>%{project_name}</strong>").html_safe % { project_name: sanitize_project_name(@project.name) } = _("Starrers of <strong>%{project_name}</strong>").html_safe % { project_name: sanitize_project_name(@project.name) }
%span.badge.badge-pill= @starrers.size %span.badge.badge-pill= @starrers.size
- if @starrers.size > 0
.nav-controls .nav-controls
= form_tag request.original_url, method: :get, class: 'form-inline user-search-form flex-users-form' do = form_tag request.original_url, method: :get, class: 'form-inline user-search-form flex-users-form' do
.form-group .form-group
@ -21,5 +22,8 @@
%li %li
= link_to filter_user_path(sort: value), class: ("is-active" if @sort == value) do = link_to filter_user_path(sort: value), class: ("is-active" if @sort == value) do
= title = title
.row.prepend-top-10 - if @starrers.size > 0
.row.prepend-top-10
= render partial: 'starrer', collection: @starrers, as: :user = render partial: 'starrer', collection: @starrers, as: :user
-else
.nothing-here-block Nobody has starred this repository yet