This commit is contained in:
Thomas Blazek
2013-08-27 19:39:00 +02:00
parent b92be5b141
commit 8dd2252954
3 changed files with 45 additions and 56 deletions

View File

@@ -1,27 +1,16 @@
<h1>Listing galleries</h1>
<table>
<tr>
<th>Name</th>
<th>Desc</th>
<th>Datum</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @galleries.each do |gallery| %>
<tr>
<td><%= gallery.name %></td>
<td><%= gallery.desc %></td>
<td><%= gallery.datum %></td>
<td><%= link_to 'Show', gallery %></td>
<td><%= link_to 'Edit', edit_gallery_path(gallery) %></td>
<td><%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% @galleries.each_slice(2) do |row| %>
<div class="row-fluid">
<% row.each do |gallery| %>
<div class="span6">
<%=link_to gallery.name, gallery %>
<%= gallery.desc %>
<%= gallery.datum %>
<br>
<%= link_to 'Edit', edit_gallery_path(gallery) %> | <%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %>
</div>
<% end %>
</div>
<% end %>
</table>
<br />
<%= link_to 'New Gallery', new_gallery_path %>

View File

@@ -34,7 +34,7 @@
<% @gallery.fotos.each do |f| %>
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery">
<%=image_tag(f.datei.big_thumb.url,{:class=>"img-polaroid"}) %></a>
<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid"}) %></a>
<% end %>