Fixed order views.
This commit is contained in:
parent
88b268cb0b
commit
b3c64ecb85
5 changed files with 11 additions and 9 deletions
86
app/views/orders/show.html.haml
Normal file
86
app/views/orders/show.html.haml
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
- title "Bestellung: #{@order.name}"
|
||||
#element_navigation
|
||||
= link_to_unless @order.previous == @order, "<< #{@order.previous.name}", @order.previous
|
||||
|
|
||||
= link_to "Übersicht", orders_path
|
||||
|
|
||||
= link_to_unless @order.next == @order, "#{@order.next.name} >>", @order.next
|
||||
|
||||
// Order summary
|
||||
.left_column{:style => "width:65em"}
|
||||
.box_title
|
||||
%h2 Zusammenfassung
|
||||
.column_content
|
||||
- if @order.finished? and !@order.closed?
|
||||
%p
|
||||
%b{:style => "color:red"} Bestellung wurde noch nicht abgerechnet.
|
||||
%p
|
||||
Lieferantin:
|
||||
%b=h @order.name
|
||||
- unless @order.note.empty?
|
||||
%p
|
||||
Notiz:
|
||||
=h @order.note
|
||||
%p
|
||||
Beginn:
|
||||
%b=h format_time(@order.starts)
|
||||
|
|
||||
Ende:
|
||||
%b=h format_time(@order.ends)
|
||||
%p
|
||||
Gruppenbestellungen:
|
||||
%b= @order.group_orders.count
|
||||
= "[#{@order.group_orders.find(:all, :include => :ordergroup).collect{|g| g.ordergroup.name}.join(', ')}]"
|
||||
|
||||
%p
|
||||
Netto/Bruttosumme aller Artikel:
|
||||
%b= "#{number_to_currency(@order.sum(:net))} / #{number_to_currency(@order.sum(:gross))}"
|
||||
%p
|
||||
Bestellte Artikel:
|
||||
%b= @order.order_articles.ordered.count
|
||||
|
||||
|
||||
%p
|
||||
Aktionen:
|
||||
- if @order.open?
|
||||
= link_to "Bearbeiten", edit_order_path(@order)
|
||||
|
|
||||
= link_to 'Beenden!', finish_order_path(@order), :method => :post, :confirm => "Willst Du wirklich die Bestellung beenden?\nEs gibt kein zurück.."
|
||||
|
|
||||
- unless @order.closed?
|
||||
= link_to "Löschen", @order, :confirm => "Willst du wirklich die Bestellung löschen?", :method => :delete
|
||||
|
||||
|
||||
- unless @order.open?
|
||||
%p
|
||||
= update_articles_link(@order, "Artikelübersicht", :normal)
|
||||
|
|
||||
= update_articles_link(@order, "Sortiert nach Gruppen", :groups)
|
||||
= link_to_pdf(@order, 'groupsPdf')
|
||||
|
|
||||
= update_articles_link(@order, "Sortiert nach Artikeln", :articles)
|
||||
= link_to_pdf(@order, 'articlesPdf')
|
||||
|
|
||||
Matrix:
|
||||
= link_to_pdf(@order, 'matrixPdf')
|
||||
|
|
||||
Faxvorlage:
|
||||
= link_to_pdf(@order, 'faxPdf')
|
||||
= link_to image_tag("text_file.png", :size => "16x16", :border => "0", :alt => "Textdatei erstellen"), { :action => 'text_fax_template', :id => @order }, { :title => _("Download file") }
|
||||
|
|
||||
= link_to 'Kommentare', '#comments'
|
||||
|
||||
.single_column{:style => "clear:both; width:70em;"}
|
||||
.box_title
|
||||
%h2 Artikel
|
||||
.column_content#articles
|
||||
= render :partial => 'articles', :locals => { :order => @order }
|
||||
|
||||
.single_column{:style => "width:70em;"}
|
||||
.box_title
|
||||
%h2 Kommentare
|
||||
.column_content
|
||||
#comments
|
||||
= render :partial => 'shared/comments', :locals => { :comments => @order.comments }
|
||||
#new_comment= render :partial => 'order_comments/form', :locals => { :order_comment => @order.comments.build(:user => current_user)}
|
||||
= link_to_top
|
||||
Loading…
Add table
Add a link
Reference in a new issue