Sha256: 63e8ca0100e2b583c1d67f70cdf70f37f4be18a769a01537cdf30c263d78bc6e

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

<% if @gallery %>
  <!--[if IE]>
       <style type="text/css">
           .timer { display: none !important; }
           div.caption { background:transparent; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);zoom: 1; }
      </style>
  <![endif]-->
  <% content_for :head do %>
    <%= javascript_include_tag "sofa_gallery/jquery.orbit-1.2.3.min.js" %>
    <%= stylesheet_link_tag "sofa_gallery/carousel.css" %>
  <% end %>
  <% content_for :doc_ready do %>
    $('#featured').orbit();
  <% end %>
  <% if @gallery.photos.count > 0 %>
    <div id="featured">
      <% @gallery.photos.order(:position).each do |photo| %>
        <%= photo.image.url(:full), :alt => photo.description, :id => dom_id(photo), :"data-caption" => "##{dom_id(photo)}htmlCaption" %>
      <% end %>
    </div>
    <% @gallery.photos.reject{|p| p.description.blank?}.each do |photo| %>
      <span class="orbit-caption" id="<%=dom_id(photo)%>htmlCaption">
        <%= photo.description %>
      </span>
    <% end %>
  <% else %>
    <em>No photos in this gallery.</em>
  <% end %>
<% else %>
  No images were found.
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sofa_gallery-0.0.6 app/views/sofa_gallery/_carousel.html.erb