Merge branch 'warn-uncheck-ordered-article' of https://github.com/foodcoop-rostock/foodsoft into foodcoop-rostock-warn-uncheck-ordered-article
This commit is contained in:
commit
b015ceea0b
4 changed files with 39 additions and 17 deletions
|
|
@ -27,10 +27,14 @@
|
|||
= category_name
|
||||
%i.icon-tag
|
||||
- for article in articles
|
||||
/ check if the article is selected
|
||||
- included = @order.article_ids.include?(article.id)
|
||||
- included_class = included ? ' selected' : ''
|
||||
%tr{:class => included_class, :id => article.id.to_s }
|
||||
/ check if the article is selected or has an error
|
||||
- included = @order.article_ids.include?(article.id.to_s)
|
||||
- row_class = ''
|
||||
- if included
|
||||
- row_class = 'selected'
|
||||
- elsif @order.erroneous_article_ids.include?(article.id)
|
||||
- row_class = 'error'
|
||||
%tr{class: row_class, id: article.id}
|
||||
%td= check_box_tag "order[article_ids][]", article.id, included, :id => "checkbox_#{article.id}"
|
||||
%td.click-me{'data-check-this' => "#checkbox_#{article.id}"}= article.name
|
||||
%td=h truncate article.note, :length => 25
|
||||
|
|
@ -52,3 +56,7 @@
|
|||
.form-actions
|
||||
= f.submit class: 'btn'
|
||||
= link_to t('ui.or_cancel'), orders_path
|
||||
- unless @order.erroneous_article_ids.empty?
|
||||
|
||||
= check_box_tag 'order[ignore_warnings]'
|
||||
= t '.ignore_warnings'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue