Simplifiying balancing view part 2. Lets call it finished.

This commit is contained in:
benni 2012-07-27 18:03:46 +02:00
parent dc0d1b3e46
commit af3c07f031
26 changed files with 185 additions and 219 deletions

View file

@ -7,7 +7,7 @@
%td Einheiten
%td Gesamtpreis
%td{:colspan => "3",:style => "width:14em"}
= link_to '[Gruppe hinzufügen]', new_finance_group_order_article_path(order_id: order_article.order_id),
= link_to '[Gruppe hinzufügen]', new_finance_group_order_article_path(order_article_id: order_article.id),
remote: true
%tbody
- for group_order_article in order_article.group_order_articles.ordered.all(:include => [:group_order])
@ -17,19 +17,17 @@
= group_order_article.group_order.ordergroup.name
%td{:id => "group_order_article_#{group_order_article.id}_quantity", :style => "white-space:nowrap"}
= group_order_article.result
/= button_to_remote( "+", :url => {:action => "update_group_order_article_result", :id => group_order_article, :modifier => '+'}, :html => {:style => "float:left"}, :success => "Element.hide('loader');", :before => "Element.show('loader');")
/= button_to_remote( "-", :url => {:action => "update_group_order_article_result", :id => group_order_article, :modifier => '-'}, :success => "Element.hide('loader');", :before => "Element.show('loader');")
= button_to "+", update_result_finance_group_order_article_path(group_order_article, modifier: '+'),
method: :put, remote: true, style: 'float:left'
= button_to "-", update_result_finance_group_order_article_path(group_order_article, modifier: '-'),
method: :put, remote: true
%td.currency
= number_to_currency(group_order_article.order_article.price.fc_price * group_order_article.result, :unit => "")
%td.actions{:style=>"width:1em"}
= link_to icon(:edit), '#'
/:update => 'edit_box', |
/:url => {:action => 'edit_group_order_article', :id => group_order_article}, |
/:success => "Element.hide('loader'); Element.show('edit_box')" |
= link_to icon(:edit), edit_finance_group_order_article_path(group_order_article), remote: true
%td.actions{:style=>"width:1em"}
= link_to icon(:delete), '#'
/:url => {:action => 'destroy_group_order_article', :id => group_order_article}, |
/:confirm => 'Bist du sicher?', :method => 'post' |
= link_to icon(:delete), finance_group_order_article_path(group_order_article), method: :delete,
remote: true
%td
%tfoot
%tr{:class => cycle('even', 'odd', :name => 'results')}