Sha256: 4ac0a48723e08e2ef5886bc64f8d110d441a5f8f891ef894d04576e7db620e04

Contents?: true

Size: 898 Bytes

Versions: 3

Compression:

Stored size: 898 Bytes

Contents

<% if @galleries %>
  <% content_for :head do %>
    <%= stylesheet_link_tag "sofa_gallery/gallery_list.css" %>
  <% end %>
  <% @galleries.each do |gallery| %>
    <div class="sofa_gallery">
      <div class="photo_preview">
        <% gallery.photos.limit(6).each do |photo| %>
          <%= image_tag(photo.image.url(:admin_thumb), :alt => photo.description) %>
        <% end %>
      </div>
      <div class="photo_text">
        <h2><%= link_to gallery.title, sofa_gallery_gallery_path(gallery) %></h2>
        <p><%= gallery.description.truncate(200) %></p>
        <% if (count = gallery.photos.count) > 0 %>
          <%= link_to "View all #{count} photos.", sofa_gallery_gallery_path(gallery), :class => 'view_more' %>
        <% else %>
          <em>No photos in this gallery.</em>
        <% end  %>
      </div>
    </div>
  <% end %>
<% else %>
  No galleries were found.
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sofa_gallery-0.0.5 app/views/sofa_gallery/_list_galleries.html.erb
sofa_gallery-0.0.4 app/views/sofa_gallery/_list_galleries.html.erb
sofa_gallery-0.0.3 app/views/sofa_gallery/_list_galleries.html.erb