layout changes and section handling
This commit is contained in:
@@ -1,25 +1,27 @@
|
||||
- model_class = Section
|
||||
.page-header= title :index, model_class
|
||||
- if @sections.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th.link= model_class.human_attribute_name(:title)
|
||||
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'
|
||||
tbody
|
||||
- @sections.each do |section|
|
||||
.well
|
||||
- if @sections.any?
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
td.link= link_to section.title, [:suppliers, section]
|
||||
td.numeric= section.width
|
||||
td.numeric= section.height
|
||||
td.timestamp=l section.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, section], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= no_content_given model_class
|
||||
= link_to t("helpers.links.new"), new_suppliers_section_path, class: 'btn btn-primary'
|
||||
th.link= model_class.human_attribute_name(:title)
|
||||
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'
|
||||
tbody
|
||||
- @sections.each do |section|
|
||||
tr
|
||||
td.link= link_to section.title, [:suppliers, section]
|
||||
td.numeric= section.width
|
||||
td.numeric= section.height
|
||||
td.timestamp=l section.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, section], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure? }, 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'
|
||||
|
||||
Reference in New Issue
Block a user