From e80149c6c8b477eed3beb61f8f14b5d0bc68ab84 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sun, 10 Jan 2016 15:38:45 +0800 Subject: [PATCH 01/18] =?UTF-8?q?@7008=E6=89=BE=E4=B8=8D=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index aa048888c..f3367db59 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -409,7 +409,7 @@ class User < Principal def get_at_show_name name = show_name - name = "#{name} #{self.login}" if name != self.login + (name != self.login) ? "#{name} #{self.login}" : name end #added by nie From a3a16b5591afa81cf928180a8f334f9201e6e6f9 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 11 Jan 2016 10:21:42 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E9=97=AE=E9=A2=98=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?=E3=80=81=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E2=80=9C=E5=B1=95=E5=BC=80=E6=9B=B4=E5=A4=9A=E2=80=9D=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E2=80=9C=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_list.html.erb | 11 +---------- app/views/users/_user_homework_list.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index e47967099..2a1ae56d4 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -24,14 +24,5 @@ <%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %> <% end %> <% if issues.count == 10%> -
展开更多<%=link_to "", project_issues_path({:project_id => project.id}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %>
- <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> + <%= link_to "点击展开更多",project_issues_path({:project_id => project.id}.merge(params)),:id => "show_more_issues",:remote => "true",:class => "loadMore mt10 f_grey"%> <% end%> - - - - \ No newline at end of file diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index efe9216df..36f823a9a 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -42,9 +42,9 @@ <% if homework_commons.count == 10%> <% if is_in_course == 1%> - <%= link_to "加载更多",homework_common_index_path(:course => course_id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%> + <%= link_to "点击展开更多",homework_common_index_path(:course => course_id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%> <% else%> - <%= link_to "加载更多",user_homeworks_user_path(User.current.id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%> + <%= link_to "点击展开更多",user_homeworks_user_path(User.current.id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%> <% end%> <% end%> \ No newline at end of file From a93539da5e44740f9c98d22defd7b0ce3b97d7eb Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 11 Jan 2016 11:07:03 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AD=A6=E6=9C=9F?= =?UTF-8?q?=E5=BE=80=E5=89=8D=E6=8E=A8=E4=B8=80=E4=B8=AA=E5=AD=A6=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 4 +++- public/stylesheets/public.css | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index a1b119cb5..097a3c1a4 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -507,8 +507,10 @@ module CoursesHelper #课程实践年份下拉框 def course_time_option year type = [] + month = Time.now.month now_year = year.nil? ? Time.now.year : (Time.now.year <= year ? Time.now.year : year) - for i in (now_year..now_year + 10) + year = month < 3 ? now_year - 1 : now_year + for i in (year..year + 10) option = [] option << i option << i diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index d39e2600d..23550c623 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -397,7 +397,7 @@ li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;} a.topnav_login_box:hover {color:#a1ebff;} .navRow1 {margin:0; padding:0;} .navRow2 {margin:0; padding:0;} -.topnav_login_list{ border:1px solid #269ac9; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;} +.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;} .topnav_login_list a{color:#15bccf;} .topnav_login_list li{ } From f3b732460cef51a3f58e37e035862f504a725e2d Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 11 Jan 2016 14:57:52 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/_development_group.html.erb | 2 +- ...60111064927_add_issues_count_to_project.rb | 5 +++ ...065137_add_attachments_count_to_project.rb | 5 +++ ...60111065215_add_boards_count_to_project.rb | 5 +++ ...0160111065530_add_news_count_to_project.rb | 5 +++ db/schema.rb | 33 +++++++++++++++++-- 6 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20160111064927_add_issues_count_to_project.rb create mode 100644 db/migrate/20160111065137_add_attachments_count_to_project.rb create mode 100644 db/migrate/20160111065215_add_boards_count_to_project.rb create mode 100644 db/migrate/20160111065530_add_news_count_to_project.rb diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index 83b65fe90..47a1f2a94 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -6,7 +6,7 @@ <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
- 上传时间:<%= format_date(file.created_on)%> + 上传时间:<%= format_time(file.created_on)%> <% if file.tag_list.length > 0%> 上传类型:<%= file.tag_list[0] %> <% end %> diff --git a/app/views/files/_project_list.html.erb b/app/views/files/_project_list.html.erb index 0d4b0f35e..391430126 100644 --- a/app/views/files/_project_list.html.erb +++ b/app/views/files/_project_list.html.erb @@ -19,7 +19,7 @@
- 上传时间:<%= format_date(file.created_on)%> + 上传时间:<%= format_time(file.created_on)%> <% if file.tag_list.length > 0%> 上传类型:<%= file.tag_list[0] %> <% end %> diff --git a/app/views/organizations/_org_course_create.html.erb b/app/views/organizations/_org_course_create.html.erb index dc1e0ee81..a5544ab07 100644 --- a/app/views/organizations/_org_course_create.html.erb +++ b/app/views/organizations/_org_course_create.html.erb @@ -17,9 +17,13 @@
<%= link_to activity.name, course_path(activity.id,:host=>Setting.host_course), :class => "postGrey" %>
-
+
创建时间:<%= format_time(activity.created_at) %>
+
+ 更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> +
+