<%= image_tag product.image_url, :class => 'list-image' %>
|
- <%=h product.title %>
- <%=h truncate(product.description.gsub(/<.*?>/, '|'),
:length => 80) %>
- <%=number_to_currency product.price, :unit => "£" %>
<% if product.date_available.past? %>
- Available since <%= product.date_available %>
<% else %>
- Available from <%= product.date_available %>
<% end %>
<% if not product.date_available_until.nil? %>
<% if product.date_available_until.future? %>
- Available until <%= product.date_available_until %>
<% else %>
- Unavailable since <%= product.date_available_until %>
<% end %>
<% end %>
|
<%= link_to 'Show', product %>
<%= link_to 'Edit', edit_product_path(product) %>
<%= link_to 'Destroy', product, :confirm => 'Are you sure?', :method => :delete %>
|
<% end %>