From 2b59f2fc445b2b471e0101e78cbaa11f2271fb68 Mon Sep 17 00:00:00 2001 From: zhuhao Date: Mon, 12 Jan 2015 14:19:51 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BC=B9=E7=AA=97=E6=8C=89=E9=92=AE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/resource.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/resource.css b/public/stylesheets/resource.css index 885423143..f0f969b4a 100644 --- a/public/stylesheets/resource.css +++ b/public/stylesheets/resource.css @@ -118,7 +118,7 @@ a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} .upload_con { } .upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;} .upload_box{ width:430px; margin:15px auto;} -a.upload_btn{ display:block; float:left; margin-top:15px; width:80px; height:30px; text-align: center; color:#fff; font-size:14px; background:#15bccf; margin-right:15px;} +a.upload_btn{ display:block; float:left; margin-top:15px; width:80px; height:30px; text-align: center; color:#fff; font-size:14px; background:#15bccf; margin-right:15px;padding-top: 10px;} a:hover.upload_btn{ background:#55a1b9;} a.upload_btn_grey{background:#a3a3a3;} a:hover.upload_btn_grey{background:#8a8a8a;} From 9f807438d6bbc3ee035b0f396d625327fb1756a1 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 12 Jan 2015 14:58:11 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=95=99=E5=B8=88=E6=95=B0=E7=9B=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=9A-1=20=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=A4=A7=E9=87=8F=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E3=80=82=E6=98=AF=E4=B8=8D=E6=98=AF=E5=8F=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=BF=91=E6=9C=9F3=E4=B8=AA=E6=9C=88=E7=9A=84=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: alan <547533434@qq.com> --- Gemfile | 24 +++++++++---------- app/controllers/courses_controller.rb | 4 ++-- app/controllers/projects_controller.rb | 8 +++---- app/views/welcome/_search_course.html.erb | 2 +- app/views/welcome/_search_project.html.erb | 2 +- .../20150112024820_add_data_for_members.rb | 10 ++++++++ db/schema.rb | 2 +- .../lib/acts_as_activity_provider.rb | 16 +++++++++---- lib/redmine/activity/fetcher.rb | 4 ++-- 9 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 db/migrate/20150112024820_add_data_for_members.rb diff --git a/Gemfile b/Gemfile index 6bb141404..6c2101345 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source 'http://ruby.taobao.org' +source 'http://rubygems.org' #source 'http://ruby.sdutlinux.org/' unless RUBY_PLATFORM =~ /w32/ @@ -33,21 +33,21 @@ group :test do gem 'selenium-webdriver', '~> 2.42.0' - platforms :mri, :mingw do - group :rmagick do - # RMagick 2 supports ruby 1.9 - # RMagick 1 would be fine for ruby 1.8 but Bundler does not support - # different requirements for the same gem on different platforms - gem "rmagick", ">= 2.0.0" - end - end + # platforms :mri, :mingw do + # group :rmagick do + # # RMagick 2 supports ruby 1.9 + # # RMagick 1 would be fine for ruby 1.8 but Bundler does not support + # # different requirements for the same gem on different platforms + # gem "rmagick", ">= 2.0.0" + # end + #end end group :development, :test do - gem "guard-rails", '~> 0.5.3' + # gem "guard-rails", '~> 0.5.3' gem 'spork-testunit', '~> 0.0.8' - gem 'guard-spork', '~> 1.5.1' - gem 'guard-test', '~> 1.0.0' + # gem 'guard-spork', '~> 1.5.1' + # gem 'guard-test', '~> 1.0.0' gem 'ruby-prof', '~> 0.15.1' unless RUBY_PLATFORM =~ /w32/ gem 'pry' gem 'pry-nav' diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index e76fa31dc..9d35b9fb0 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -810,9 +810,9 @@ class CoursesController < ApplicationController # modify by nwb # 添加私密性判断 if User.current.member_of_course?(@course)|| User.current.admin? - events = @activity.events(@date_from, @date_to) + events = @activity.events(@days, @course.created_at) else - events = @activity.events(@date_from, @date_to, :is_public => 1) + events = @activity.events(@days, @course.created_at, :is_public => 1) end # 无新动态时,显示老动态 diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 0b7cbbb5f..5d43a4e20 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -597,8 +597,8 @@ class ProjectsController < ApplicationController "show_wiki_edits"=>true, "show_journals_for_messages" => true } - @date_to ||= Date.today + 1 - @date_from = @date_to - @days-1.years + + @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1') @author = (params[:user_id].blank? ? nil : User.active.find(params[:user_id])) # 决定显示所用用户或单个用户活动 @@ -612,9 +612,9 @@ class ProjectsController < ApplicationController # modify by nwb # 添加私密性判断 if User.current.member_of?(@project)|| User.current.admin? - events = @activity.events(@date_from, @date_to) + events = @activity.events(@days) else - events = @activity.events(@date_from, @date_to, :is_public => 1) + events = @activity.events(@days,nil, :is_public => 1) end @offset, @limit = api_offset_and_limit({:limit => 10}) diff --git a/app/views/welcome/_search_course.html.erb b/app/views/welcome/_search_course.html.erb index 5721af9fb..895f696fb 100644 --- a/app/views/welcome/_search_course.html.erb +++ b/app/views/welcome/_search_course.html.erb @@ -49,7 +49,7 @@ form #search_type{ <%= form_tag({controller: :welcome, action: :search }, method: :get) do %>