end of day commit for users and suppliers authenticated handling
This commit is contained in:
@@ -19,7 +19,11 @@
|
||||
.control-group class=(@list.errors[:table_id].any? ? 'error' : nil)
|
||||
= f.label :table_id, Table.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.select :table_id, options_for_select(@tables.map{|a| [a.number, a.id]}), include_blank: nil
|
||||
= f.collection_select :table_id, @tables, :id, :number, include_blank: nil
|
||||
.control-group class=(@list.errors[:supplier_id].any? ? 'error' : nil)
|
||||
= f.label :supplier_id, Supplier.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.collection_select :supplier_id, @suppliers, :id, :name, include_blank: nil
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
|
||||
@@ -9,6 +9,7 @@ div.page-header= title :index, model_class
|
||||
th= model_class.human_attribute_name(:needs_payment)
|
||||
th= model_class.human_attribute_name(:closed_at)
|
||||
th= Table.model_name.human
|
||||
th= Supplier.model_name.human
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
tbody
|
||||
@@ -19,6 +20,7 @@ div.page-header= title :index, model_class
|
||||
td= list.needs_payment
|
||||
td= list.closed_at
|
||||
td= link_to_if list.table.present?, list.table.try(:number), list.table
|
||||
td= link_to_if list.supplier.present?, list.supplier.try(:name), list.supplier
|
||||
td=l list.created_at, format: :short
|
||||
td
|
||||
= link_to t('helpers.links.edit'), [:edit, list], class: 'btn btn-mini'
|
||||
|
||||
@@ -13,6 +13,9 @@ dl.dl-horizontal.show-list
|
||||
- if @list.table.present?
|
||||
dt= Table.model_name.human
|
||||
dd= link_to @list.table.number, @list.table
|
||||
- if @list.supplier.present?
|
||||
dt= Supplier.model_name.human
|
||||
dd= link_to @list.supplier.name, @list.supplier
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), lists_path, class: 'btn'
|
||||
|
||||
Reference in New Issue
Block a user