From 8ad7f708227350814bd671dcc09466b1ca8bb35c Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Fri, 18 May 2012 10:28:28 +0800 Subject: [PATCH] Proof i18n_variable for categories --- app/controllers/admin/asset_categories_controller.rb | 1 - app/controllers/admin/infos_controller.rb | 1 - app/controllers/admin/roles_controller.rb | 1 - .../announcement/back_end/bulletin_categorys_controller.rb | 1 - .../panel/announcement/back_end/bulletins/_bulletin.html.erb | 2 +- .../views/panel/announcement/back_end/bulletins/show.html.erb | 2 +- .../views/panel/announcement/front_end/bulletins/index.html.erb | 2 +- .../views/panel/announcement/widget/bulletins/_index.html.erb | 2 +- .../panel/news/back_end/news_bulletin_categorys_controller.rb | 1 - .../panel/news/back_end/news_bulletins/_news_bulletin.html.erb | 2 +- .../app/views/panel/news/back_end/news_bulletins/show.html.erb | 2 +- .../web_resource/back_end/web_link_categorys_controller.rb | 1 - .../panel/web_resource/back_end/web_links/_web_link.html.erb | 2 +- .../views/panel/web_resource/back_end/web_links/show.html.erb | 2 +- .../views/panel/web_resource/front_end/web_links/index.html.erb | 2 +- .../views/panel/web_resource/front_end/web_links/show.html.erb | 2 +- .../views/panel/web_resource/widget/web_links/index.html.erb | 2 +- 17 files changed, 11 insertions(+), 17 deletions(-) diff --git a/app/controllers/admin/asset_categories_controller.rb b/app/controllers/admin/asset_categories_controller.rb index 22efd03f..9ce6bb48 100644 --- a/app/controllers/admin/asset_categories_controller.rb +++ b/app/controllers/admin/asset_categories_controller.rb @@ -17,7 +17,6 @@ class Admin::AssetCategoriesController < OrbitBackendController def edit @asset_category = AssetCategory.find(params[:id]) - @i18n_variable = @asset_category.i18n_variable @url = admin_asset_categories_path(@asset_category) end diff --git a/app/controllers/admin/infos_controller.rb b/app/controllers/admin/infos_controller.rb index bc86b662..21306c6e 100644 --- a/app/controllers/admin/infos_controller.rb +++ b/app/controllers/admin/infos_controller.rb @@ -21,7 +21,6 @@ class Admin::InfosController < ApplicationController def edit @attribute = Info.find(params[:id]) - @i18n_variable = @attribute.i18n_variable render :template => 'admin/attributes/edit' end diff --git a/app/controllers/admin/roles_controller.rb b/app/controllers/admin/roles_controller.rb index 65c86f36..d02224a5 100644 --- a/app/controllers/admin/roles_controller.rb +++ b/app/controllers/admin/roles_controller.rb @@ -21,7 +21,6 @@ class Admin::RolesController < ApplicationController def edit @attribute = Role.find(params[:id]) - @i18n_variable = @attribute.i18n_variable render :template => 'admin/attributes/edit' end diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb index b9151125..65359763 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_categorys_controller.rb @@ -55,7 +55,6 @@ class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendCo # GET /bulletins/1/edit def edit @bulletin_category = BulletinCategory.find(params[:id]) - @i18n_variable = @bulletin_category.i18n_variable @url = panel_announcement_back_end_bulletin_category_path(@bulletin_category) diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb index b69def3b..423e35ba 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb @@ -28,7 +28,7 @@ - <%= bulletin.bulletin_category.i18n_variable[I18n.locale] %> + <%= bulletin.bulletin_category.i18n_variable[I18n.locale] rescue nil %> <%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%> diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/show.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/show.html.erb index 158e07d0..68634b9a 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/show.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/show.html.erb @@ -1,7 +1,7 @@