end of day commit

This commit is contained in:
2012-08-29 17:42:04 +02:00
parent 89700f36e9
commit 8213bae2c6
57 changed files with 1109 additions and 128 deletions
+8 -8
View File
@@ -1,5 +1,5 @@
- model_class = Product
div.page-header= title :index, model_class
.page-header= title :index, model_class
- if @products.any?
table.table.table-striped
thead
@@ -9,18 +9,18 @@ div.page-header= title :index, model_class
th= model_class.human_attribute_name(:price)
th= ProductCategory.model_name.human
th= Supplier.model_name.human
th= model_class.human_attribute_name(:created_at)
th=t 'helpers.actions'
th.timestamp= model_class.human_attribute_name(:created_at)
th.actions=t 'helpers.actions'
tbody
- @products.each do |product|
tr
td= link_to product.name, product
td.link= link_to product.name, product
td= product.code
td= product.price
td= link_to_if product.product_category.present?, product.product_category.try(:name), product.product_category
td= link_to_if product.supplier.present?, product.supplier.try(:name), product.supplier
td=l product.created_at, format: :short
td
td.link= link_to_if product.product_category.present?, product.product_category.try(:name), product.product_category
td.link= link_to_if product.supplier.present?, product.supplier.try(:name), product.supplier
td.timestamp=l product.created_at, format: :short
td.actions
= link_to t('helpers.links.edit'), [:edit, product], class: 'btn btn-mini'
'
= link_to t("helpers.links.destroy"), product, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'