diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 3d30ce101..ebde2a954 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -1,13 +1,8 @@ module SearchHelper def official_level_search_options - options_for_select([ - [t("shared.advanced_search.author_type_1"), 1], - [t("shared.advanced_search.author_type_2"), 2], - [t("shared.advanced_search.author_type_3"), 3], - [t("shared.advanced_search.author_type_4"), 4], - [t("shared.advanced_search.author_type_5"), 5]], - params[:advanced_search].try(:[], :official_level)) + options_for_select((1..5).map{ |i| [setting["official_level_#{i}_name"], i] }, + params[:advanced_search].try(:[], :official_level)) end def date_range_options @@ -28,4 +23,4 @@ module SearchHelper params[:advanced_search].try(:[], :date_max).present? end -end \ No newline at end of file +end