Added date_available_from to products, updated conditions in product.find_products_fo...
[depot.git] / app / views / products / index.html.erb
index 3e068e6697479b9aa50cf8223096c4bb23567a05..1bed0399ad8347e978c810128e7d7cea163b02d5 100644 (file)
           <% 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>