Proof i18n_variable for categories

This commit is contained in:
Christophe Vilayphiou 2012-05-18 10:28:28 +08:00
parent a2637008e0
commit 8ad7f70822
17 changed files with 11 additions and 17 deletions

View File

@ -17,7 +17,6 @@ class Admin::AssetCategoriesController < OrbitBackendController
def edit def edit
@asset_category = AssetCategory.find(params[:id]) @asset_category = AssetCategory.find(params[:id])
@i18n_variable = @asset_category.i18n_variable
@url = admin_asset_categories_path(@asset_category) @url = admin_asset_categories_path(@asset_category)
end end

View File

@ -21,7 +21,6 @@ class Admin::InfosController < ApplicationController
def edit def edit
@attribute = Info.find(params[:id]) @attribute = Info.find(params[:id])
@i18n_variable = @attribute.i18n_variable
render :template => 'admin/attributes/edit' render :template => 'admin/attributes/edit'
end end

View File

@ -21,7 +21,6 @@ class Admin::RolesController < ApplicationController
def edit def edit
@attribute = Role.find(params[:id]) @attribute = Role.find(params[:id])
@i18n_variable = @attribute.i18n_variable
render :template => 'admin/attributes/edit' render :template => 'admin/attributes/edit'
end end

View File

@ -55,7 +55,6 @@ class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendCo
# GET /bulletins/1/edit # GET /bulletins/1/edit
def edit def edit
@bulletin_category = BulletinCategory.find(params[:id]) @bulletin_category = BulletinCategory.find(params[:id])
@i18n_variable = @bulletin_category.i18n_variable
@url = panel_announcement_back_end_bulletin_category_path(@bulletin_category) @url = panel_announcement_back_end_bulletin_category_path(@bulletin_category)

View File

@ -28,7 +28,7 @@
</div> </div>
</div> </div>
</td> </td>
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td> <td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
<td> <td>
<%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%> <%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%>

View File

@ -1,7 +1,7 @@
<ul> <ul>
<li> <li>
<b><%= t('announcement.category') %></b> <b><%= t('announcement.category') %></b>
<%= @bulletin.bulletin_category.i18n_variable[I18n.locale] %> <%= @bulletin.bulletin_category.i18n_variable[I18n.locale] rescue nil %>
</li> </li>
<li> <li>
<b><%= t('announcement.postdate') %></b> <b><%= t('announcement.postdate') %></b>

View File

@ -18,7 +18,7 @@
<% @bulletins.each do |post| %> <% @bulletins.each do |post| %>
<tr> <tr>
<td><%= post.bulletin_category.i18n_variable[I18n.locale] %></td> <td><%= post.bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
<td><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %> <td><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
<%#= link_to post.title, panel_announcement_back_end_bulletin_path(post) %> <%#= link_to post.title, panel_announcement_back_end_bulletin_path(post) %>
</td> </td>

View File

@ -12,7 +12,7 @@
<% @bulletins.each do |post| %> <% @bulletins.each do |post| %>
<tr> <tr>
<td><%= post.bulletin_category.i18n_variable[I18n.locale] %></td> <td><%= post.bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
<td><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %> <td><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
</td> </td>
<td><%= post.postdate %></td> <td><%= post.postdate %></td>

View File

@ -56,7 +56,6 @@ class Panel::News::BackEnd::NewsBulletinCategorysController < OrbitBackendContro
# GET /news_bulletins/1/edit # GET /news_bulletins/1/edit
def edit def edit
@news_bulletin_category = NewsBulletinCategory.find(params[:id]) @news_bulletin_category = NewsBulletinCategory.find(params[:id])
@i18n_variable = @news_bulletin_category.i18n_variable
@url = panel_news_back_end_news_bulletin_category_path(@news_bulletin_category) @url = panel_news_back_end_news_bulletin_category_path(@news_bulletin_category)

View File

@ -28,7 +28,7 @@
</div> </div>
</div> </div>
</td> </td>
<td><%= news_bulletin.news_bulletin_category.i18n_variable[I18n.locale] %></td> <td><%= news_bulletin.news_bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
<td> <td>
<%= link_to news_bulletin.title[I18n.locale], panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category.id) rescue ''%> <%= link_to news_bulletin.title[I18n.locale], panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category.id) rescue ''%>

View File

@ -1,7 +1,7 @@
<ul> <ul>
<li> <li>
<b><%= t('news.category') %></b> <b><%= t('news.category') %></b>
<%= @news_bulletin.news_bulletin_category.i18n_variable[I18n.locale] %> <%= @news_bulletin.news_bulletin_category.i18n_variable[I18n.locale] rescue nil %>
</li> </li>
<li> <li>
<b><%= t('news.postdate') %></b> <b><%= t('news.postdate') %></b>

View File

@ -38,7 +38,6 @@ class Panel::WebResource::BackEnd::WebLinkCategorysController < OrbitBackendCont
# GET /web_links/1/edit # GET /web_links/1/edit
def edit def edit
@web_link_category = WebLinkCategory.find(params[:id]) @web_link_category = WebLinkCategory.find(params[:id])
@i18n_variable = @web_link_category.i18n_variable
@url = panel_web_resource_back_end_web_link_category_path(@web_link_category) @url = panel_web_resource_back_end_web_link_category_path(@web_link_category)

View File

@ -19,7 +19,7 @@
</div> </div>
</div> </div>
</td> </td>
<td><%= web_link.web_link_category.i18n_variable[I18n.locale] %></td> <td><%= web_link.web_link_category.i18n_variable[I18n.locale] rescue nil %></td>
<td> <td>
<%= link_to web_link.name[I18n.locale], panel_web_resource_back_end_web_link_path(web_link) %> <%= link_to web_link.name[I18n.locale], panel_web_resource_back_end_web_link_path(web_link) %>
<div class="quick-edit"> <div class="quick-edit">

View File

@ -9,7 +9,7 @@
<ul> <ul>
<li> <li>
<b><%= t('announcement.category') %></b> <b><%= t('announcement.category') %></b>
<%= @bulletin.bulletin_category.i18n_variable[I18n.locale] %> <%= @bulletin.bulletin_category.i18n_variable[I18n.locale] rescue nil %>
</li> </li>
<li> <li>
<b><%= t('announcement.postdate') %></b> <b><%= t('announcement.postdate') %></b>

View File

@ -15,7 +15,7 @@
<% @web_links.each do |post| %> <% @web_links.each do |post| %>
<tr> <tr>
<td><%= post.web_link_category.i18n_variable[I18n.locale] %></td> <td><%= post.web_link_category.i18n_variable[I18n.locale] rescue nil %></td>
<td> <td>
<%#= link_to post.name[I18n.locale], panel_web_resource_front_end_web_link_path(post) %> <%#= link_to post.name[I18n.locale], panel_web_resource_front_end_web_link_path(post) %>
<%= link_to post.name[I18n.locale], post.url, {:target => '_blank', :title => post.name[I18n.locale]} %> <%= link_to post.name[I18n.locale], post.url, {:target => '_blank', :title => post.name[I18n.locale]} %>

View File

@ -9,7 +9,7 @@
<ul> <ul>
<li> <li>
<b><%= t('announcement.category') %></b> <b><%= t('announcement.category') %></b>
<%= @bulletin.bulletin_category.i18n_variable[I18n.locale] %> <%= @bulletin.bulletin_category.i18n_variable[I18n.locale] rescue nil %>
</li> </li>
<li> <li>
<b><%= t('announcement.postdate') %></b> <b><%= t('announcement.postdate') %></b>

View File

@ -14,7 +14,7 @@
</tr> </tr>
<% @web_links.each do |post| %> <% @web_links.each do |post| %>
<tr> <tr>
<td><%= post.web_link_category.i18n_variable[I18n.locale] %></td> <td><%= post.web_link_category.i18n_variable[I18n.locale] rescue nil %></td>
<td> <td>
<%= link_to post.name[I18n.locale], post.url, {:target => '_blank', :title => post.name[I18n.locale]} %> <%= link_to post.name[I18n.locale], post.url, {:target => '_blank', :title => post.name[I18n.locale]} %>
</td> </td>