add i18n variable. fix web_links for disable category

This commit is contained in:
Matthew K. Fu JuYuan 2012-07-11 17:56:31 +08:00
parent ca2c056a07
commit 85d6bbe1c9
6 changed files with 10 additions and 18 deletions

View File

@ -109,7 +109,6 @@ GEM
jquery-rails
railties (>= 3.1.0)
json (1.6.5)
libv8 (3.3.10.4)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mail (2.3.3)
@ -256,8 +255,6 @@ GEM
sunspot_rails (1.3.3)
nokogiri
sunspot (= 1.3.3)
therubyracer (0.9.9)
libv8 (~> 3.3.10)
thor (0.14.6)
tilt (1.3.3)
tinymce-rails (3.4.8)
@ -335,7 +332,6 @@ DEPENDENCIES
spork
sprockets
sunspot-rails-tester
therubyracer
tinymce-rails
tire
uglifier

View File

@ -144,8 +144,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
respond_to do |format|
if @bulletin.save
# format.html { redirect_to(panel_announcement_back_end_bulletin_url(@bulletin), :notice => t('announcement.create_bulletin_success')) }
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('announcement.create_bulletin_success')) }
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('bulletin.create_bulletin_success')) }
format.xml { render :xml => @bulletin, :status => :created, :location => @bulletin }
format.js
else

View File

@ -79,7 +79,8 @@ zh_tw:
fact_check: 公告審核
delete: 刪除
edit: 編輯
update_bulletin_success: 成功更新公告
create_bulletin_success: 成功新增公告
# action: 行動
# add_language: 新增語言
# admin: 管理

View File

@ -148,8 +148,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
respond_to do |format|
if @news_bulletin.save
# format.html { redirect_to(panel_news_back_end_news_bulletin_url(@news_bulletin), :notice => t('news.create_news_bulletin_success')) }
format.html { redirect_to(panel_news_back_end_news_bulletins_url, :notice => t('news.create_news_bulletin_success')) }
format.html { redirect_to(panel_news_back_end_news_bulletins_url, :notice => t('news_bulletin.create_news_bulletin_success')) }
format.xml { render :xml => @news_bulletin, :status => :created, :location => @news_bulletin }
format.js
else

View File

@ -77,7 +77,8 @@ zh_tw:
edit: 編輯
update_success: 分類更新成功
update_failed: 分類更新失敗
create_news_bulletin_success: 新增新聞成功
update_success: 更新新聞成功
# action: 行動
# add_language: 新增語言

View File

@ -3,6 +3,9 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController
before_filter :authenticate_user!
# before_filter :for_app_manager,:except => [:index,:show]
before_filter :for_app_sub_manager,:except => [:index]
before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WebLinkCategory')
end
def index
@ -43,8 +46,6 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController
# GET /web_links/1.xml
def show
@web_link = WebLink.find(params[:id])
# get_categorys
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @web_link }
@ -54,11 +55,7 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController
# GET /web_links/new
# GET /web_links/new.xml
def new
@web_link = WebLink.new
get_categorys
get_tags
respond_to do |format|
@ -70,7 +67,6 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController
# GET /web_links/1/edit
def edit
@web_link = WebLink.find(params[:id])
get_categorys
get_tags
end