Merge remote-tracking branch 'bennibu/rails3' into rails3

Conflicts:
	app/controllers/admin/ordergroups_controller.rb
	app/controllers/finance/balancing_controller.rb
	app/controllers/suppliers_controller.rb
	app/views/articles/_article.html.haml
	app/views/finance/balancing/_summary.haml
	app/views/finance/balancing/new.html.haml
	app/views/group_orders/_form.html.haml
	app/views/home/_apple_bar.html.haml
	app/views/suppliers/index.haml
This commit is contained in:
wvengen 2013-03-21 22:08:09 +01:00
commit 7af796c09c
47 changed files with 325 additions and 240 deletions

View file

@ -10,7 +10,7 @@
= link_to t('.add_group'), new_finance_group_order_article_path(order_article_id: order_article.id),
remote: true, class: 'btn btn-mini'
%tbody
- for group_order_article in order_article.group_order_articles.ordered.all(:include => [:group_order])
- for group_order_article in order_article.group_order_articles.select { |goa| goa.result > 0 }
%tr[group_order_article]
%td
%td{:style=>"width:50%"}

View file

@ -24,4 +24,8 @@
%td
= t('.fc_profit')
%small= t('.with_extra_charge')
%td#order_profit.numeric= number_to_currency(order.profit)
%td#order_profit.numeric= number_to_currency(order.profit)
#summaryChangedWarning.alert(style="display:none;")
%strong= t '.changed'
%br/
= link_to t('.reload'), update_summary_finance_order_path(order), remote: true

View file

@ -20,7 +20,7 @@
.well.well-small
%h3= t('.comments')
#comments= render :partial => 'shared/comments', locals: {comments: @order.comments}
#comments= render :partial => 'shared/comments', locals: {comments: @order.comments.includes(:user)}
- content_for :actionbar do
.btn-group
@ -44,4 +44,4 @@
%section#results
= render 'edit_results_by_articles'
%p= link_to_top
%p= link_to_top

View file

@ -0,0 +1 @@
$('#summary').html('#{j(render('finance/balancing/summary', order: @order))}');

View file

@ -1,4 +1,4 @@
$('#modalContainer').modal('hide');
$('#order_article_#{@order_article.id}').html('#{j(render('finance/balancing/order_article', order_article: @order_article))}');
$('#group_order_articles_#{@order_article.id}').html('#{j(render('finance/balancing/group_order_articles', order_article: @order_article))}');
$('#summary').html('#{j(render('finance/balancing/summary', order: @order_article.order))}');
$('#summaryChangedWarning').show();

View file

@ -5,18 +5,20 @@
.modal-body
= form.input :units_to_order
= simple_fields_for @order_article.article do |f|
= simple_fields_for :article, @order_article.article do |f|
= f.input :name
= f.input :order_number
= f.input :unit
= simple_fields_for @order_article.article_price do |f|
= f.input :unit_quantity
= f.input :price
= f.input :tax
= f.input :deposit
= form.input :update_current_price, as: :boolean
- if @order_article.article.is_a?(StockArticle)
%div.alert Preise von Lagerartikeln können nicht geändert werden!
- else
= simple_fields_for :article_price, @order_article.article_price do |f|
= f.input :unit_quantity
= f.input :price
= f.input :tax
= f.input :deposit
= form.input :update_current_price, as: :boolean
.modal-footer
= button_tag t('ui.close'), class: 'btn', data: {dismiss: 'modal'}
= form.submit class: 'btn btn-primary'