helpers i18n

This commit is contained in:
wvengen 2013-04-10 17:29:06 +02:00
parent 3f82138d84
commit a501fac76f
7 changed files with 41 additions and 21 deletions

View file

@ -6,13 +6,13 @@ module OrdersHelper
end
def order_pdf(order, document, text)
link_to text, order_path(order, document: document, format: :pdf), title: "PDF erstellen"
link_to text, order_path(order, document: document, format: :pdf), title: I18n.t('helpers.orders.order_pdf')
end
def options_for_suppliers_to_select
options = [["Lieferantin/Lager auswählen"]]
options = [[I18n.t('helpers.orders.option_choose')]]
options += Supplier.all.map {|s| [ s.name, url_for(action: "new", supplier_id: s)] }
options += [["Lager", url_for(action: 'new', supplier_id: 0)]]
options += [[I18n.t('helpers.orders.option_stock'), url_for(action: 'new', supplier_id: 0)]]
options_for_select(options)
end
end