From 280092366bb74094992a9e9fdfaf9e27796abbd8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 31 Jan 2015 14:54:37 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/css.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index a64d73832..2319d1f59 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -1,7 +1,5 @@ /* CSS Document */ -#content{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;} -#popbox{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;} -#popbox02{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;} +#content,#popbox,#popbox02{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;} div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;} div,img,tr,td,textarea{ border:0;} table,tr,td{border:0; cellspacing:0; cellpadding:0;} From 1dd8724656bddea4a4fa053f59eac931a35770c8 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 31 Jan 2015 16:10:20 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/index.html.erb | 2 +- public/stylesheets/application.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/organizations/index.html.erb b/app/views/organizations/index.html.erb index a5773ba2f..3e0e507c5 100644 --- a/app/views/organizations/index.html.erb +++ b/app/views/organizations/index.html.erb @@ -9,7 +9,7 @@ <% unless project.enterprise_name.blank? %> <% end %> <% end %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index b11509e14..cbd383151 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -14,7 +14,7 @@ h4 {border-bottom: 1px dotted #bbb;} .syqy_box{ margin-left:-30px; margin-top:5px;} .syqy_box ul li{ float:left; margin-right:10px; border:1px solid #e3e3e3; width:215px; height:30px; padding:5px; padding-right:0px; margin-bottom:10px; overflow:hidden; text-overflow:ellipsis;font-size:14px; color:#464646;white-space: nowrap; } .syqy_box ul li img{ float:left; margin-right:3px; } -.syqy_box ul li a { font-size:14px; color:#464646; height:30px; padding-top:500px;} +.syqy_box ul li a { float:left;font-size:14px; color:#464646; height:30px; padding-top:4px; width: 175px; overflow:hidden; text-overflow:ellipsis;} .syqy_box ul li a:hover{color:#15bccf;} a.syqy_wenzi{ padding-bottom:10px; border:1px solid red;} /*current position*/ From 79d1a069c21ce6772663b39e8f52decde43747b1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 31 Jan 2015 16:19:13 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E5=90=8D=E5=AD=97=E8=BF=87=E9=95=BF=E9=A6=96=E9=A1=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/index.html.erb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 95efcdb0a..ff1841bd4 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -41,16 +41,19 @@ <%= image_tag '/images/avatars/Project/0', width:@first_page.image_width,height: @first_page.image_height %> <% end %> -
+
<% if @organization.nil? %> <% unless @first_page.nil? %> <%= @first_page.description.html_safe %> <% end %> <% else %> - - <%= link_to @organization, options={:action => 'index', :enterprise => @organization}, html_options={ :method => 'get', :style => "color: #E8770D"} %> -
- <%= @first_page.title %> + + <%= link_to @organization, options={:action => 'index', :enterprise => @organization}, html_options={ :method => 'get', :style => "color: #E8770D"} %> + +
+ + <%= @first_page.title %> + <% end %>
\ No newline at end of file diff --git a/app/views/admin/enterprise_page_made.html.erb b/app/views/admin/enterprise_page_made.html.erb new file mode 100644 index 000000000..566f09bb8 --- /dev/null +++ b/app/views/admin/enterprise_page_made.html.erb @@ -0,0 +1,39 @@ +

<%=l(:label_first_page_made)%>

+ +<%= form_tag(:controller => 'admin', :action => 'enterprise_page_made') do %> +

+ + <%= text_field_tag 'web_title', params[:wbe_title],:value => @first_page.web_title, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> +

+ <%= render 'tab_partial' %> +

<%=l(:label_enterprise_page_made)%>

+

+ +

+
+ <%= render :partial=>"avatar/avatar_form",:style => "display:inline",:locals=> {source:@enterprise_page} %> +
+

+ + <%= text_field_tag 'image_width', params[:label_image_width],:value => @enterprise_page.image_width,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> +

+

+ + <%= text_field_tag 'image_height', params[:label_imgae_height], :value => @enterprise_page.image_height,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> +

+

+ + <%= text_field_tag 'course_title', params[:label_site_title], :value => @enterprise_page.title,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> +

+

+ + <%= text_area_tag 'course_description',@enterprise_page.description,:rows => 8, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> +

+ + <%= submit_tag l(:button_save), :class => "small", :name => nil %> +<% end %> +
+ + + +
\ No newline at end of file diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index ff1841bd4..972c3250e 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -38,7 +38,7 @@ <%= image_tag '/images/transparent.png', width:@first_page.image_width,height: @first_page.image_height %> <% end %> <% else %> - <%= image_tag '/images/avatars/Project/0', width:@first_page.image_width,height: @first_page.image_height %> + <%= image_tag(url_to_avatar(@enterprise_page), width:@first_page.image_width,height: @first_page.image_height) %> <% end %>
@@ -52,7 +52,7 @@
- <%= @first_page.title %> + <%= @enterprise_page.title %> <% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index cb89070ff..6f272a980 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2088,4 +2088,5 @@ en: label_anonymous_comments: Anonymous comments label_anonymous: Anonymous label_submit_comments: Submit_comments - label_course_empty_select: You have not selected course! \ No newline at end of file + label_course_empty_select: You have not selected course! + label_enterprise_page_made: enterprise_page \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 50c29bd05..171117778 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -536,6 +536,7 @@ zh: label_project_first_page: 项目托管平台首页 label_course_first_page: 课程实践平台首页 label_contest_first_page: 竞赛实战平台首页 + label_enterprise_page_made: 在线协同开发社区首页 label_web_footer_page: 网站页脚配置 label_organizer_name: 主办单位名称 label_web_footer_description: 页脚内容 diff --git a/config/routes.rb b/config/routes.rb index 81dea18ff..a06679fba 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -640,6 +640,7 @@ RedmineApp::Application.routes.draw do match 'admin/course_page_made', as: :course_page_made match 'admin/contest_page_made', as: :contest_page_made match 'admin/web_footer_made', as: :web_footer_made + match 'admin/enterprise_page_made', as: :enterprise_page_made match 'admin/search', :via => [:get, :post] match 'admin/plugins', :via => :get match 'admin/info', :via => :get From 944dc33212fe95d5873ca0ab8b9607d4221ee03a Mon Sep 17 00:00:00 2001 From: z9hang Date: Sat, 31 Jan 2015 17:14:47 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89API=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index e2c4aa357..bee78a20e 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -39,7 +39,7 @@ module Mobile mount Apis::Homeworks #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) - add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? + #add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? end end From ab18dfcaa882f45276db8f49ae45c05375951778 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 31 Jan 2015 17:19:13 +0800 Subject: [PATCH 06/18] =?UTF-8?q?School=20=3D>=20=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E9=AB=98=E6=A0=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/en.yml | 2 +- config/locales/zh.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index cb89070ff..b7a2b59eb 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1774,7 +1774,7 @@ en: label_project_deposit: Projects label_course_practice: Courses label_forum_all: Forums - label_school_all: Schools +# label_school_all: Schools label_contest_innovate: Competition community label_software_user: Users label_requirement_enterprise: Requirements diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 50c29bd05..02f4afba6 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2421,6 +2421,7 @@ zh: review_assignments: 评审任务 label_my_school: 我的学校 label_all_schol: 全部学校 + label_school_all: 中国高校 label_select_province: 请选择省份 label_search_conditions_not_null: 搜索条件不能为空 From 6261d95ebade08b40cb6e35650c7ed2356a90f3c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 31 Jan 2015 17:27:52 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 972c3250e..30f9f01bb 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -41,7 +41,7 @@ <%= image_tag(url_to_avatar(@enterprise_page), width:@first_page.image_width,height: @first_page.image_height) %> <% end %> -
+
<% if @organization.nil? %> <% unless @first_page.nil? %> <%= @first_page.description.html_safe %> From 78d8a0a1c6fcf8d47729b1d18ea59e7b44ba70bb Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 2 Feb 2015 09:09:45 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E5=8F=8D=E9=A6=88=E6=8A=98=E5=8F=A0=E5=90=8E=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E4=B8=BA=E9=80=8F=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 2039735bc..c4479b43a 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -8,7 +8,7 @@ html{ overflow-x:hidden;} .custom_service p img {display: inline; margin-top:-5px; vertical-align:middle;} -.scrollsidebar{position:absolute; z-index:999; top:150px;} +.scrollsidebar{position:absolute; z-index:999; top:150px;background:none !important;} .side_content{width:154px; height:auto; overflow:hidden; float:left; } .side_content .side_list {width:154px;overflow:hidden;} .show_btn{ width:0; height:112px; overflow:hidden; margin-top:50px; float:left; cursor:pointer;} From a29887cfed64d5a382887cc117f281038c79f709 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 2 Feb 2015 09:43:35 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7=E5=92=8C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E7=9A=84=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E6=A1=86=E6=A1=86=E6=9C=AA=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index 644b678b8..33bff6258 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -46,7 +46,7 @@ <% else%> -
  • +
  • 发布问卷
  • <% end%> From 858b5ea97c2bb896d09c515003b2d406381b90a2 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 2 Feb 2015 11:00:23 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E8=AE=A8?= =?UTF-8?q?=E8=AE=BA=E5=90=A7=E5=8F=91=E5=B8=96=E5=8F=91=E9=80=81=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=E3=80=8B=20Signed?= =?UTF-8?q?-off-by:=20alan=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/forum.rb | 2 +- app/models/mailer.rb | 14 ++++++++------ app/models/memo.rb | 2 +- config/application.rb | 3 ++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/models/forum.rb b/app/models/forum.rb index e47d18b02..baa8e6260 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -23,7 +23,7 @@ class Forum < ActiveRecord::Base acts_as_taggable scope :by_join_date, order("created_at DESC") - after_create :send_email + #after_create :send_email def reset_counters! self.class.reset_counters!(id) end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index f42c20acc..ffd5e87be 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -50,10 +50,15 @@ class Mailer < ActionMailer::Base @forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id) @issue_author_url = url_for(user_activities_url(@author)) recipients ||= [] - mems = memo.self_and_siblings - mems.each do |mem| - recipients << mem.author.mail unless recipients.include? mem.author.mail + if !memo.parent_id.nil? + mems = memo.self_and_siblings + mems.each do |mem| + recipients << mem.author.mail unless recipients.include? mem.author.mail + end + else + recipients << memo.author.mail end + recipients << @author.mail unless recipients.include? @author.mail # cc = wiki_content.page.wiki.watcher_recipients - recipients @memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id))) @@ -98,10 +103,7 @@ class Mailer < ActionMailer::Base #收件人邮箱 @recipients ||= [] @members.each do |teacher| - @recipients << teacher.user.mail - - end mail :to => @recipients, :subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} " diff --git a/app/models/memo.rb b/app/models/memo.rb index 165f8e144..7d463c28b 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -47,7 +47,7 @@ class Memo < ActiveRecord::Base "parent_id", "replies_count" - after_create :add_author_as_watcher, :reset_counters!, :sendmail#,:be_user_score -- 公共区发帖暂不计入得分 + after_create :add_author_as_watcher, :reset_counters! #, :sendmail#,:be_user_score -- 公共区发帖暂不计入得分 # after_update :update_memos_forum after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分 # after_create :send_notification diff --git a/config/application.rb b/config/application.rb index c7f2f3ea5..000250a61 100644 --- a/config/application.rb +++ b/config/application.rb @@ -39,7 +39,8 @@ module RedmineApp # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Activate observers that should always be running. - config.active_record.observers = :journals_for_message_observer, :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer, :comment_observer + config.active_record.observers = :journals_for_message_observer, :message_observer, :issue_observer, :journal_observer, :news_observer, + :document_observer, :wiki_content_observer, :comment_observer, :forum_observer, :memo_observer config.active_record.store_full_sti_class = true config.active_record.default_timezone = :local From 96f538c76b61d784d09b0f4cb1fcc7e9934681d1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 2 Feb 2015 16:42:51 +0800 Subject: [PATCH 11/18] =?UTF-8?q?#1917=E9=82=AE=E4=BB=B6=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=AD=E5=B0=86=E2=80=9C=E6=94=B6=E5=8F=96?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E9=A1=B9=E7=9B=AE=E7=9A=84=E6=89=80=E6=9C=89?= =?UTF-8?q?=E9=80=9A=E7=9F=A5...=E2=80=9D=E5=90=8E=E7=9A=84=E7=9C=81?= =?UTF-8?q?=E7=95=A5=E5=8F=B7=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7187c70d3..42a1143ec 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -999,7 +999,7 @@ zh: label_project_course_unadd: "你还未创建课程,赶快去创建吧!" label_project_cousre_studentun: "你还未加入任何课程,赶快加入吧!" #end by huang - label_user_mail_option_selected: "收取选中项目的所有通知..." + label_user_mail_option_selected: "收取选中项目的所有通知" label_user_mail_option_none: "不收取任何通知" label_user_mail_option_only_my_events: "只收取我跟踪或参与的项目的通知" label_user_mail_option_only_assigned: "只收取分配给我的" From 646678c9db4278ae42d717bd3d4608d6ecd47e6a Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 2 Feb 2015 17:01:07 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B--=E5=AD=A6=E7=94=9F=E5=88=97=E8=A1=A8=EF=BC=9A?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=9C=89=E6=95=88=E6=9D=A1=E4=BB=B6=E8=8E=B7?= =?UTF-8?q?=E5=BE=97=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E6=8C=89=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=EF=BC=8C=E5=8D=B4=E8=87=AA=E5=8A=A8=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=AF=B9=E6=89=80=E6=9C=89=E5=AD=A6=E7=94=9F=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E3=80=8Bbug=20Signed-off-by:=20alan=20<547533434@qq.c?= =?UTF-8?q?om>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 35 ++++++++++++++++++------- app/views/courses/_member_list.html.erb | 2 +- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 7653be94d..61944ca2c 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -254,8 +254,8 @@ class CoursesController < ApplicationController end @is_remote = true @result_count = @results.count - @results = paginateHelper @results - + @results = paginateHelper @results, 10 + @search_name = q end def addgroups @@ -428,17 +428,34 @@ class CoursesController < ApplicationController # @results = paginateHelper @results@score_sort_by = "desc" @is_remote = true @score_sort_by = params[:sort_by] if params[:sort_by] + @search_name = params[:search_name] if params[:search_name] group_id = params[:group_id] - if group_id == '0' - page = params[:page].nil? ? 0 : (params['page'].to_i - 1) - @results = student_homework_score(0,page, 10,@score_sort_by) + if !@search_name.nil? + if group_id == '0' + page = params[:page].nil? ? 0 : (params['page'].to_i - 1) - @results = paginateHelper_for_members @results, 10 + @results = searchmember_by_name(student_homework_score(0,0,0,@score_sort_by), @search_name) + @result_count = @results.count + @results = paginateHelper @results, 10 + else + @group = CourseGroup.find(group_id) + @results = searchmember_by_name(student_homework_score(group_id, 0, 0,@score_sort_by),@search_name) + @result_count = @results.count + @results = paginateHelper @results, 10 + end else - @group = CourseGroup.find(group_id) - @results = student_homework_score(group_id, 0, 0,@score_sort_by) - @results = paginateHelper @results, 10 + if group_id == '0' + page = params[:page].nil? ? 0 : (params['page'].to_i - 1) + @results = student_homework_score(0,page, 10,@score_sort_by) + + @results = paginateHelper_for_members @results, 10 + else + @group = CourseGroup.find(group_id) + @results = student_homework_score(group_id, 0, 0,@score_sort_by) + @results = paginateHelper @results, 10 + end end + end # 显示每个学生的作业评分详情 def show_member_score diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb index dd543ec2c..11bfd9f81 100644 --- a/app/views/courses/_member_list.html.erb +++ b/app/views/courses/_member_list.html.erb @@ -25,7 +25,7 @@
      <% if @subPage_title == l(:label_student_list) %> -
    • <%= link_to '作业积分', member_score_sort_course_path(:sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0)) ,:result => members,method: 'get', remote: true%> +
    • <%= link_to '作业积分', member_score_sort_course_path(:sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true%> <% if @score_sort_by == 'desc' %> <% else %> From 93410e0d57771c7df65c82c24a60b39b9b16813f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 2 Feb 2015 17:23:32 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=20#1919=20=20=E5=8F=96=E6=B6=88=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E7=95=99=E8=A8=80=E7=9A=84=E5=8A=A8=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/show.html.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index aac2c72b4..00543557d 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -158,14 +158,14 @@ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
    -
    - - <%= link_to l(:label_find_all_comments), respond_path(e.act_id) %> - - - <%= l(:label_comments_count, :count => e.act.commit) %> - -
    + + + + + + + + <% when 'Journal' %> From 44c783a61b61692a5bb129457b8ca69ca54d6792 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 2 Feb 2015 17:31:27 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E5=B8=96=E5=AD=90=E7=9A=84=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E9=80=9A=E7=9F=A5=E6=94=B9=E6=88=90=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E7=89=88=E4=B8=BB=E6=94=B6=E5=88=B0=20Signed-off-by:=20alan=20?= =?UTF-8?q?<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index ffd5e87be..2cae982a7 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -50,15 +50,15 @@ class Mailer < ActionMailer::Base @forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id) @issue_author_url = url_for(user_activities_url(@author)) recipients ||= [] - if !memo.parent_id.nil? - mems = memo.self_and_siblings - mems.each do |mem| - recipients << mem.author.mail unless recipients.include? mem.author.mail - end - else - recipients << memo.author.mail - end - recipients << @author.mail unless recipients.include? @author.mail + # if !memo.parent_id.nil? + # mems = memo.self_and_siblings + # mems.each do |mem| + # recipients << mem.author.mail unless recipients.include? mem.author.mail + # end + # else + # recipients << memo.author.mail + # end + recipients << @author.mail # cc = wiki_content.page.wiki.watcher_recipients - recipients @memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id))) From 320ee9289a856e8ba7ec8b9facf136a142abff99 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 3 Feb 2015 09:52:35 +0800 Subject: [PATCH 15/18] =?UTF-8?q?#1897=20=E4=BF=AE=E6=94=B9=E7=82=B9?= =?UTF-8?q?=E5=87=BBDTS=E6=B5=8B=E8=AF=95=E4=B9=8B=E5=90=8E=EF=BC=8CTAB?= =?UTF-8?q?=E9=A1=B5=E8=83=8C=E6=99=AF=E8=89=B2=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 64706887b..02bfc9e19 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -20,11 +20,12 @@ class ProjectsController < ApplicationController layout :select_project_layout - menu_item :overview + menu_item :overview, :only => :show menu_item :roadmap, :only => :roadmap menu_item :settings, :only => :settings menu_item :homework, :only => [:homework, :new_homework] menu_item :feedback, :only => :feedback + menu_item :share, :only => :share before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches] From 7ab5eeab659d89e0100847fbc7e44cfbf4e4fd2b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 3 Feb 2015 10:42:36 +0800 Subject: [PATCH 16/18] =?UTF-8?q?#1839=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E5=BB=B6=E5=90=8E=E7=9C=81=E7=95=A5=E5=8F=B7=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_links.html.erb | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index 2954adbcb..e604409d3 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -1,14 +1,15 @@
    <% for attachment in attachments %>

    - - <% if options[:length] %> - <%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%> - <% else %> - <%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%> - <% end %> - - +

    + + <% if options[:length] %> + <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%> + <% else %> + <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%> + <% end %> + +
    <% if attachment.is_text? %> <%= link_to image_tag('magnifier.png'), :controller => 'attachments', @@ -19,8 +20,9 @@ <%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %> - (<%= number_to_human_size attachment.filesize %>) - + ( + <%= number_to_human_size attachment.filesize %>) + <% if options[:deletable] %> <% if attachment.container_type == 'HomeworkAttach' %> <%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'delete_homework', :id => attachment.id}, @@ -39,8 +41,8 @@ <% end %> <% end %> <% if options[:wrap] %> -
    -   +
    +   <% end %> <% if options[:author] %> From 26b1f9f43356e75a0006db48b8ebd90e779bc138 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 3 Feb 2015 11:24:46 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E7=89=88=E4=B8=AD=E5=AD=98=E5=9C=A8=E7=9A=84=E4=B8=80=E4=BA=9B?= =?UTF-8?q?bug=20=E6=9C=80=E5=A4=9A=E5=8F=AA=E6=98=BE=E7=A4=BA=E5=8D=81?= =?UTF-8?q?=E4=B8=AA=E9=A1=B9=E7=9B=AE=20=E6=8F=90=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/welcome_controller.rb | 26 +++++++++++++++++--------- app/views/organizations/index.html.erb | 6 +++--- app/views/welcome/index.html.erb | 6 +++--- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 144199b86..9001546dc 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -25,22 +25,30 @@ class WelcomeController < ApplicationController before_filter :entry_select, :only => [:index] def index - unless params[:project].nil? - @cur_projects = Project.find(params[:project]) - @organization = @cur_projects.enterprise_name - @organization_projects = Project.find_by_sql(["select * from projects where enterprise_name =? ", @organization]) + # 企业版定制: params[:project]为传过来的参数 + unless params[:organization].nil? + @cur_projects = Project.find(params[:organization]) + @organization = @cur_projects.enterprise_name + @organization_projects = current_user.admin? ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization) @e_count = @organization_projects.count + @part_projects = [] + # 取十个 + @organization_projects.each do |obj| + break if(@organization_projects[10] == obj) + @part_projects << Project.visible.find_by_id("#{obj.id}") unless obj.id.nil? + end + # 不够十个的用最火项目替代 + @e_count < 9 ? @part_projects = find_miracle_project( 9 - @e_count, 3,"score desc") : @part_projects + # 配置文件首页定制 @enterprise_page = FirstPage.find_by_page_type('enterprise') if @enterprise_page.nil? @enterprise_page = FirstPage.new @enterprise_page.page_type = 'enterprise' end - if @e_count < 9 - part_count = 9 - @e_count - # @part_projects = find_all_hot_project part_count, order - @part_projects = find_miracle_project(part_count, 3,"score desc") - end + # 主页配置部分结束 + end + # end 企业版定制结束 if @first_page.nil? || @first_page.sort_type.nil? @projects = find_miracle_project(10, 3,"score desc") else diff --git a/app/views/organizations/index.html.erb b/app/views/organizations/index.html.erb index 3e0e507c5..45813ced5 100644 --- a/app/views/organizations/index.html.erb +++ b/app/views/organizations/index.html.erb @@ -5,11 +5,11 @@ <% if @projects.count == 0 %>

    <%= l(:label_enterprise_nil) %>

    <% else %> - <% @projects.each do |project| %> - <% unless project.enterprise_name.blank? %> + <% @projects.each do |organization| %> + <% unless organization.enterprise_name.blank? %>
    • #{project.enterprise_name} - <%= link_to project.enterprise_name, home_path(:project => project) %>
    • + <%= link_to organization.enterprise_name, home_path(:organization => organization) %>
    <% end %> <% end %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 30f9f01bb..3e0a50ceb 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -48,7 +48,7 @@ <% end %> <% else %> - <%= link_to @organization, options={:action => 'index', :enterprise => @organization}, html_options={ :method => 'get', :style => "color: #E8770D"} %> + <%= @organization %>
    @@ -87,7 +87,7 @@ <% else %> <% if @e_count == 0 %> -

    <%= l(:label_enterprise_tips) %>

    +
    <%= l(:label_enterprise_tips) %>
    <% @projects.map do |project| %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <% end %> @@ -95,7 +95,7 @@ <% @organization_projects.map do |project| %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <% end %> -

    <%= l(:label_part_enterprise_tips) %>

    +
    <%= l(:label_part_enterprise_tips) %>
    <% @part_projects.map do |project| %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <% end %> From 6f9e2bad63584cdf8301bc32e507aea330632c9f Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Fri, 6 Feb 2015 18:15:08 +0800 Subject: [PATCH 18/18] mail weekly --- Gemfile | 2 +- Gemfile.lock | 3 + app/controllers/courses_controller.rb | 1 + app/controllers/messages_controller.rb | 1 + app/controllers/news_controller.rb | 1 + app/controllers/projects_controller.rb | 2 +- app/models/journals_for_message.rb | 4 +- app/models/mailer.rb | 75 +++- app/models/user.rb | 4 +- .../mailer/send_for_user_activities.html.erb | 337 ++++++++++++++++++ .../mailer/send_for_user_activities.text.erb | 253 +++++++++++++ config/initializers/send_mail.rb | 23 ++ config/locales/zh.yml | 20 +- 13 files changed, 718 insertions(+), 8 deletions(-) create mode 100644 app/views/mailer/send_for_user_activities.html.erb create mode 100644 app/views/mailer/send_for_user_activities.text.erb create mode 100644 config/initializers/send_mail.rb diff --git a/Gemfile b/Gemfile index 037c606c8..1bc9e6629 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ gem 'acts-as-taggable-on', '2.4.1' gem 'spreadsheet' gem 'ruby-ole' #gem 'email_verifier', path: 'lib/email_verifier' - +gem 'rufus-scheduler' group :development do gem 'grape-swagger' gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' diff --git a/Gemfile.lock b/Gemfile.lock index 355ca422d..861c49754 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -252,6 +252,8 @@ GEM ruby-ole (1.2.11.7) ruby-openid (2.1.8) rubyzip (1.1.6) + rufus-scheduler (3.0.8) + tzinfo sass (3.3.10) sass-rails (3.2.6) railties (~> 3.2.0) @@ -339,6 +341,7 @@ DEPENDENCIES rspec-rails (= 2.13.1) ruby-ole ruby-openid (~> 2.1.4) + rufus-scheduler sass-rails (~> 3.2.3) seems_rateable! selenium-webdriver (~> 2.42.0) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 61944ca2c..a55abd123 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -5,6 +5,7 @@ class CoursesController < ApplicationController helper :members helper :words + before_filter :authorize1, :only => [:show, :feedback] menu_item :overview menu_item :feedback, :only => :feedback menu_item :homework, :only => :homework diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 8d6943f02..d2a253c2a 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -17,6 +17,7 @@ class MessagesController < ApplicationController include ApplicationHelper + before_filter :authorize1, :only => [:show] menu_item :boards default_search_scope :messages before_filter :find_board, :only => [:new, :preview,:edit] diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 2df17d73f..b44e8a348 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -17,6 +17,7 @@ class NewsController < ApplicationController layout 'base_projects'# by young + before_filter :authorize1, :only => [:show] default_search_scope :news model_object News before_filter :find_model_object, :except => [:new, :create, :index] diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 02bfc9e19..5054fd5c1 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -19,7 +19,7 @@ # Description 封装代码,简化代码,格式化代码, class ProjectsController < ApplicationController layout :select_project_layout - + before_filter :authorize1, :only => [:show] menu_item :overview, :only => :show menu_item :roadmap, :only => :roadmap menu_item :settings, :only => :settings diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index c71fbaf47..39618e43b 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -22,8 +22,8 @@ class JournalsForMessage < ActiveRecord::Base :foreign_key => 'jour_id', :conditions => "#{self.table_name}.jour_type = 'Project' " belongs_to :course, - :foreign_key => 'jour_id', - :conditions => "#{self.table_name}.jour_type = 'Course' " + :foreign_key => 'jour_id' + belongs_to :jour, :polymorphic => true belongs_to :user diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 2cae982a7..85ce46e8b 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -27,6 +27,80 @@ class Mailer < ActionMailer::Base { :host => Setting.host_name, :protocol => Setting.protocol } end + # author: alan + # 根据用户选择发送个人日报或周报 + # 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言 + def send_for_user_activities(user, date_to, days) + date_from = date_to - days.days + + # 生成token用于直接点击登录 + token = Token.new(:user =>user , :action => 'autologin') + token.save + @token = token + + @user_url = url_for(my_account_url(user,:token => @token.value)) + # 查询user参加的项目及课程 + projects = user.projects + courses = user.courses + project_ids = projects.map{|project| project.id}.join(",") + course_ids = courses.map {|course| course.id}.join(",") + + # 查询user的缺陷,包括发布的,跟踪的以及被指派的缺陷 + @issues = Issue.find_by_sql("select DISTINCT i.* from issues i, watchers w + where (i.assigned_to_id = #{user.id} or i.author_id = #{user.id} + or (w.watchable_type = 'Issue' and w.watchable_id = i.id and w.user_id = #{user.id})) + and (i.created_on between #{date_from} and #{date_to}) order by i.created_on desc") + + # 查询课程作业,包括老师发布的作业,以及user提交作业 + @bids ||= [] # 老师发布的作业 + courses.each do |course| + @bids << course.homeworks.where("created_at between #{date_from} and #{date_to} order by i.created_on desc") + end + # user 提交的作业 + @homeworks = HomeworkAttach.where("user_id=#{user.id} and (created_at between #{date_from} and #{date_to})") + + # 查询user在课程。项目中发布的讨论帖子 + messages = Message.find_by_sql("select DISTINCT * from messages where author_id = #{user.id} and (created_on between #{date_from} and #{date_to}) order by i.created_on desc") + @course_messages ||= [] + @project_messages ||= [] + messages.each do |msg| + if msg.project + @project_messages << msg + elsif msg.course + @course_messages << msg + end + end + + # 查询user在课程中发布的通知,项目中发的新闻 + @course_news = News.find_by_sql("select DISTINCT n.* from news n + where n.course_id in (#{course_ids}) + and (created_on between #{date_from} and #{date_to}) order by i.created_on desc") + @project_news = News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids}) + and (created_on between #{date_from} and #{date_to}) order by i.created_on desc") + + # 查询user在课程及个人中留言 + @course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where + jour_type='Course' and user_id = #{user.id} + and (created_on between #{date_from} and #{date_to}) order by i.created_on desc") + @user_journal_messages = user.journals_for_messages.where("m_parent_id IS NULL and (created_on between #{date_from} and #{date_to})").order('created_on DESC') + + # 查询课程课件更新 + @attachments ||= [] + courses.each do |course| + @attachments << course.attachments.where("created_on between #{date_from} and #{date_to}").order('created_at DESC') + end + # 查询user新建贴吧或发布帖子 + @forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between #{date_from} and #{date_to}) order by i.created_on desc") + @memos = Memo.find_by_sql("select DISTINCT m.* from memos m, forums f where (m.author_id = #{user.id} or (m.forum_id = f.id and f.creator_id = #{user.id})) + and (created_at between #{date_from} and #{date_to}) order by i.created_on desc") + if days == 1 + subject = "[ #{user.show_name} : #{date_from} - #{l(:label_day_mail)}]" + else + subject = "[ #{user.show_name} : #{l(:label_week_mail)}]" + end + mail :to => user.mail,:subject => "[ #{user.show_name} : #{l(:notice_successful_create)}]" + + end # 贴吧新建贴吧发送邮件 # example Mailer.forum(forum).deliver def forum_add(forum) @@ -140,7 +214,6 @@ class Mailer < ActionMailer::Base @author = issue.author @issue = issue user = User.find_by_mail(recipients) - token = Token.new(:user =>user , :action => 'autologin') token.save @token = token diff --git a/app/models/user.rb b/app/models/user.rb index 06f59c764..dd06db838 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -24,7 +24,7 @@ class User < Principal DEVELOPER = 3 include Redmine::SafeAttributes - + seems_rateable_rater # Different ways of displaying/sorting users USER_FORMATS = { :firstname_lastname => { @@ -149,7 +149,7 @@ class User < Principal scope :by_join_date, order("created_on DESC") ############################# added by liuping 关注 acts_as_watchable - seems_rateable_rater + has_one :user_extensions,:dependent => :destroy ## end diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb new file mode 100644 index 000000000..22b071a1f --- /dev/null +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -0,0 +1,337 @@ + + + + + +
    +
    +

    <%= l(:label_course_overview)%>

    + <% unless @course_news.first.nil? %> +
      + +

      + <%= l(:label_course_news) %> + (<%= @course_news.count %>) +

      + + <% @course_news.each do |course_new|%> +
    • + + [ + + <%= link_to course_new.course.name, [:controller => 'courses', :action => 'show', :id => course_new.course_id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_project_notice) %> + + <%= link_to course_new.title, [:controller => 'news', :action => 'show', :id => course_new.id,:token => @token.value], + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= course_new.created_on %> +
    • + <% end %> + +
      +
    + <% end %> + <% if !@bids.first.nil? || !@homeworks.first.nil? %> +
      + +

      <%= l(:label_homework_overview) %>>(<%= @bids.count %>)

      + <% unless @bids.first.nil?%> + <% @bids.each do |bid| %> +
    • + + [ + + <%= link_to bid.courses.first.name, [:controller => 'courses', :action => 'show', :id => bid.courses.first.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_course_homework) %> + + <%= link_to bid.name, course_for_bid(:id => bid.id,:token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= bid.created_on %> +
    • + <% end %> + <% end %> + <% unless @homeworks.first.nil? %> + <% @homeworks.each do |homework| %> +
    • + + [ + + <%= link_to homework.bid.courses.first.name, [:controller => 'courses', :action => 'show', :id => homework.bid.courses.first.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_course_submit_homework) %> + + <%= link_to homework.name, course_for_bid(:id => homework.bid.id,:token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= homework.created_on %> +
    • + <% end %> + <% end %> + +
      +
    + <% end %> + + <% unless @course_journal_messages.first.nil? %> +
      + +

      + <%= l(:view_course_journals_for_messages) %> + (<%= @course_journal_messages.count %>) +

      + + <% @course_journal_messages.each do |course_journal_message|%> +
    • + + [ + + <%= link_to course_journal_message.course.name, [:controller => 'courses', :action => 'show', :id => course_journal_message.jour_id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_send_course_journals_for_messages) %> + + <%= link_to course_journal_message.notes, [:controller => 'courses', :action => 'feedback', :id => course_journal_message.jour_id,:token => @token.value], + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= course_journal_message.created_on %> +
    • + <% end %> + +
      +
    + <% end %> + + <% unless @course_messages.first.nil? %> +
      + +

      + <%= l(:view_borad_course) %> + (<%= @course_journal_messages.count %>) +

      + + <% @course_messages.each do |course_message|%> +
    • + + [ + + <%= link_to course_message.course.name, [:controller => 'courses', :action => 'show', :id => course_message.course.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_send_course_messages) %> + + <%= link_to course_message.subject,url_for(course_message.event_url(:token => @token.value)), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= course_message.created_on %> +
    • + <% end %> + +
      +
    + <% end %> + + <% unless @attachments.first.nil? %> +
      +

      + <%= l(:label_course_attendingcontestwork_download) %> + (<%= @attachments.count %>) +

      + + <% @attachments.each do |attachment|%> +
    • + + [ + + <%= link_to attachment.course.name, [:controller => 'courses', :action => 'show', :id => attachment.course.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_course_file_upload) %> + + <%= link_to attachment.filename,course_files_path(@course,:token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= course_message.created_on %> +
    • + <% end %> + +
    + <% end %> +
    + + +
    +

    <%= l(:label_project_overview)%>

    + <% unless @issues.first.nil? %> +
      +

      + <%= l(:label_issue_tracking) %> + (<%= @issues.count %>) +

      + + <% @issues.each do |issue|%> +
    • + + [ + + <%= link_to issue.project.name, [:controller => 'projects', :action => 'show', :id => issue.project.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_project_issue) %> + + <%= link_to issue.subject,url_for(:controller => 'issues', :action => 'show', :id => issue.id, :token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= issue.created_on %> +
    • + <% end %> + +
      +
    + <% end %> + + <% unless @project_messages.first.nil? %> +
      +

      + <%= l(:project_moule_boards_show) %> + (<%= @course_journal_messages.count %>) +

      + + <% @project_messages.each do |project_message|%> +
    • + + [ + + <%= link_to project_message.project.name, [:controller => 'projects', :action => 'show', :id => project_message.project.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_send_course_messages) %> + + <%= link_to project_message.subject,url_for(project_message.event_url(:token => @token.value)), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= project_message.created_on %> +
    • + <% end %> + +
      +
    + <% end %> + + + +
    + +
    +

    <%= l(:label_activities) %>

    + <% unless @user_journal_messages.first.nil? %> +
      +

      + <%= l(:label_user_message) %> + (<%= @user_journal_messages.count %>) +

      + + <% @user_journal_messages.each do |user_journal_message|%> +
    • + + + <%= link_to user_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), + :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <%= l(:label_show_your_message) %> + + <%= link_to user_journal_message.notes, [:controller => 'courses', :action => 'feedback', :id => course_journal_message.jour_id,:token => @token.value], + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= user_journal_message.created_on %>
    • + + <% end %> + +
      +
    + <% end %> +
    +
    + <%= link_to l(:mail_footer), @user_url, :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %> +
    + + +
    + diff --git a/app/views/mailer/send_for_user_activities.text.erb b/app/views/mailer/send_for_user_activities.text.erb new file mode 100644 index 000000000..03ea31ec3 --- /dev/null +++ b/app/views/mailer/send_for_user_activities.text.erb @@ -0,0 +1,253 @@ +<%= l(:label_course_overview)%> + <% unless @course_news.first.nil? %> + <%= l(:label_course_news) %> + (<%= @course_news.count %>) + + + <% @course_news.each do |course_new|%> + + ▪ + [ + + <%= link_to course_new.course.name, [:controller => 'courses', :action => 'show', :id => course_new.course_id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_project_notice) %> + + <%= link_to course_new.title, [:controller => 'news', :action => 'show', :id => course_new.id,:token => @token.value], + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> <%= course_new.created_on %> + + <% end %> + + <% end %> + <% if !@bids.first.nil? || !@homeworks.first.nil? %> + <%= l(:label_homework_overview) %><%= @bids.count %> + <% unless @bids.first.nil?%> + <% @bids.each do |bid| %> + ▪ + [ + + <%= link_to bid.courses.first.name, [:controller => 'courses', :action => 'show', :id => bid.courses.first.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_course_homework) %> + + <%= link_to bid.name, course_for_bid(:id => bid.id,:token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= bid.created_on %> + + <% end %> + <% end %> + <% unless @homeworks.first.nil? %> + <% @homeworks.each do |homework| %> + ▪[ + + <%= link_to homework.bid.courses.first.name, [:controller => 'courses', :action => 'show', :id => homework.bid.courses.first.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_course_submit_homework) %> + + <%= link_to homework.name, course_for_bid(:id => homework.bid.id,:token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= homework.created_on %> + <% end %> + <% end %> + + + + <% end %> + + <% unless @course_journal_messages.first.nil? %> + + <%= l(:view_course_journals_for_messages) %> (<%= @course_journal_messages.count %>) + + + <% @course_journal_messages.each do |course_journal_message|%> + + [ + + <%= link_to course_journal_message.course.name, [:controller => 'courses', :action => 'show', :id => course_journal_message.jour_id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_send_course_journals_for_messages) %> + + <%= link_to course_journal_message.notes, [:controller => 'courses', :action => 'feedback', :id => course_journal_message.jour_id,:token => @token.value], + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= course_journal_message.created_on %> + + <% end %> + + + <% end %> + + <% unless @course_messages.first.nil? %> + + <%= l(:view_borad_course) %> + (<%= @course_journal_messages.count %>) + + + <% @course_messages.each do |course_message|%> + + ▪ + [ + + <%= link_to course_message.course.name, [:controller => 'courses', :action => 'show', :id => course_message.course.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_send_course_messages) %> + + <%= link_to course_message.subject,url_for(course_message.event_url(:token => @token.value)), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= course_message.created_on %> + + <% end %> + + + <% end %> + + <% unless @attachments.first.nil? %> + + <%= l(:label_course_attendingcontestwork_download) %> + (<%= @attachments.count %>) + + + <% @attachments.each do |attachment|%> + ▪[ + + <%= link_to attachment.course.name, [:controller => 'courses', :action => 'show', :id => attachment.course.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_course_file_upload) %> + + <%= link_to attachment.filename,course_files_path(@course,:token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= course_message.created_on %> + + <% end %> + + + <% end %> +
    + + +<%= l(:label_project_overview)%> + <% unless @issues.first.nil? %> + + <%= l(:label_issue_tracking) %> + (<%= @issues.count %>) + + <% @issues.each do |issue|%> + ▪ + [ + + <%= link_to issue.project.name, [:controller => 'projects', :action => 'show', :id => issue.project.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_project_issue) %> + + <%= link_to issue.subject,url_for(:controller => 'issues', :action => 'show', :id => issue.id, :token => @token.value), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= issue.created_on %> + <% end %> + + + <% end %> + + <% unless @project_messages.first.nil? %> + + <%= l(:project_moule_boards_show) %> + (<%= @course_journal_messages.count %>) + + <% @project_messages.each do |project_message|%> + ▪[ + + <%= link_to project_message.project.name, [:controller => 'projects', :action => 'show', :id => project_message.project.id, :token => @token.value], + :class=> "wmail_column", + :style=> "width:90px; font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + + <%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_send_course_messages) %> + + <%= link_to project_message.subject,url_for(project_message.event_url(:token => @token.value)), + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= project_message.created_on %> + <% end %> + + + <% end %> + + + +<%= l(:label_activities) %> + <% unless @user_journal_messages.first.nil? %> + + <%= l(:label_user_message) %> + (<%= @user_journal_messages.count %>) + + <% @user_journal_messages.each do |user_journal_message|%> + ▪ + + <%= link_to user_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), + :class => "wmail_name", + :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; width:50px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <%= l(:label_show_your_message) %> + + <%= link_to user_journal_message.notes, [:controller => 'courses', :action => 'feedback', :id => course_journal_message.jour_id,:token => @token.value], + :class => 'wmail_info', + :style => "color:#5a5a5a; float:left; width:400px; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" + %> + <%= user_journal_message.created_on %> + + <% end %> + + + <% end %> +< + + <%= link_to l(:mail_footer), @user_url, :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %> diff --git a/config/initializers/send_mail.rb b/config/initializers/send_mail.rb new file mode 100644 index 000000000..4cfd3cc03 --- /dev/null +++ b/config/initializers/send_mail.rb @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby + +require 'rubygems' +require 'rufus-scheduler' + +#users = User.where("mail_notification = 'week' or mail_notification = 'day'") + +scheduler = Rufus::Scheduler.new +scheduler.cron('*/1 * * * *') do + users = User.where("login like '%alan%'") + users.each do |user| + # if user.mail_notification == "week" + # cycle = '*/1 * * * *' + # else + # cycle = '*/2 * * * *' + # end + Rails.logger.info "send mail to #{user.show_name}(#{user.mail}) at #{Time.now}" + Thread.start do + Mailer.send_for_user_activities(user, Date.today, 7).deliver + end + end +end + diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 42a1143ec..8899256a9 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -248,6 +248,9 @@ zh: # end field_name: 名称 field_enterprise_name: 组织名称 + + label_week_mail: 一周动态 + label_day_mail: 一日动态 #added by huang field_tea_name: 教师 field_couurse_time: 学时 @@ -497,6 +500,9 @@ zh: permission_paret_in_homework: 加入作业 permission_view_homework_attaches: 查看作业附件 permission_view_course_journals_for_messages: 查看课程留言 + view_course_journals_for_messages: 课程留言 + label_send_course_journals_for_messages: 发布了留言 + label_send_course_messages: 发布了讨论 permission_select_course_modules: 选择课程模块 permission_view_course_files: 查看课程资源 permission_add_course: 新建课程 @@ -511,6 +517,7 @@ zh: permission_upload_attachments: 资源上传 project_module_issue_tracking: 问题跟踪 + project_moule_boards_show: 项目论坛 project_module_time_tracking: 时间跟踪 project_module_news: 新闻 project_module_documents: 文档 @@ -657,6 +664,8 @@ zh: label_user_login_attending_contest: 您还没有登录,请登录后参赛 label_user_login_score_and_comment: 您还没有登录,请登录后对作品进行打分评价 label_user_login_notificationcomment: 您还没有登录,请登录后参加评论 + label_user_message: 您的留言 + label_show_your_message: 给您的留言 #end #by huang # modified by bai label_college: 高校进入 @@ -727,6 +736,7 @@ zh: label_attachment: 文件 label_attachment_new: 新建文件 label_file_upload: 上传资料 + label_course_file_upload: 上传了课件 label_attachment_delete: 删除文件 label_attachment_plural: 文件 label_file_added: 文件已添加 @@ -745,6 +755,8 @@ zh: label_settings: 配置 label_overview: 近期动态 label_course_overview: "课程动态" + label_project_overview: "项目动态" + label_homework_overview: 作业动态 label_question_student: 作业交流 #bai label_homework_commit: 提交作业 #huang label_homework_info: 提交情况 #huang @@ -992,6 +1004,7 @@ zh: label_project_newother: "查看其他评论" label_project_newshare: "分享了" label_project_notice: "发布了通知:" + label_project_issue: "发布了问题:" label_project_newadd: "添加了" label_project_unadd: "暂无项目,赶快去创建吧!" label_project_un: "该用户暂未参与任何项目!" @@ -1591,6 +1604,7 @@ zh: label_exist_repository_path: 定义已有版本库URL路径,定义格式file://, http://, https://, svn:// label_project_no_activity: 该项目暂无动态! label_course_homework_un: 暂未发布任何作业 + label_course_homework: 发布了作业 label_follow_no_requirement: 暂未关注任何需求! label_no_user_respond_you: 暂无任何用户对您进行反馈! label_tags_issue: 问题名称: @@ -1662,6 +1676,7 @@ zh: label_project_no_follow: 该项目暂未被关注! label_no_bid_project: 暂无参与项目 label_no_course_project: 暂无已提交的作业! + label_course_submit_homework: 提交了作业 label_bids_reward_method: 奖励方式 : label_bids_reward_what: 输入奖励内容 label_call_bonus: 奖金 @@ -1769,6 +1784,7 @@ zh: label_wiki_number: wiki的数量 label_message_number: 留言的数量 label_activity_number: 个人动态数量 + label_activities: 个人动态 label_issue_message_number: 对issue的留言数量 label_code_submit_number: 代码提交次数 label_topic_number: 讨论区发言数量 @@ -1954,6 +1970,7 @@ zh: label_hot_project: '热门项目' label_borad_project: 项目讨论区 label_borad_course: 课程讨论区 + view_borad_course: 课程讨论 label_memo_create_succ: 发布成功 label_memo_create_fail: 发布失败 label_forum_create_succ: 贴吧新建成功 @@ -2117,6 +2134,7 @@ zh: label_attendingcontestwork_release_person: 发布人员 label_attendingcontestwork_adaptive_system: 系统支持 label_attendingcontestwork_download: 作品下载 + label_course_attendingcontestwork_download: 课件下载 label_attendingcontestwork_developers: 开发人员 label_attendingcontestwork_average_scores: 平均评分 label_attendingcontestwork_release_time: 发布时间 @@ -2370,7 +2388,7 @@ zh: mail_issue_from_project: "项目问题跟踪" mail_issue_attachments: "附件:" mail_issue_reply: "我要回复" - + mail_footer: "退订Trustie社区任务提醒?" # 课程资源上传 # edit by meng # 课程资源上传>