End of day commit

This commit is contained in:
2014-07-29 22:01:46 +02:00
parent f780dfc529
commit 640dbc37b8
9 changed files with 70 additions and 40 deletions
+37 -35
View File
@@ -1,35 +1,37 @@
- model_class = Table
div.page-header= title :index, model_class
= form_tag({}, method: :get) do
label.number for="filter-from_number" data-t="attributes.table.from_number"
input#filter-from_number.number type="number" size=4 value=params[:from_number] name="from_number"
label.number for="filter-to_number" data-t="attributes.table.to_number"
input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
'
= submit_tag 'Filter', class: 'apply-filter'
- if @tables.any?
= paginate @tables
table.table
thead
tr
th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
th.link data-t="models.section"= Section.model_name.human
th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
tbody
- @tables.each do |table|
tr
td.link= link_to table.number, [:suppliers, table]
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
td.actions
= link_to [:edit, :suppliers, table], class: 'table-edit' do
span data-title="helpers.links.edit"
= link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
span data-title="helpers.links.destroy"
- else
= no_content_given model_class
= supplier_form_actions :new, for: :tables do
= link_to qr_codes_suppliers_tables_path(params.slice(:from_number, :to_number)), class: 'form-action-qr-codes', target: :_blank
span data-t="tables.qr_codes.link"
- content_for :head do
= javascript_include_tag 'supplier/app/application'
/ - model_class = Table
/ div.page-header= title :index, model_class
/ = form_tag({}, method: :get) do
/ label.number for="filter-from_number" data-t="attributes.table.from_number"
/ input#filter-from_number.number type="number" size=4 value=params[:from_number] name="from_number"
/ label.number for="filter-to_number" data-t="attributes.table.to_number"
/ input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
/ '
/ = submit_tag 'Filter', class: 'apply-filter'
/ - if @tables.any?
/ = paginate @tables
/ table.table
/ thead
/ tr
/ th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
/ th.link data-t="models.section"= Section.model_name.human
/ th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
/ th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
/ tbody
/ - @tables.each do |table|
/ tr
/ td.link= link_to table.number, [:suppliers, table]
/ td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
/ td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
/ td.actions
/ = link_to [:edit, :suppliers, table], class: 'table-edit' do
/ span data-title="helpers.links.edit"
/ = link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
/ span data-title="helpers.links.destroy"
/ - else
/ = no_content_given model_class
/
/ = supplier_form_actions :new, for: :tables do
/ = link_to qr_codes_suppliers_tables_path(params.slice(:from_number, :to_number)), class: 'form-action-qr-codes', target: :_blank
/ span data-t="tables.qr_codes.link"