From 976114cfa9b9ce89d381eaf270f293a87d673bc2 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 16 Oct 2012 16:20:22 +0800 Subject: [PATCH] Add missing helper --- .../back_end/page_contexts_helper.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vendor/built_in_modules/page_content/app/helpers/panel/page_content/back_end/page_contexts_helper.rb diff --git a/vendor/built_in_modules/page_content/app/helpers/panel/page_content/back_end/page_contexts_helper.rb b/vendor/built_in_modules/page_content/app/helpers/panel/page_content/back_end/page_contexts_helper.rb new file mode 100644 index 00000000..43fa7fd1 --- /dev/null +++ b/vendor/built_in_modules/page_content/app/helpers/panel/page_content/back_end/page_contexts_helper.rb @@ -0,0 +1,18 @@ +module Panel::PageContent::BackEnd::PageContextsHelper +include ActionView::Helpers::UrlHelper + + + def show_page_context_edit_auth_link(page_context) + type = 'Edit' +# debugger +# a=1 + oa = page_context.get_object_auth_by_title(type) + if oa.nil? + page_context.object_auths.new(title: type ).save rescue + oa = page_context.get_object_auth_by_title(type) + end +# link_to t(:category_auth), edit_admin_object_auth_path(oa) + link_to t(:category_auth),admin_object_auth_ob_auth_path(oa) + end + +end \ No newline at end of file