fix error when creating bulletin and news

This commit is contained in:
Matthew K. Fu JuYuan 2012-07-30 16:38:02 +08:00
parent 4e1a91ed90
commit bb154f5be6
4 changed files with 9 additions and 8 deletions

View File

@ -5,7 +5,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
layout 'new_admin'
before_filter :authenticate_user!
before_filter :only => [ :new,:create,:edit,:update] do |controller|
before_filter :only => [ :new,:create,:edit,:update,:create] do |controller|
controller.get_categorys('BulletinCategory')
end
# before_filter :for_admin_only,:only => [:]

View File

@ -76,11 +76,11 @@ class Bulletin
# end
def s_title
self.title.zh_tw
self.title_translations[:zh_tw]
end
def s_title_en
self.title.en
self.title_translations[:en]
end
# def s_text_en

View File

@ -5,7 +5,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
# before_filter :for_admin_only,:only => [:]
# before_filter :for_app_manager,:only => [:index,:show,]
before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_news_bulletins]
before_filter :only => [ :new,:edit,:update] do |controller|
before_filter :only => [ :new,:edit,:update,:create] do |controller|
controller.get_categorys('NewsBulletinCategory')
controller.get_unit_list
end
@ -117,6 +117,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
# POST /news_bulletins
# POST /news_bulletins.xml
def create
get_tags
if params[:news_bulletin_link]

View File

@ -101,11 +101,11 @@ class NewsBulletin
# end
def s_title
self.title.zh_tw
self.title_translations[:zh_tw]
end
def s_title_en
self.title.en
self.title_translations[:en]
end
# def s_text_en