show title instead of first photo if album has no photos

This commit is contained in:
Espen Antonsen 2009-10-26 16:26:42 +01:00
parent b3be24eca2
commit e040a98bf2

View file

@ -11,7 +11,11 @@
<% form.fields_for :album_list do |album_fields| %>
<span>
<img src="/images/delete-24x24.png" border="" class="delete" />
<% if album.photos.empty? %>
<%= image_tag album.photos.first.path_modified_public('album'), :alt => album.title %>
<% else %>
<%= album.title %>
<% end %>
<%= album_fields.hidden_field album.id %>
</span>
<% end %>