Sha256: 447b9a22985aa25f5619881866d58f97e6becbf5f34b28068a871f2d3f82176d

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

<h2>Images</h2>
<%=error_message_on :viewable, :images %>
<table class="basic-table">
  <thead>
    <tr>
      <th>Image</th>
      <th>Action</th>
    </tr>
  </thead>
  <tbody>
    <% viewable.images.each do |i| %>
      <tr>
        <td><%= image_tag i.public_filename(:small) %></td>
        <td>
          <%= link_to_remote "Delete",
                             :url => {:controller => 'images', :action => 'delete', :id=> i},
                             :before => "Element.show('img_busy_indicator')", 
                             :complete => "Element.hide('img_busy_indicator')",
                             :confirm => "Are you sure you want to delete this image?",
                             :update => 'image-listing' %>
        </td>
      </tr>
    <% end %>
    <% if viewable.images.empty? %>
      <tr>
        <td colspan="3">None Available.</td>
      </tr>
    <% end %>
  </tbody>
</table>
<% unless viewable.new_record? %>
  <span id="new-img-link">
    <%= link_to_remote "New Image",
                       :url => {:controller => 'images', :action => 'new'},
                       :before => "Element.hide('new-img-link');Element.show('img_busy_indicator')", 
                       :complete => "Element.hide('img_busy_indicator')",
                       :update => 'new-image' %>
  </span>
  <%= image_tag "spinner.gif", :plugin=>"railscart", :style => "display:none", :id => 'img_busy_indicator' %>
<% end %>
<br/>
<div id="new-image"></div>
<br/>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
railscart-0.0.4 starter_app/vendor/plugins/railscart/app/views/shared/_images.html.erb