Fixed some bugs in orders lists. Closes #3
This commit is contained in:
parent
e71cacfe50
commit
4db8184daa
5 changed files with 7 additions and 7 deletions
|
@ -169,7 +169,7 @@ class OrderingController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.html # myOrders.haml
|
||||
format.js { render :partial => "orders" }
|
||||
format.js { render :partial => "orders", :locals => {:orders => @closed_orders, :pagination => true} }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class OrdersController < ApplicationController
|
|||
format.html
|
||||
format.js do
|
||||
render :update do |page|
|
||||
page.replace_html 'orders_table', :partial => "list"
|
||||
page.replace_html 'orders_table', :partial => "orders"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- if controller.action_name == 'myOrders'
|
||||
- if pagination
|
||||
= pagination_links_remote @closed_orders, :per_page => 10, :update => 'closed_orders'
|
||||
%table.list
|
||||
%thead
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
.box_title
|
||||
%h2 Nicht abgerechnete Bestellungen
|
||||
.column_content
|
||||
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed}
|
||||
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
|
||||
- if @ordergroup.value_of_finished_orders > 0
|
||||
%p
|
||||
Gesamtsumme:
|
||||
|
@ -39,6 +39,6 @@
|
|||
.box_title
|
||||
%h2 Abgerechnete Bestellungen
|
||||
.column_content
|
||||
= render :partial => "orders", :locals => {:orders => Order.closed.all(:limit => 5)}
|
||||
= render :partial => "orders", :locals => {:orders => Order.closed.all(:limit => 5), :pagination => false}
|
||||
%br/
|
||||
= link_to "mehr...", :action => "myOrders"
|
|
@ -7,11 +7,11 @@
|
|||
.box_title
|
||||
%h2 beendet/nicht abgerechnet
|
||||
.column_content
|
||||
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed}
|
||||
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
|
||||
|
||||
.single_column{:style => "width:50em"}
|
||||
.box_title
|
||||
%h2 abgerechnet
|
||||
.column_content
|
||||
#closed_orders
|
||||
= render :partial => "orders", :locals => {:orders => @closed_orders}
|
||||
= render :partial => "orders", :locals => {:orders => @closed_orders, :pagination => true}
|
||||
|
|
Loading…
Reference in a new issue