Files
mozo-backend/app/views/suppliers/lists/index.html.slim
T
2013-01-19 17:14:33 +01:00

42 lines
1.7 KiB
Plaintext

- model_class = List
div.page-header= title :index, model_class
form action='' method="get"
input#lists-date type="text" name="date" value=@date.to_s('%Y-%m-%d')
.well
- if @lists.any?
table.table
thead
tr
th= model_class.human_attribute_name(:state)
th= model_class.human_attribute_name(:needs_help)
th= model_class.human_attribute_name(:needs_payment)
th= model_class.human_attribute_name(:closed_at)
th= Table.model_name.human
th.currency= model_class.human_attribute_name(:price)
th.timestamp= model_class.human_attribute_name(:created_at)
th.actions=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=l list.closed_at, format: :short
td= link_to_if list.table.present?, list.table.try(:number), [:suppliers, list.table]
td.currency= list.price.present? ? currency(list.price) : '...'
td.timestamp=l list.created_at, format: :short
td.actions
= link_to t('helpers.links.edit'), [:edit, :suppliers, list], class: 'btn btn-mini'
'
= link_to t("helpers.links.destroy"), [:suppliers, list], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
- else
= no_content_given model_class
- content_for :footer do
javascript:
$('#lists-date').datepicker({
dateFormat: 'yy-mm-dd',
onSelect: function(dateText, inst){
$(this).parents('form').submit();
}
})