diff --git a/Gemfile b/Gemfile index 16e6e069b..5406ccce3 100644 --- a/Gemfile +++ b/Gemfile @@ -50,7 +50,7 @@ gem 'tinymce-rails' gem 'therubyracer' if RUBY_PLATFORM.downcase.include?("linux") gem 'libv8', '~> 3.11.8' if RUBY_PLATFORM.downcase.include?("linux") gem 'mongoid-encryptor', :require => 'mongoid/encryptor' -gem 'rb-readline' if RUBY_PLATFORM.downcase.include?("linux") +gem 'rb-readline','~> 0.4.2' if RUBY_PLATFORM.downcase.include?("linux") gem "impressionist", :git => 'git://github.com/charlotte-ruby/impressionist.git' diff --git a/lib/tasks/site.rake b/lib/tasks/site.rake index 6defde52a..c4e1d7fa2 100644 --- a/lib/tasks/site.rake +++ b/lib/tasks/site.rake @@ -13,7 +13,7 @@ namespace :site do puts 'Please upload design package (/admin/designs/upload_package ) and run rake site:necessary_data' I18nVariable.create!( :document_class => 'language', :key => 'en', :en => 'English', :zh_tw => '英文' ) I18nVariable.create!( :document_class => 'language', :key => 'zh_tw', :en => 'Chinese', :zh_tw => '中文' ) - + Info.create!(key: "profile", built_in: true, disabled: false, title: {"zh_tw"=>"基本欄位", "en"=>"Basic Info"}, to_search: false) end task :necessary_data => :environment do diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb index e3ff58d4d..d7f26693d 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb @@ -34,7 +34,7 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => @category_id).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) @current_category = BulletinCategory.from_id(@category_id) rescue nil elsif !params[:tag_id].blank? - @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => params[:tag_id])any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) + @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => params[:tag_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) else @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) end