From 8972d260289bd79b2245c4d4ae2ba50984c8ab6f Mon Sep 17 00:00:00 2001 From: LeandroNunes Date: Thu, 26 Jul 2007 14:48:18 +0000 Subject: [PATCH] ActionItem0: adding variables needed in flexible template plugin --- app/controllers/edit_template_controller.rb | 18 +++++++++++------- app/helpers/edit_template_helper.rb | 7 ------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/app/controllers/edit_template_controller.rb b/app/controllers/edit_template_controller.rb index 0e7013c..dd18744 100644 --- a/app/controllers/edit_template_controller.rb +++ b/app/controllers/edit_template_controller.rb @@ -2,12 +2,16 @@ class EditTemplateController < ApplicationController uses_flexible_template :edit => true, :owner => 'owner' - def flexible_template_block_dict(str) - { - 'MainBlock' => _("Main Block"), - 'ListBlock' => _("List Block"), - 'LinkBlock' => _("Link Block") - }[str] || str - end + FLEXIBLE_TEMPLATE_AVAILABLE_BLOCKS = { + 'ListBlock' => _("List Block"), + 'LinkBlock' => _("Link Block"), + } + + +#TODO add your own helpers here +# FLEXIBLE_TEMPLATE_BLOCK_HELPER = { +# 'list_content' => _("Simple List Content"), +# } + end diff --git a/app/helpers/edit_template_helper.rb b/app/helpers/edit_template_helper.rb index 53747a5..0157adb 100644 --- a/app/helpers/edit_template_helper.rb +++ b/app/helpers/edit_template_helper.rb @@ -1,11 +1,4 @@ # Methods added to this helper will be available to all templates in the application. module EditTemplateHelper - def flexible_template_block_dict(str) - { - 'MainBlock' => _("Main Block"), - 'ListBlock' => _("List Block"), - 'LinkBlock' => _("Link Block") - }[str] || str - end end -- libgit2 0.21.2