Make order_pdf more generally useful
This commit is contained in:
parent
bc1eb3bc44
commit
379dc86ffa
1 changed files with 8 additions and 6 deletions
|
@ -10,10 +10,12 @@ module OrdersHelper
|
||||||
# @param order [Order]
|
# @param order [Order]
|
||||||
# @param document [String] Document to display, one of +groups+, +articles+, +fax+, +matrix+
|
# @param document [String] Document to display, one of +groups+, +articles+, +fax+, +matrix+
|
||||||
# @param text [String] Link text
|
# @param text [String] Link text
|
||||||
|
# @param options [Hash] Options passed to +link_to+
|
||||||
# @return [String] Link to order document
|
# @return [String] Link to order document
|
||||||
# @see OrdersController#show
|
# @see OrdersController#show
|
||||||
def order_pdf(order, document, text)
|
def order_pdf(order, document, text, options={})
|
||||||
link_to text, order_path(order, document: document, format: :pdf), title: I18n.t('helpers.orders.order_pdf')
|
options = options.merge(title: I18n.t('helpers.orders.order_pdf'))
|
||||||
|
link_to text, order_path(order, document: document, format: :pdf), options
|
||||||
end
|
end
|
||||||
|
|
||||||
def options_for_suppliers_to_select
|
def options_for_suppliers_to_select
|
||||||
|
|
Loading…
Reference in a new issue