spec/dummy/app/helpers/application_helper.rb in kuhsaft-0.2.3 vs spec/dummy/app/helpers/application_helper.rb in kuhsaft-0.2.4

- old
+ new

@@ -1,9 +1,18 @@ module ApplicationHelper + def available_parent_pages + pages = [] + pages << { :title => t('kuhsaft.cms.pages.new.pages'), :link => cms_pages_path(:locale => :en) } + if params[:parent_id].present? + parent_page = Kuhsaft::Page.find(params[:parent_id]) + pages += parent_page.parent_pages + end + pages << { :title => t('kuhsaft.cms.pages.new.new_page'), :link => '#' } + end end