add availability to article edit dialog

This commit is contained in:
wvengen 2013-12-06 14:33:51 +01:00
parent 923b579bd1
commit c99aa7aab6
2 changed files with 12 additions and 4 deletions

View file

@ -248,6 +248,14 @@ tr.unavailable {
margin: 0; margin: 0;
} }
.inline-inputs {
.control-label {
width: auto;
float: none;
display: inline;
}
}
// inputs that are "in the background" - less visible // inputs that are "in the background" - less visible
.less-visible { .less-visible {
color: #ddd; color: #ddd;

View file

@ -5,7 +5,7 @@
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'} = link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
%h3= @article.new_record? ? t('.title_new') : t('.title_edit') %h3= @article.new_record? ? t('.title_new') : t('.title_edit')
.modal-body .modal-body
/= f.input :availability = f.input :availability
= f.input :name = f.input :name
= f.input :unit do = f.input :unit do
.inline-inputs .inline-inputs
@ -13,11 +13,9 @@
× ×
= f.input_field :unit, class: 'input-mini', title: Article.human_attribute_name(:unit) = f.input_field :unit, class: 'input-mini', title: Article.human_attribute_name(:unit)
%span#unit_divide_container.less-visible %span#unit_divide_container.less-visible
 per  = f.label :unit, label: " per ".html_safe
= f.input_field :unit, class: 'input-mini', id: 'article_unit_divide' = f.input_field :unit, class: 'input-mini', id: 'article_unit_divide'
= f.input :origin
= f.input :manufacturer
= f.input :note = f.input :note
= f.association :article_category = f.association :article_category
/ TODO labels / TODO labels
@ -42,6 +40,8 @@
= Article.human_attribute_name(:fc_price) = Article.human_attribute_name(:fc_price)
%span#fc_price= number_to_currency(@article.fc_price) rescue nil %span#fc_price= number_to_currency(@article.fc_price) rescue nil
= f.input :origin
= f.input :manufacturer
= f.input :order_number = f.input :order_number
.modal-footer .modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'} = link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}