app/helpers/dashboard_helper.rb in iqvoc-4.11.1 vs app/helpers/dashboard_helper.rb in iqvoc-4.12.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'),
- dashboard_path(order: 'asc', by: name.to_s)) +
+ params.merge(sort: "#{name} ASC") { |key,oldval,newval| oldval.include?(newval) ? oldval : "#{oldval},#{newval}" }) +
link_to(icon('arrow-circle-o-down', 'sorting-arrow'),
- dashboard_path(order: 'desc', by: name.to_s))
+ params.merge(sort: "#{name} DESC") { |key,oldval,newval| oldval.include?(newval) ? oldval : "#{oldval},#{newval}" })
end
end
def consistency_status(item)
css, msg = if item.publishable?
@@ -35,9 +35,11 @@
end
def link_to_dashboard_item(item)
if item.is_a?(Label::Base)
item.published? ? label_path(id: item.origin) : label_path(published: 0, id: item.origin)
+ 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
end