35 lines
1.6 KiB
Text
35 lines
1.6 KiB
Text
%table.table
|
|
%thead
|
|
%tr
|
|
%th
|
|
%acronym{:title => t('.available_desc')}= t '.available_short'
|
|
%th= t 'simple_form.labels.article.name'
|
|
%th= t 'simple_form.labels.article.unit'
|
|
%th
|
|
%acronym{:title => t('.price_desc')}= t '.price_short'
|
|
%th
|
|
%acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity_short'
|
|
%th
|
|
%acronym{:title => t('.order_number_desc')}= t '.order_number_short'
|
|
%th= t 'simple_form.labels.article.note'
|
|
%th= t 'simple_form.labels.article.article_category'
|
|
%th= t 'simple_form.labels.defaults.tax'
|
|
%th= t 'simple_form.labels.defaults.deposit'
|
|
%tbody
|
|
- @articles.each_with_index do |article, index|
|
|
= fields_for "articles[#{article.id || index}]", article do |form|
|
|
%tr
|
|
%td= form.check_box 'availability'
|
|
%td= form.text_field 'name', class: 'input-medium'
|
|
%td= form.text_field 'unit', class: 'input-mini'
|
|
%td= form.text_field 'price', class: 'input-mini'
|
|
%td= form.text_field 'unit_quantity', class: 'input-mini'
|
|
%td= form.text_field 'order_number', class: 'input-mini'
|
|
%td= form.text_field 'note', class: 'input-medium'
|
|
%td= form.collection_select 'article_category_id', ArticleCategory.all,
|
|
:id, :name, { :include_blank => true }, class: 'input-small'
|
|
%td= form.text_field 'tax', class: 'input-mini'
|
|
%td= form.text_field 'deposit', class: 'input-mini'
|
|
- unless article.errors.empty?
|
|
%tr.alert
|
|
%td(colspan="10")= article.errors.full_messages.join(", ")
|