Fixed some bugs in orders lists. Closes #3

This commit is contained in:
Benjamin Meichsner 2009-04-20 14:11:11 +02:00
parent e71cacfe50
commit 4db8184daa
5 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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}