Sha256: 552690221c7658f82ef8791fdee68a26ea324619283d162f23dd1c63142a813b

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

<% @page_title = "#{@gallery.name}" %>

<% content_for 'tasks' do %>
  <li>
    <%= link_to 'List of Galleries', admin_galleries_url %>
  </li>
  <li>
  <%= link_to "Edit gallery #{@gallery.name}", edit_admin_gallery_url(@gallery) %>
  </li>
  <li>
    <%= link_to 'Add Picture', new_admin_gallery_picture_url(@gallery) %>
  </li>
<% end %>

<h2>Gallery : <%=h @gallery.name %></h2>

<% unless @gallery.description.empty? -%>
  <p>
    <b>Description:</b>
    <%=h @gallery.description %>
  </p>
<% end -%>

<% if @gallery.pictures.empty? -%>
  <p>
    There are no picture in this gallery.
  </p>
<% else %>
  <table id="picture_list">
    <% @pictures.each_slice(3) do |sub_picture|  %>
      <tr>
        <% sub_picture.each do |image| %>
          <td>
            <%= link_to((image_tag image.public_filename(:thumb),
              :alt => image.title),
              admin_gallery_picture_url(@gallery, image),
              :class => 'thumbnail') %>
            <% if image.status %>
              <span class="thumbnail"><%= image.title %></span>
              <br />
              <% image.description %>
            <% else %>
              <span class="thumbnail"><%= image.title %> (disabled)</span>
              <br />
              <% image.description %>
              <%= image_tag '/images/admin/error.png', :class => "no_display" %>
            <% end -%>
          </td>
        <% end %>
      </tr>
    <% end %>
  </table>
  <%= will_paginate @pictures %>
<% end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pictrails-0.5.0 app/views/admin/galleries/show.html.erb