table management fixes

This commit is contained in:
2013-01-12 13:34:00 +01:00
parent f6b28f84f0
commit b02951aaec
17 changed files with 164 additions and 76 deletions
+12 -10
View File
@@ -5,12 +5,12 @@
table.table
thead
tr
th.link= model_class.human_attribute_name(:title)
th.table-info= Table.model_name.human_plural
th.numeric= model_class.human_attribute_name(:width)
th.numeric= model_class.human_attribute_name(:height)
th.timestamp= model_class.human_attribute_name(:created_at)
th.actions=t 'helpers.actions'
th.link data-t='attributes.section.title' = model_class.human_attribute_name(:title)
th.table-info data-t='models.plural.table' = Table.model_name.human_plural
th.numeric data-t='attributes.section.width' = model_class.human_attribute_name(:width)
th.numeric data-t='attributes.section.height' = model_class.human_attribute_name(:height)
th.timestamp data-t='attributes.section.created_at' = model_class.human_attribute_name(:created_at)
th.actions data-t='helpers.actions' = t 'helpers.actions'
tbody
- @sections.each do |section|
tr
@@ -22,12 +22,14 @@
td.numeric= section.height
td.timestamp=l section.created_at, format: :short
td.actions
= link_to t('supplier.section.tables_view'), [:tables_view, :suppliers, section], class: [:btn, 'btn-mini btn-info']
= link_to t('supplier.section.tables_view.link'), [:tables_view, :suppliers, section], class: 'btn btn-mini btn-info', data: {t: 'section.tables_view.link'}
'
= link_to t('helpers.links.edit'), [:edit, :suppliers, section], class: 'btn btn-mini'
= link_to t('supplier.section.manage_tables.link'), [:manage_tables, :suppliers, section], class: 'btn btn-mini btn-warning', data: {t: 'section.manage_tables.link'}
'
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
= link_to t('helpers.links.edit'), [:edit, :suppliers, section], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
'
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure?, t: 'helpers.links.destroy'}, class: 'btn btn-mini btn-danger'
- else
= no_content_given model_class
.form-actions
= link_to t("helpers.links.new"), new_suppliers_section_path, class: 'btn btn-primary'
= link_to t("helpers.links.new"), new_suppliers_section_path, class: 'btn btn-primary', data: {t: 'helpers.links.new'}