projects
/
depot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added availability date to product table
[depot.git]
/
app
/
views
/
products
/
index.html.erb
diff --git
a/app/views/products/index.html.erb
b/app/views/products/index.html.erb
index 1db53b8ae0b6cd45edcbf1a908b3dbc492abb82f..6bb547aa96d8023ebc9d510494ba5354c34bb5c2 100644
(file)
--- a/
app/views/products/index.html.erb
+++ b/
app/views/products/index.html.erb
@@
-14,6
+14,11
@@
<dt><%= h product.title %></dt>
<dd><%= h truncate(product.description.gsub(/<.*?>/, ''),
:length => 80) %></dd>
<dt><%= h product.title %></dt>
<dd><%= h truncate(product.description.gsub(/<.*?>/, ''),
:length => 80) %></dd>
+ <% if product.date_available.past? %>
+ <dd>Available since <%= product.date_available %></dd>
+ <% else %>
+ <dd class="unavailable">Available from <%= product.date_available %></dd>
+ <% end %>
</dl>
</td>
</dl>
</td>