Commit d860cf0f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
- if can_admin_label - if can_admin_label
%p.text-muted %p.text-muted
= _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.') = _('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 -# Only show it in the first page
- hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')
.prioritized-labels{ class: ('hide' if hide) } .prioritized-labels{ class: ('hide' if hide) }
...@@ -54,8 +53,12 @@ ...@@ -54,8 +53,12 @@
- if @available_labels.any? - if @available_labels.any?
%h5 %h5
= _('Other Labels') = _('Other Labels')
.nothing-here-block .nothing-here-block
= _('No other labels with such name or description') = _('No other labels with such name or description')
- else
.nothing-here-block
= _('No labels with such name or description')
- else - else
= render 'shared/empty_states/labels' = render 'shared/empty_states/labels'
......
...@@ -57,7 +57,7 @@ describe 'Search for labels', :js do ...@@ -57,7 +57,7 @@ describe 'Search for labels', :js do
end end
page.within('.other-labels') do 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
end end
...@@ -66,7 +66,7 @@ describe 'Search for labels', :js do ...@@ -66,7 +66,7 @@ describe 'Search for labels', :js do
find('#label-search').native.send_keys(:enter) find('#label-search').native.send_keys(:enter)
page.within('.prioritized-labels') do 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 end
page.within('.other-labels') do page.within('.other-labels') do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment