Sha256: 14c7fa827698f9c7577d2b033b4101dc39536c2d12db3d959a824746caf96234

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

<%= link_to 'Add new gallery', new_admin_gallery_gallery_path, :class => 'big button' %>

<h1>Galleries</h1>

<%= render :partial => 'cms_admin/categories/index', :object => 'SofaGallery::Gallery' if defined?(ComfortableMexicanSofa) %>

<br />

<table class='formatted'>
  <tr>
    <th> Preview </th>
    <th> Name </th>
    <th> Actions </th>
  </tr>
  <% @galleries.each do |gallery| %>
    <tr>
      <td class='preview'>
        <% gallery.photos.limit(1).each do |photo| %>
          <%= image_tag(photo.image.url(:admin_thumb)) %>
        <% end %>
      </td>
      <td class='main'>
        <%= link_to gallery.title, admin_gallery_gallery_photos_path(gallery) %>
      </td>
      <td class='action_links'>
        <%= link_to 'Show Photos', admin_gallery_gallery_photos_path(gallery) %>
        <%= link_to 'Edit', edit_admin_gallery_gallery_path(gallery) %>
        <%= link_to 'Delete', admin_gallery_gallery_path(gallery), :method => :delete, :confirm => 'Are you sure?' %>
      </td>
    </tr>
  <% end %>
</table>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comfy_gallery-0.1.3 app/views/admin/gallery/galleries/index.html.erb
comfy_gallery-0.1.2 app/views/admin/gallery/galleries/index.html.erb