Merge branch 'i18n_var' of github.com:Rulingcom/NCCU into i18n_var

Conflicts:
	app/controllers/pages_controller.rb
	app/models/item.rb
	app/models/site.rb
	config/environments/development.rb
	vendor/built_in_modules/announcement/app/models/bulletin.rb
This commit is contained in:
Christophe Vilayphiou 2012-07-27 19:21:39 +08:00
commit 23854e7adc
1 changed files with 30 additions and 30 deletions

View File

@ -46,7 +46,7 @@ class Bulletin
mount_uploader :image, ImageUploader
# belongs_to :unit_list_for_anc
# belongs_to :unit_list_for_anc
# embeds_many :bulletin_links, :cascade_callbacks => true
# embeds_many :bulletin_files, :cascade_callbacks => true
@ -69,9 +69,9 @@ class Bulletin
:score_field => :view_count,
:condition_fields => [:is_checked,:is_hidden,:bulletin_category_id],
:ext_fields => [])
# def gen_title_for_search
# # [s_title,s_title_en,s_text_en,s_text_zh_tw].join(' ')
# end
# def gen_title_for_search
# # [s_title,s_title_en,s_text_en,s_text_zh_tw].join(' ')
# end
def s_title
self.title.zh_tw
@ -88,22 +88,22 @@ class Bulletin
# Nokogiri::HTML(self.text.zh_tw).text
# end
# scope :currently_available, lambda { |category, limit|
# # limit ||= 5
# # {
# # debugger
# # a=1
# :where => {:bulletin_category_id => bulletin_category_id, :disable => false}#,
# # :limit => limit
# # }
# }
def de_pending
# scope :currently_available, lambda { |category, limit|
# # limit ||= 5
# # {
# # debugger
# # a=1
# :where => {:bulletin_category_id => bulletin_category_id, :disable => false}#,
# # :limit => limit
# # }
# }
def de_pending
self.is_pending = false
end
end
def publish_month
def publish_month
published_at.strftime("%B %Y")
end
end
def self.search( search = nil, category_id = nil )
if category_id.to_s.size > 0 and search.to_s.size > 0