refactored some js stuff. Fixed forms in article modul.
This commit is contained in:
parent
9388e918a7
commit
1e33411516
25 changed files with 184 additions and 249 deletions
20
app/views/articles/_article.html.haml
Normal file
20
app/views/articles/_article.html.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
%tr{ :class => cycle('even','odd') + row_classes(article)}[article]
|
||||
%td= check_box_tag 'selected_articles[]', article.id.to_s, false, {:id => "checkbox_#{article.id}", 'data-ignore-onchange' => true}
|
||||
%td{'data-check-this' => "#checkbox_#{article.id}", :class => 'click-me'}= article.name
|
||||
%td= article.origin
|
||||
%td= truncate(article.article_category.name, :length => 11) if article.article_category
|
||||
%td= article.unit
|
||||
%td= truncate(article.note, :length => 11)
|
||||
%td= article.unit_quantity
|
||||
%td{:class => "currency"}
|
||||
%acronym{:title => "zuletzt geändert: #{format_date(article.updated_at)} | Brutto: #{number_to_currency(article.gross_price)}"}
|
||||
= number_to_currency(article.price)
|
||||
%td= number_to_percentage(article.tax) if article.tax != 0
|
||||
%td= number_to_currency(article.deposit) if article.deposit != 0
|
||||
%td
|
||||
= link_to icon(:edit), edit_supplier_article_path(@supplier, article),
|
||||
:remote => true
|
||||
= link_to icon(:delete), [@supplier, article],
|
||||
:method => :delete, :confirm => 'Bist du sicher?', :remote => true
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue