app/helpers/dashboard_helper.rb in iqvoc-4.12.1 vs app/helpers/dashboard_helper.rb in iqvoc-4.13.0
- old
+ new
@@ -16,13 +16,13 @@
module DashboardHelper
def sorting_controls_for(name)
content_tag :div, class: 'sorting-controls' do
link_to(icon('arrow-circle-o-up', 'sorting-arrow'),
- params.merge({ sort: "#{name} ASC" })) +
+ sorting_params.merge({ sort: "#{name} ASC" })) +
link_to(icon('arrow-circle-o-down', 'sorting-arrow'),
- params.merge({ sort: "#{name} DESC" }))
+ sorting_params.merge({ sort: "#{name} DESC" }))
end
end
def consistency_status(item)
css, msg = if item.publishable?
@@ -40,7 +40,11 @@
elsif item.is_a?(Collection::Base)
item.published? ? collection_path(id: item.origin) : collection_path(published: 0, id: item.origin)
else
item.published? ? concept_path(id: item.origin) : concept_path(published: 0, id: item.origin)
end
+ end
+
+ def sorting_params
+ sorting_params = params.permit(:sort, :check_consistency)
end
end