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

View File

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

View File

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

View File

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

View File

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

View File

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