Sha256: b69d01f9169a52227594d0935cfba4b41dcfdeab683ce3ad6a50f6e1d2085930

Contents?: true

Size: 886 Bytes

Versions: 2

Compression:

Stored size: 886 Bytes

Contents

<% if @galleries %>
  <% content_for :head do %>
    <%= stylesheet_link_tag "comfy_gallery/gallery_list" %>
  <% end %>
  <% @galleries.each do |gallery| %>
    <div class="sofa_gallery">
      <div class="photo_preview">
        <% gallery.photos.order(:position).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, gallery_path(gallery) %></h2>
        <p><%= gallery.description.truncate(200) %></p>
        <% if (count = gallery.photos.count) > 0 %>
          <%= link_to "View all #{count} photos.", 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

2 entries across 2 versions & 1 rubygems

Version Path
comfy_gallery-0.1.1 app/views/gallery/_list_galleries.html.erb
comfy_gallery-0.1.0 app/views/gallery/_list_galleries.html.erb