add page break to config screen
This commit is contained in:
parent
0f7dc37015
commit
cf680d3410
4 changed files with 16 additions and 5 deletions
|
@ -16,7 +16,7 @@ module Admin::ConfigsHelper
|
|||
config_input_field_options form, key, options[:input_html]
|
||||
config_input_tooltip_options form, key, options[:input_html]
|
||||
if options[:as] == :boolean
|
||||
options[:input_html][:checked] = 'checked' if options[:input_html].delete(:value)
|
||||
options[:input_html][:checked] = 'checked' if v=options[:input_html].delete(:value) and v!='false'
|
||||
options[:checked_value] = 'true' if options[:checked_value].nil?
|
||||
options[:unchecked_value] = 'false' if options[:unchecked_value].nil?
|
||||
elsif options[:collection] or options[:as] == :select
|
||||
|
@ -51,7 +51,7 @@ module Admin::ConfigsHelper
|
|||
if options[:as] == :boolean
|
||||
checked_value = options.delete(:checked_value) || 'true'
|
||||
unchecked_value = options.delete(:unchecked_value) || 'false'
|
||||
options[:checked] = 'checked' if options.delete(:value)
|
||||
options[:checked] = 'checked' if v=options.delete(:value) and v!='false'
|
||||
form.hidden_field(key, value: unchecked_value, as: :hidden) + form.check_box(key, options, checked_value, false)
|
||||
else
|
||||
form.input_field key, options
|
||||
|
|
|
@ -4,4 +4,11 @@
|
|||
.fold-line
|
||||
= config_input form, :pdf_font_size, as: :integer, input_html: {class: 'input-mini'}
|
||||
= config_input form, :pdf_page_size, input_html: {class: 'input-medium'}
|
||||
= config_input form, :pdf_add_page_breaks, as: :boolean
|
||||
= config_input form, :pdf_add_page_breaks do
|
||||
= form.simple_fields_for :pdf_add_page_breaks do |fields|
|
||||
%label
|
||||
= config_input_field fields, :order_by_groups, as: :boolean
|
||||
= t 'config.hints.pdf_add_page_breaks.order_by_groups'
|
||||
%label
|
||||
= config_input_field fields, :order_by_articles, as: :boolean
|
||||
= t 'config.hints.pdf_add_page_breaks.order_by_articles'
|
||||
|
|
|
@ -472,7 +472,9 @@ en:
|
|||
page_footer: 'Shown on each page at the bottom. Enter "blank" to disable the footer completely.'
|
||||
pdf_font_size: Base font size for PDF documents (12 is standard).
|
||||
pdf_page_size: 'Page size for PDF documents, typically "A4" or "letter".'
|
||||
pdf_add_page_breaks: Add page breaks when starting a new section.
|
||||
pdf_add_page_breaks:
|
||||
order_by_articles: Put each article on a separate page.
|
||||
order_by_groups: Put each ordergroup on a separate page.
|
||||
tolerance_is_costly: "Order as much of the member tolerance as possible (compared to only as much needed to fill the last box). Enabling this also includes the tolerance in the total price of the open member order."
|
||||
keys:
|
||||
name: Name
|
||||
|
|
|
@ -453,7 +453,9 @@ nl:
|
|||
page_footer: 'Wordt op iedere pagina getoond. Vul "blank" in om de voettekst helemaal weg te halen.'
|
||||
pdf_font_size: Basis tekstgrootte voor PDF bestanden (standaard 12).
|
||||
pdf_page_size: 'Paginaformaat voor PDF bestanden, meestal "A4" of "letter".'
|
||||
pdf_add_page_breaks: Secties op een nieuwe pagina beginnen.
|
||||
pdf_add_page_breaks:
|
||||
order_by_articles: Ieder artikel op een nieuwe pagina.
|
||||
order_by_groups: Ieder huishouden op een nieuwe pagina.
|
||||
tolerance_is_costly: "Bestel zoveel artikelen als mogelijk in de tolerantie (in plaats van net genoeg om de laatste doos te vullen). Dit zorgt er ook voor dat de tolerantie in de prijs van open ledenbestellingen wordt meegenomen."
|
||||
keys:
|
||||
name: Naam
|
||||
|
|
Loading…
Reference in a new issue