table management fixes
This commit is contained in:
@@ -77,9 +77,6 @@ html lang="en"
|
||||
= content_for?(:content) ? yield(:content) : yield
|
||||
- if content_for?(:row)
|
||||
.row= yield :row
|
||||
/!
|
||||
Javascripts
|
||||
\==================================================
|
||||
/! Placed at the end of the document so the pages load faster
|
||||
= javascript_include_tag "supplier/application"
|
||||
script#alert-template[type="text/html"]= mustache_template 'supplier/alert'
|
||||
= yield :footer
|
||||
|
||||
@@ -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'}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
- model_class = Section
|
||||
.page-header data-t='section.manage_tables.title' data-t-attributes=%|{"title":"#{@section.title}"}|
|
||||
.page-header
|
||||
h1 data-t='section.manage_tables.title' data-t-attributes=%|{"title":"#{@section.title}"}|
|
||||
- content_for :row do
|
||||
ul.nav.nav-tabs
|
||||
- for section in @section.supplier.sections
|
||||
@@ -22,17 +23,17 @@
|
||||
.table-number = table.number
|
||||
.clearfix
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn'
|
||||
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn', data: {t: 'helpers.links.back'}
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, @section], class: 'btn'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, @section], class: 'btn', data: {t: 'helpers.links.edit'}
|
||||
'
|
||||
= link_to t('supplier.section.tables_view'), [:tables_view, :suppliers, @section], class: [:btn, 'btn-info']
|
||||
= link_to t('supplier.section.tables_view.link'), [:tables_view, :suppliers, @section], class: 'btn btn-info', data: {t: 'section.tables_view.link'}
|
||||
'
|
||||
a.btn href='#add-tables-modal' role='button' data-toggle='modal'= t('supplier.section.add_tables.button_label')
|
||||
a.btn href='#add-tables-modal' role='button' data-toggle='modal' data-t='section.add_tables.button_label' = t('supplier.section.add_tables.button_label')
|
||||
'
|
||||
a.btn href='#arrange-tables-modal' role='button' data-toggle='modal'= t('supplier.section.arrange_tables.button_label')
|
||||
a.btn href='#arrange-tables-modal' role='button' data-toggle='modal' data-t='section.arrange_tables.button_label' = t('supplier.section.arrange_tables.button_label')
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @section], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @section], method: :delete, data: {confirm: are_you_sure?, t: 'helpers.links.destroy' }, class: 'btn btn-danger'
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
var current_section_id = '#{@section.id}';
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
- model_class = Section
|
||||
.page-header= title :show, @section
|
||||
.page-header
|
||||
h1 data-t='section.show.title'
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:title)
|
||||
dt data-t='attributes.section.title' = model_class.human_attribute_name(:title)
|
||||
dd= @section.title
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:width)
|
||||
dt data-t='attributes.section.width' = model_class.human_attribute_name(:width)
|
||||
dd= @section.width
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:height)
|
||||
dt data-t='attributes.section.height' = model_class.human_attribute_name(:height)
|
||||
dd= @section.height
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn'
|
||||
= link_to t("helpers.links.back"), suppliers_sections_path, class: 'btn', data: {t: 'helpers.links.back'}
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, @section], class: 'btn'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, @section], class: 'btn', data: {t: 'helpers.links.edit'}
|
||||
'
|
||||
= link_to t('supplier.section.manage_tables'), [:manage_tables, :suppliers, @section], class: [:btn, 'btn-warning']
|
||||
= link_to t('supplier.section.manage_tables.link'), [:manage_tables, :suppliers, @section], class: 'btn btn-warning', data: {t: 'section.manage_tables.link'}
|
||||
'
|
||||
= link_to t('supplier.section.tables_view'), [:tables_view, :suppliers, @section], class: [:btn, 'btn-info']
|
||||
= link_to t('supplier.section.tables_view.link'), [:tables_view, :suppliers, @section], class: 'btn btn-info', data: {t: 'section.tables_view.link'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @section], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @section], method: :delete, data: {confirm: are_you_sure?, t: 'helpers.links.destroy'}, class: 'btn btn-danger'
|
||||
|
||||
Reference in New Issue
Block a user