Fixed order views.
This commit is contained in:
parent
88b268cb0b
commit
b3c64ecb85
5 changed files with 11 additions and 9 deletions
|
@ -42,12 +42,12 @@ class OrdersController < ApplicationController
|
||||||
@order= Order.find(params[:id])
|
@order= Order.find(params[:id])
|
||||||
|
|
||||||
if params[:view] # Articles-list will be replaced
|
if params[:view] # Articles-list will be replaced
|
||||||
partial = case params[:view]
|
@partial = case params[:view]
|
||||||
when 'normal' then "articles"
|
when 'normal' then "articles"
|
||||||
when 'groups'then 'shared/articles_by_groups'
|
when 'groups'then 'shared/articles_by_groups'
|
||||||
when 'articles'then 'shared/articles_by_articles'
|
when 'articles'then 'shared/articles_by_articles'
|
||||||
end
|
end
|
||||||
render :partial => partial, :locals => {:order => @order} if partial
|
render :layout => false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
module OrdersHelper
|
module OrdersHelper
|
||||||
|
|
||||||
def update_articles_link(order, text, view)
|
def update_articles_link(order, text, view)
|
||||||
link_to_remote text, :url => order_path(order, :view => view),
|
link_to text, order_path(order, :view => view), :remote => true
|
||||||
:update => 'articles', :before => "Element.show('loader')", :success => "Element.hide('loader')",
|
|
||||||
:method => :get
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to_pdf(order, action)
|
def link_to_pdf(order, action)
|
||||||
|
|
1
app/views/orders/show.js.erb
Normal file
1
app/views/orders/show.js.erb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
$('#articles').html('<%= escape_javascript(render(:partial => @partial, :locals => {:order => @order})) %>');
|
|
@ -287,6 +287,9 @@ de:
|
||||||
last_name: "Nachname"
|
last_name: "Nachname"
|
||||||
order_comment:
|
order_comment:
|
||||||
text: 'Kommentar'
|
text: 'Kommentar'
|
||||||
|
order:
|
||||||
|
starts: "Läuft vom"
|
||||||
|
ends: "Endet am"
|
||||||
|
|
||||||
hints:
|
hints:
|
||||||
tax: 'In Prozent, Standard sind 7,0'
|
tax: 'In Prozent, Standard sind 7,0'
|
||||||
|
|
Loading…
Reference in a new issue