Skip to content

Commit

Permalink
Merge pull request #2686 from tvdeyen/fix-picture-archive-empty-state
Browse files Browse the repository at this point in the history
Fix layout of empty picture archive
  • Loading branch information
tvdeyen authored Jan 11, 2024
2 parents bb89883 + 53555b5 commit 1ae59b1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions app/views/alchemy/admin/pictures/_archive.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
style: 'float: none'
) %>
</div>
<div id="pictures" class="picture-size--<%= @size %>">
<% if @pictures.blank? and @recent_pictures.blank? and search_filter_params[:q].blank? %>
<%= render_message do %>
<%= Alchemy.t(:no_images_in_archive) %>
Expand All @@ -48,9 +47,10 @@
<%= Alchemy.t(:no_search_results) %>
<% end %>
<% else %>
<%= render partial: 'picture', collection: @pictures %>
<div id="pictures" class="picture-size--<%= @size %>">
<%= render partial: 'picture', collection: @pictures %>
</div>
<% end %>
</div>
<% end %>

<%= paginate @pictures, theme: 'alchemy' %>
19 changes: 16 additions & 3 deletions app/views/alchemy/admin/pictures/_archive_overlay.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,20 @@
<%= render 'tag_list' %>
</div>
</div>
<div id="overlay_picture_list" class="picture-size--<%= @size %>">
<%= render 'overlay_picture_list' %>
</div>
<% if @pictures.empty? %>
<%= render_message do %>
<% if search_filter_params.empty? %>
<%= Alchemy.t(:no_images_in_archive) %>
<% else %>
<%= Alchemy.t(:no_search_results) %>
<% end %>
<% end %>
<% else %>
<div id="overlay_picture_list" class="picture-size--<%= @size %>">
<%= render partial: 'picture_to_assign',
collection: @pictures,
locals: {size: @size} %>
<%= paginate @pictures, theme: 'alchemy', remote: true, hide_per_page_select: true %>
</div>
<% end %>
</div>
10 changes: 0 additions & 10 deletions app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb

This file was deleted.

0 comments on commit 1ae59b1

Please sign in to comment.