Skip to content
Snippets Groups Projects
Unverified Commit d860cf0f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Show different not fount message for project labels search


Depends on if prioritised or other labels are found or no labels at all
are found, we show a corresponding message now

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5137df53
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -28,7 +28,6 @@
- if can_admin_label
%p.text-muted
= _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.')
-# Only show it in the first page
- hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
.prioritized-labels{ class: ('hide' if hide) }
Loading
Loading
@@ -54,8 +53,12 @@
- if @available_labels.any?
%h5
= _('Other Labels')
.nothing-here-block
= _('No other labels with such name or description')
.nothing-here-block
= _('No other labels with such name or description')
- else
.nothing-here-block
= _('No labels with such name or description')
 
- else
= render 'shared/empty_states/labels'
Loading
Loading
Loading
Loading
@@ -57,7 +57,7 @@ describe 'Search for labels', :js do
end
 
page.within('.other-labels') do
expect(page).to have_content('No labels with such name or description')
expect(page).to have_content('No other labels with such name or description')
end
end
 
Loading
Loading
@@ -66,7 +66,7 @@ describe 'Search for labels', :js do
find('#label-search').native.send_keys(:enter)
 
page.within('.prioritized-labels') do
expect(page).to have_content('No labels with such name or description')
expect(page).to have_content('No prioritised labels with such name or description')
end
 
page.within('.other-labels') do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment