Sha256: 7ba2dfb643e2224d7fdf274b2859c3ec65bcf48579e626c4006575952f2f54ca

Contents?: true

Size: 956 Bytes

Versions: 2

Compression:

Stored size: 956 Bytes

Contents

<% if @gallery %>
  <% content_for :head do %>
    <%= stylesheet_link_tag "comfy_gallery/thumbnails.css" %>
    <%= javascript_include_tag "comfy_gallery/thumbnails.js" %>
  <% end %>
  <ul id="<%= dom_id(@gallery)%>" class="gallery">
    <h2><%= @gallery.title %></h2>
    <p><%= @gallery.description %></p>
    <br />
    <% if @gallery.photos.count > 0 %>
      <% @gallery.photos.order(:position).each do |photo| %>
        <li id="<%= dom_id(photo) %>">
          <div class="photo" style="width: <%= @gallery.thumb_width %>px; height: <%= @gallery.thumb_height %>px;">
            <%= link_to photo.image.url(:full), :rel => "prettyPhoto[pp_gal]", :title => photo.description do %>
              <%= image_tag(photo.image.url(:thumb), :alt => photo.title) %>
            <% end %>
          </div>
        </li>
      <% end %>
    <% else %>
      <em>No photos in this gallery.</em>
    <% end  %>
  </ul>
<% else %>
  Gallery not found.
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

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