Created
February 3, 2014 21:22
-
-
Save felipecabargas/8792689 to your computer and use it in GitHub Desktop.
Hola
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% content_for :page_title do %> | |
<%= Spree.t(:listing_featured_items) %> | |
<% end %> | |
<% content_for :page_actions do %> | |
<li> | |
<%= button_link_to Spree.t(:new_item), new_admin_item_path, :icon => 'icon-plus', :id => 'admin_new_item' %> | |
</li> | |
<% end if can? :edit, Spree::Item.new %> | |
<% if @items.count != 0 %> | |
<table> | |
<thead> | |
<tr> | |
<th>IMAGE</th> | |
<th>Name</th> | |
<th>Description</th> | |
<th>SHOW</th> | |
<th>EDIT</th> | |
<th>DELETE</th> | |
</tr> | |
</thead> | |
<tbody> | |
<% @items.each do |item| %> | |
<tr> | |
<td><%= image_tag item.marketing_image, :style => "height: 50px;" %></td> | |
<td><%= item.name %></td> | |
<td><%= item.description %></td> | |
<td><%= link_to 'Show', spree.admin_item_path(item) %></td> | |
<td><%= link_to 'Edit', spree.edit_admin_item_path(item) %></td> | |
<td><%= link_to 'Destroy', spree.admin_item_path(item), method: :delete, data: { confirm: 'Are you sure?' } %></td> | |
</tr> | |
<% end %> | |
</tbody> | |
</table> | |
<% else %> | |
<div class="alpha twelve columns no-objects-found"> | |
<%= Spree.t(:no_resource_found, resource: "featured items") %>, | |
<%= link_to Spree.t(:add_one), spree.new_admin_item_path %>! | |
</div> | |
<% end %> | |
<br> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment