app/helpers/comfy/admin/cms/pages_helper.rb in cms-fortress-1.3.0.rc2 vs app/helpers/comfy/admin/cms/pages_helper.rb in cms-fortress-1.3.0.rc3

- old
+ new

@@ -17,6 +17,26 @@ "24 hours" => 1.day, "15 days" => 15.days, "30 days" => 30.days }.map {|k,v| [k, v.to_i] } end + + def site_selector + select_tag( + :sites, + options_for_select(sites_for_select, params[:site_id]), + {class: 'form-control input-sm site_selector', id: 'js_site_selector'} + ) + end + + def sites_for_select + all_sites.map { |site| [site.label, site.id] } + end + + def all_sites + Comfy::Cms::Site.all + end + + def multiple_sites? + all_sites.size > 1 + end end