Fixed admin, orders, wiki views. Converted all erb to haml.

This commit is contained in:
benni 2012-10-15 21:19:17 +02:00
parent 699fb9b233
commit 552c553b77
169 changed files with 1158 additions and 1307 deletions

View file

@ -68,7 +68,9 @@ module ApplicationHelper
# Generates a link to the top of the website
def link_to_top
link_to image_tag("arrow_up_red.png", :size => "16x16", :border => "0", :alt => "Nach oben"), "#"
link_to '#' do
content_tag :i, nil, class: 'icon-arrow-up icon-large'
end
end
# Returns the weekday. 0 is sunday, 1 is monday and so on

View file

@ -2,18 +2,17 @@
module OrdersHelper
def update_articles_link(order, text, view)
link_to text, order_path(order, :view => view), :remote => true
link_to text, order_path(order, view: view), remote: true
end
def order_pdf(order, document)
link_to image_tag("save_pdf.png", :size => "16x16", :border => "0", :alt => "PDF erstellen"),
order_path(order, :document => document, :format => :pdf), { :title => "PDF erstellen" }
def order_pdf(order, document, text)
link_to text, order_path(order, document: document, format: :pdf), title: "PDF erstellen"
end
def options_for_suppliers_to_select
options = [["Lieferantin/Lager auswählen"]]
options += Supplier.all.map {|s| [ s.name, url_for(:action => "new", :supplier_id => s)] }
options += [["Lager", url_for(:action => 'new', :supplier_id => 0)]]
options += Supplier.all.map {|s| [ s.name, url_for(action: "new", supplier_id: s)] }
options += [["Lager", url_for(action: 'new', supplier_id: 0)]]
options_for_select(options)
end
end