diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-14 14:30:43 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-14 16:05:19 +0100 |
| commit | 991b229c1cf6f25af11b7219e001aa655ad5dbfb (patch) | |
| tree | 8d985d3fdc4ea5b82d8d9994d3f6ce02e18e133d /app | |
| parent | 64e2bca8326bd46a2ad80b6a7a430dea0f81ff6b (diff) | |
| download | operum-991b229c1cf6f25af11b7219e001aa655ad5dbfb.tar.gz operum-991b229c1cf6f25af11b7219e001aa655ad5dbfb.zip | |
Improved the layout on empty searches/things
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/searches/_search.html.erb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/views/searches/_search.html.erb b/app/views/searches/_search.html.erb index a717a22..310988e 100644 --- a/app/views/searches/_search.html.erb +++ b/app/views/searches/_search.html.erb @@ -1,5 +1,14 @@ <div id="items"> - <% items.values.flatten.each do |item| %> - <%= render item %> + <% els = items.values.flatten %> + <% if els.empty? %> + <% if current_user.last_search_id.nil? %> + <p><%= I18n.t('things.none') %> <%= link_to I18n.t('license.here'), new_thing_path %>.</p> + <% else %> + <p><%= I18n.t('searches.none') %>.</p> + <% end %> + <% else %> + <% els.each do |item| %> + <%= render item %> + <% end %> <% end %> </div> |
