From 972be2aee4a2447be7f1918fa4299b48cd76d25e Mon Sep 17 00:00:00 2001 From: Adrian Toth Date: Thu, 3 Aug 2017 15:29:00 +0200 Subject: [PATCH] definitions of 4 constants "TIMER_DAYS,TIMER_HOURS,TIMER_WEEKS,TIMER_MONTHS" have been moved from UiConstants to ViewHelper --- app/helpers/ui_constants.rb | 32 -------------------------------- app/helpers/view_helper.rb | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/app/helpers/ui_constants.rb b/app/helpers/ui_constants.rb index f1e9ebf0e4be..e9f7c99e845d 100644 --- a/app/helpers/ui_constants.rb +++ b/app/helpers/ui_constants.rb @@ -165,38 +165,6 @@ module UiConstants VIEW_RESOURCES = DEFAULT_SETTINGS[:views].keys.each_with_object({}) { |value, acc| acc[value.to_s] = value }.freeze - TIMER_DAYS = [ - [N_("Day"), "1"], - [N_("2 Days"), "2"], - [N_("3 Days"), "3"], - [N_("4 Days"), "4"], - [N_("5 Days"), "5"], - [N_("6 Days"), "6"], - ] - TIMER_HOURS = [ - [N_("Hour"), "1"], - [N_("2 Hours"), "2"], - [N_("3 Hours"), "3"], - [N_("4 Hours"), "4"], - [N_("6 Hours"), "6"], - [N_("8 Hours"), "8"], - [N_("12 Hours"), "12"], - ] - TIMER_WEEKS = [ - [N_("Week"), "1"], - [N_("2 Weeks"), "2"], - [N_("3 Weeks"), "3"], - [N_("4 Weeks"), "4"], - ] - TIMER_MONTHS = [ - [N_("Month"), "1"], - [N_("2 Months"), "2"], - [N_("3 Months"), "3"], - [N_("4 Months"), "4"], - [N_("5 Months"), "5"], - [N_("6 Months"), "6"], - ] - # Maximum fields to show for automation engine resolution screens AE_MAX_RESOLUTION_FIELDS = 5 diff --git a/app/helpers/view_helper.rb b/app/helpers/view_helper.rb index 664f1a8d6bc8..0bcfbae791b2 100644 --- a/app/helpers/view_helper.rb +++ b/app/helpers/view_helper.rb @@ -26,6 +26,41 @@ module ViewHelper "US-Folio" => N_("US Folio - 8.5in x 13.0in") }.freeze + TIMER_DAYS = [ + [N_("Day"), "1"], + [N_("2 Days"), "2"], + [N_("3 Days"), "3"], + [N_("4 Days"), "4"], + [N_("5 Days"), "5"], + [N_("6 Days"), "6"], + ].freeze + + TIMER_HOURS = [ + [N_("Hour"), "1"], + [N_("2 Hours"), "2"], + [N_("3 Hours"), "3"], + [N_("4 Hours"), "4"], + [N_("6 Hours"), "6"], + [N_("8 Hours"), "8"], + [N_("12 Hours"), "12"], + ].freeze + + TIMER_WEEKS = [ + [N_("Week"), "1"], + [N_("2 Weeks"), "2"], + [N_("3 Weeks"), "3"], + [N_("4 Weeks"), "4"], + ].freeze + + TIMER_MONTHS = [ + [N_("Month"), "1"], + [N_("2 Months"), "2"], + [N_("3 Months"), "3"], + [N_("4 Months"), "4"], + [N_("5 Months"), "5"], + [N_("6 Months"), "6"], + ].freeze + class << self def concat_tag(*args, &block) concat content_tag(*args, &block)