Fixes values of official_level options for selects in search filters.

This commit is contained in:
Juanma
2017-01-09 16:07:59 +01:00
parent 6b0f8eb62b
commit ff8cc2d7bd

View File

@@ -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
end