Added date_available_from to products, updated conditions in product.find_products_fo...
[depot.git] / app / views / products / index.html.erb
index ef89bd927117f73562e3811e38a1fa5e7205230e..1bed0399ad8347e978c810128e7d7cea163b02d5 100644 (file)
           <dt><%=h product.title %></dt>
           <dd><%=h truncate(product.description.gsub(/<.*?>/, '|'), 
             :length => 80) %></dd>
-          <dd><%=number_to_currency product.price, :unit => "&pound;" %>
+          <dd><%=number_to_currency product.price, :unit => "£" %>
           <% if product.date_available.past? %>
             <dd>Available since <%= product.date_available %></dd>
           <% else %>
             <dd class="unavailable">Available from <%= product.date_available %></dd>
           <% end %>
+          <% if not product.date_available_until.nil? %> 
+            <% if product.date_available_until.future? %>
+              <dd>Available until <%= product.date_available_until %></dd>
+            <% else %>
+              <dd class="unavailable">Unavailable since <%= product.date_available_until %></dd>
+            <% end %>
+          <% end %>
         </dl>
       </td>