Supplier mail changing and polishing
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th data-t='attributes.list.state' = List.human_attribute_name(:state)
|
||||
th data-t='attributes.list.needs_help' = List.human_attribute_name(:needs_help)
|
||||
th data-t='attributes.list.needs_payment' = List.human_attribute_name(:needs_payment)
|
||||
th data-t='attributes.list.closed_at' = List.human_attribute_name(:closed_at)
|
||||
th data-t='models.table' = Table.model_name.human
|
||||
th.currency data-t='attributes.list.price' = List.human_attribute_name(:price)
|
||||
th.timestamp data-t='attributes.list.created_at' = List.human_attribute_name(:created_at)
|
||||
th.actions data-t='helpers.actions.title' =t 'helpers.actions.title'
|
||||
tbody
|
||||
- lists.each do |list|
|
||||
tr
|
||||
td= link_to list.state, [:suppliers, list]
|
||||
td=show_boolean list.needs_help
|
||||
td=show_boolean list.needs_payment
|
||||
td.timestamp data-time=list.closed_at.try(:utc).try(:iso8601)
|
||||
td= link_to_if list.table.present?, list.table_number, [:suppliers, list.table]
|
||||
td.currency= list.price.present? ? currency(list.price) : '...'
|
||||
td.timestamp data-time=list.created_at.utc.iso8601
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, list], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, list], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger', data: {t: 'helpers.links.destroy'}
|
||||
@@ -0,0 +1,7 @@
|
||||
- model_class = List
|
||||
div.page-header= title :index, model_class
|
||||
.well
|
||||
- if @lists.any?
|
||||
= render 'lists_table', lists: @lists
|
||||
- else
|
||||
= no_content_given model_class
|
||||
@@ -0,0 +1,12 @@
|
||||
- model_class = List
|
||||
div.page-header= title :index, model_class
|
||||
form#select-date-form.form-inline action='' method="get"
|
||||
label for="lists-date" data-t="lists.index.show_list_on_day"
|
||||
input#lists-date.datepicker type="text" name="date" value=@date.to_s('%Y-%m-%d')
|
||||
.well
|
||||
- if @lists.any?
|
||||
= render 'lists_table', lists: @lists
|
||||
- else
|
||||
= no_content_given model_class
|
||||
javascript:
|
||||
window.datepicker_options['onSelect'] = function(dateText, inst){$('#select-date-form').submit()}
|
||||
@@ -1,39 +1,7 @@
|
||||
- model_class = List
|
||||
div.page-header= title :index, model_class
|
||||
form#select-date-form action='' method="get"
|
||||
- if params[:show_all] == 'yes'
|
||||
- else
|
||||
input#lists-date.datepicker type="text" name="date" value=@date.to_s('%Y-%m-%d')
|
||||
= link_to '', {show_all: 'yes'}, class: 'btn', data: {t: 'lists.index.show_all'}
|
||||
div.page-header= title :index, List
|
||||
.well
|
||||
- if @lists.any?
|
||||
= paginate @lists if params[:show_all] == 'yes'
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th data-t='attributes.list.state' = model_class.human_attribute_name(:state)
|
||||
th data-t='attributes.list.needs_help' = model_class.human_attribute_name(:needs_help)
|
||||
th data-t='attributes.list.needs_payment' = model_class.human_attribute_name(:needs_payment)
|
||||
th data-t='attributes.list.closed_at' = model_class.human_attribute_name(:closed_at)
|
||||
th data-t='models.table' = Table.model_name.human
|
||||
th.currency data-t='attributes.list.price' = model_class.human_attribute_name(:price)
|
||||
th.timestamp data-t='attributes.list.created_at' = model_class.human_attribute_name(:created_at)
|
||||
th.actions data-t='helpers.actions.title' =t 'helpers.actions.title'
|
||||
tbody
|
||||
- @lists.each do |list|
|
||||
tr
|
||||
td= link_to list.state, [:suppliers, list]
|
||||
td=show_boolean list.needs_help
|
||||
td=show_boolean list.needs_payment
|
||||
td.timestamp data-time=list.closed_at.try(:utc).try(:iso8601)
|
||||
td= link_to_if list.table.present?, list.table_number, [:suppliers, list.table]
|
||||
td.currency= list.price.present? ? currency(list.price) : '...'
|
||||
td.timestamp data-time=list.created_at.utc.iso8601
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, list], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, list], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger', data: {t: 'helpers.links.destroy'}
|
||||
= paginate @lists
|
||||
= render 'lists_table', lists: @lists
|
||||
- else
|
||||
= no_content_given model_class
|
||||
javascript:
|
||||
window.datepicker_options['onSelect'] = function(dateText, inst){$('#select-date-form').submit()}
|
||||
= no_content_given List
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
dl.dl-horizontal
|
||||
dt= List.human_attribute_name(:created_at)
|
||||
dd= l @list.created_at, format: :short
|
||||
dt= t('supplier.lists.show.users')
|
||||
dd= @list.users.map(&:supplier_name).join(', ')
|
||||
.well
|
||||
table#list-table.table.list-table
|
||||
thead
|
||||
|
||||
Reference in New Issue
Block a user