Commit 77586e4686b535aa4b4f59b6dda3ba02d85bf97e
1 parent
9afa74df
Exists in
master
and in
28 other branches
Don't display slideshow button for empty galleries
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
app/views/content_viewer/image_gallery.rhtml
| ... | ... | @@ -3,7 +3,11 @@ |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <div class="image-gallery"> |
| 6 | - <p><%= button(:slideshow, _('View slideshow'), @page.url.merge(:slideshow => true))%></p> | |
| 6 | + <% if @images.empty? %> | |
| 7 | + <p><em><%= _('This gallery contains no images yet') %></em></p> | |
| 8 | + <% else %> | |
| 9 | + <p><%= button(:slideshow, _('View slideshow'), @page.url.merge(:slideshow => true))%></p> | |
| 10 | + <% end %> | |
| 7 | 11 | <ul> |
| 8 | 12 | <% @images.each do |a| %> |
| 9 | 13 | <% content_tag('li', :title => a.abstract, :class => 'image-gallery-item' ) do %> | ... | ... |