43 lines
No EOL
1.5 KiB
Text
43 lines
No EOL
1.5 KiB
Text
- title "Bestellungen verwalten"
|
|
|
|
%p
|
|
- form_tag do
|
|
Neue Bestellung anlegen für
|
|
= select_tag :switch_supplier,
|
|
options_for_suppliers_to_select,
|
|
:style => "font-size: 0.9em;margin-left:1em;",
|
|
'data-redirect-to' => true
|
|
%br/
|
|
.left_column{:style => "width:55em"}
|
|
.box_title
|
|
%h2 Laufende Bestellungen
|
|
.column_content
|
|
- unless @open_orders.empty?
|
|
%table.list
|
|
%thead
|
|
%tr
|
|
%th Lieferantin
|
|
%th Ende
|
|
%th Notiz
|
|
%th{:colspan => "2"}
|
|
%tbody
|
|
- for order in @open_orders
|
|
- tr_class = cycle('even', 'odd', :name => 'open_orders')
|
|
- tr_class += " active" if order.expired?
|
|
%tr{:class => tr_class}
|
|
%td=h order.name
|
|
%td=h format_time(order.ends) unless order.ends.nil?
|
|
%td=h truncate(order.note)
|
|
%td= link_to "Beenden", finish_order_path(order), :confirm => "Willst Du wirklich die Bestellung \"#{order.name}\" beenden?\nEs gibt kein zurück.", :method => :post
|
|
%td
|
|
= link_to "Anzeigen", order
|
|
= link_to icon(:edit), edit_order_path(order)
|
|
= link_to icon(:delete), order, :confirm => "Bist Du sicher die Bestellung zu beenden?", :method => :delete
|
|
- else
|
|
Derzeit gibt es keine laufende Bestellungen.
|
|
|
|
.left_column{:style => "width:75em"}
|
|
.box_title
|
|
%h2 Beendete Bestellungen
|
|
.column_content#orders_table
|
|
= render :partial => 'orders' |