diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 9481a1c..54fe288 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base attr_reader :virtual_community before_filter :load_owner - # Load the owner + # Load the owner def load_owner # TODO: this should not be hardcoded if Profile.exists?(1) diff --git a/app/controllers/edit_template_controller.rb b/app/controllers/edit_template_controller.rb index ea65d1b..9f10976 100644 --- a/app/controllers/edit_template_controller.rb +++ b/app/controllers/edit_template_controller.rb @@ -6,4 +6,13 @@ class EditTemplateController < ApplicationController Profile.find(1) end + def flexible_template_dict(str) + { + 'MainBlock' => _("Main Block"), + 'ListBlock' => _("List Block"), + 'LinkBlock' => _("Link Block") + }[str] || str + end + + end diff --git a/db/migrate/005_manage_template_migration.rb b/db/migrate/005_manage_template_migration.rb index 5751907..678503b 100644 --- a/db/migrate/005_manage_template_migration.rb +++ b/db/migrate/005_manage_template_migration.rb @@ -2,6 +2,7 @@ class ManageTemplateMigration < ActiveRecord::Migration def self.up create_table :boxes do |t| t.column :name, :string + t.column :title, :string t.column :number, :integer t.column :owner_type, :string t.column :owner_id, :integer -- libgit2 0.21.2