Commit 8972d260289bd79b2245c4d4ae2ba50984c8ab6f

Authored by LeandroNunes
1 parent 54971859

ActionItem0: adding variables needed in flexible template plugin

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@169 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/edit_template_controller.rb
@@ -2,12 +2,16 @@ class EditTemplateController < ApplicationController @@ -2,12 +2,16 @@ class EditTemplateController < ApplicationController
2 2
3 uses_flexible_template :edit => true, :owner => 'owner' 3 uses_flexible_template :edit => true, :owner => 'owner'
4 4
5 - def flexible_template_block_dict(str)  
6 - {  
7 - 'MainBlock' => _("Main Block"),  
8 - 'ListBlock' => _("List Block"),  
9 - 'LinkBlock' => _("Link Block")  
10 - }[str] || str  
11 - end 5 + FLEXIBLE_TEMPLATE_AVAILABLE_BLOCKS = {
  6 + 'ListBlock' => _("List Block"),
  7 + 'LinkBlock' => _("Link Block"),
  8 + }
  9 +
  10 +
  11 +#TODO add your own helpers here
  12 +# FLEXIBLE_TEMPLATE_BLOCK_HELPER = {
  13 +# 'list_content' => _("Simple List Content"),
  14 +# }
  15 +
12 16
13 end 17 end
app/helpers/edit_template_helper.rb
1 # Methods added to this helper will be available to all templates in the application. 1 # Methods added to this helper will be available to all templates in the application.
2 module EditTemplateHelper 2 module EditTemplateHelper
3 - def flexible_template_block_dict(str)  
4 - {  
5 - 'MainBlock' => _("Main Block"),  
6 - 'ListBlock' => _("List Block"),  
7 - 'LinkBlock' => _("Link Block")  
8 - }[str] || str  
9 - end  
10 3
11 end 4 end