foodsoft/app/views/orders/show.html.haml
benni 0edd29dfd4 Merge branch 'master' into master-to-rails3
Conflicts:
	Gemfile
	README_DEVEL
	app/controllers/articles_controller.rb
	app/controllers/orders_controller.rb
	app/controllers/tasks_controller.rb
	app/models/task.rb
	app/views/articles/_import_search_results.haml
	app/views/articles/index.haml
	app/views/messages/new.haml
	app/views/ordering/_order_head.haml
	app/views/ordering/my_order_result.haml
	app/views/orders/show.haml
	app/views/stockit/new.html.haml
	db/schema.rb
2012-12-14 18:10:46 +01:00

61 lines
No EOL
2.3 KiB
Text

- title "Bestellung: #{@order.name}"
- if @order.finished? and !@order.closed?
.alert.alert-warning Achtung, Bestellung wurde noch nicht abgerechnet.
// Order summary
.well
%dl.dl-horizontal
%dt Lieferantin
%dd= @order.name
- if @note.present?
%dt Notiz
%dd= @order.note
%dt Erstellt von
%dd= link_to_user_message_if_valid(@order.created_by)
%dt Beginn
%dd= format_time(@order.starts)
%dt Ende
%dd= format_time(@order.ends)
%dt Gruppenbestellungen:
%dd #{@order.group_orders.count} (#{@order.group_orders.includes(:ordergroup).all.map {|g| g.ordergroup.name}.join(', ')})
%dt Netto/Bruttosumme aller Artikel:
%dd= "#{number_to_currency(@order.sum(:net))} / #{number_to_currency(@order.sum(:gross))}"
%dt Bestellte Artikel:
%dd= @order.order_articles.ordered.count
.form-actions
- if @order.open?
= link_to "Bearbeiten", edit_order_path(@order), class: 'btn'
= link_to 'Beenden!', finish_order_path(@order), method: :post,
confirm: "Willst Du wirklich die Bestellung beenden?\nEs gibt kein zurück..", class: 'btn'
- unless @order.closed?
= link_to "Löschen", @order, confirm: "Willst du wirklich die Bestellung löschen?", method: :delete,
class: 'btn btn-danger'
- unless @order.open?
%ul.nav.nav-pills
%li.active= update_articles_link(@order, "Artikelübersicht", :default)
%li= update_articles_link(@order, "Sortiert nach Gruppen", :groups)
%li= update_articles_link(@order, "Sortiert nach Artikeln", :articles)
%li= link_to 'Kommentare', '#comments'
%li.dropdown
= link_to '#', class: 'dropdown-toggle', data: {toggle: 'dropdown'} do
Download
%b.caret
%ul.dropdown-menu
%li= order_pdf(@order, :groups, "Gruppenpdf")
%li= order_pdf(@order, :articles, "Artikelpdf")
%li= order_pdf(@order, :matrix, "Matrix")
%li= order_pdf(@order, :fax, "Fax PDF")
%li= link_to "Fax Text", {action: 'text_fax_template', id: @order }, {title: "Download file"}
%section#articles_table
= render 'articles', order: @order
%h2 Kommentare
#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