From eca32ca62533e6e86ef49debbb80a3afeb165401 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 10 Apr 2015 11:44:13 +0800
Subject: [PATCH 01/16] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90?=
=?UTF-8?q?=E5=BA=93=E6=A0=87=E7=AD=BE=E6=90=9C=E7=B4=A2=E4=B8=8D=E6=AD=A3?=
=?UTF-8?q?=E7=A1=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_course_file.html.erb | 2 +-
app/views/files/_course_list.html.erb | 4 ++--
app/views/tags/_tag_add.html.erb | 20 ++++++++++----------
app/views/tags/tag_save.js.erb | 10 +++-------
4 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb
index b6f65e9b2..62fdc3082 100644
--- a/app/views/files/_course_file.html.erb
+++ b/app/views/files/_course_file.html.erb
@@ -9,7 +9,7 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
- $('#ajax-modal').before("")
+ $('#ajax-modal').before("
");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox_polls");
}
diff --git a/app/views/files/_course_list.html.erb b/app/views/files/_course_list.html.erb
index 3d692a36b..3946b1da1 100644
--- a/app/views/files/_course_list.html.erb
+++ b/app/views/files/_course_list.html.erb
@@ -46,8 +46,8 @@
<%= e.event_description.html_safe %>
From 6b758375f8e3560b3359792f38b1f290ac8f251e Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 10 Apr 2015 15:01:33 +0800
Subject: [PATCH 03/16] =?UTF-8?q?1=E3=80=81=E6=90=9C=E7=B4=A2=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E6=8A=A5500=202=E3=80=81=E8=AF=BE=E7=A8=8B=E8=AE=A8?=
=?UTF-8?q?=E8=AE=BA=E5=8C=BA=E6=8F=8F=E8=BF=B0=E6=8D=A2=E8=A1=8C=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/controllers/courses_controller.rb | 10 ++++++++--
app/helpers/courses_helper.rb | 5 +++--
app/views/messages/_form_course.html.erb | 2 +-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index ff937990b..1c2419305 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -1,5 +1,5 @@
class CoursesController < ApplicationController
- layout 'base_courses'
+ # layout 'base_courses'
include CoursesHelper
include ActivitiesHelper
helper :activities
@@ -73,6 +73,7 @@ class CoursesController < ApplicationController
if @course.errors.full_messages.count <= 0
respond_to do |format|
format.html {
+ # render :layout => 'base_courses'
flash[:notice] = l(:notice_successful_update)
redirect_to settings_course_url(@course)
}
@@ -82,7 +83,7 @@ class CoursesController < ApplicationController
respond_to do |format|
format.html {
settings
- render :action => 'settings'
+ redirect_to settings_course_url(@course)
}
format.api { render_validation_errors(@course) }
end
@@ -407,6 +408,10 @@ class CoursesController < ApplicationController
@roles = Role.givable.all[3..5]
@members = @course.member_principals.includes(:roles, :principal).all.sort
+ respond_to do |format|
+ format.html { render :layout => 'base_courses' }
+ format.api { render_validation_errors(@course) }
+ end
else
render_403
end
@@ -424,6 +429,7 @@ class CoursesController < ApplicationController
else
respond_to do |format|
format.html {
+ render :layout => 'base_courses'
flash[:notice] = l(:notice_successful_create)
if params[:continue]
redirect_to new_course_url(attrs, :course => '0')
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index f4a5ac193..55f216ab9 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -20,7 +20,7 @@ module CoursesHelper
# 返回教师数量,即roles表中定义的Manager
def teacherCount project
- project.members.count - studentCount(project).to_i
+ project ? project.members.count - studentCount(project).to_i : 0
# or
# searchTeacherAndAssistant(project).count
end
@@ -152,7 +152,7 @@ module CoursesHelper
# 学生人数计算
# add by nwb
def studentCount course
- course.student.count.to_s#course.student.count
+ course ? course.student.count.to_s : 0#course.student.count
end
#课程成员数计算
@@ -782,6 +782,7 @@ module CoursesHelper
end
def visable_attachemnts_incourse course
+ return[] unless course
result = []
course.attachments.each do |attachment|
if attachment.is_public? || User.current.member_of_course?(course) || User.current.admin?
diff --git a/app/views/messages/_form_course.html.erb b/app/views/messages/_form_course.html.erb
index f4f8126fe..54a62144a 100644
--- a/app/views/messages/_form_course.html.erb
+++ b/app/views/messages/_form_course.html.erb
@@ -44,7 +44,7 @@
<%= f.kindeditor :content, :editor_id => 'message_content_editor',
:owner_id => @message.nil? ? 0: @message.id,
:owner_type => OwnerTypeHelper::MESSAGE,
- :width => '91%',
+ :width => '90%',
:height => 300,
:class => 'talk_text fl',
:input_html => { :id => 'message_content',
From 596bc213ca18ce166755b04fd4e440064259a2e0 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 10 Apr 2015 15:15:49 +0800
Subject: [PATCH 04/16] =?UTF-8?q?1=E3=80=81=E8=AF=BE=E7=A8=8B=E5=AF=BC?=
=?UTF-8?q?=E8=88=AA=E6=87=92=E7=82=B9=E5=87=BB=E8=AF=BE=E7=A8=8B=E8=B7=B3?=
=?UTF-8?q?=E5=88=B0=E5=8A=A8=E6=80=81=E9=A1=B5=E9=9D=A2=202=E3=80=81?=
=?UTF-8?q?=E5=8F=B3=E4=B8=8A=E8=A7=92=E8=AF=BE=E7=A8=8B=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E6=9D=A1=E5=A2=9E=E5=AE=BD=203=E3=80=81=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=20=E6=88=AA=E8=87=B3=E6=97=B6=E9=97=B4-->?=
=?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_courses.html.erb | 2 +-
app/views/news/_course_news.html.erb | 2 +-
public/stylesheets/public.css | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb
index 9fed77faf..dbcf933ff 100644
--- a/app/views/layouts/base_courses.html.erb
+++ b/app/views/layouts/base_courses.html.erb
@@ -43,7 +43,7 @@
<%=l(:label_courses_management_platform)%>
>
- <%= link_to @course.name, nil %>
+ <%= link_to @course.name, course_path(@course) %>
+
<%= journal.notes.html_safe %>
<%= comment.comments.html_safe %>
+<%= comment.comments.html_safe %>
<%= textAreailizable forum.description%>
diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index f12b3186d..4d79f50f9 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -53,7 +53,7 @@<%= textAreailizable act.notes %>
@@ -167,7 +167,7 @@ <% end %><%=textAreailizable act, :description %>
<%= desStr %>
@@ -282,7 +282,7 @@ <% end %><%= textAreailizable act,:long_comments %>
@@ -344,7 +344,7 @@ <% end %><%= textAreailizable(act,:content) %>
@@ -385,7 +385,7 @@ <% end %><%= textAreailizable act,:description %>
@@ -559,7 +559,7 @@ <% end %><%= textAreailizable act, :description %>
@@ -633,7 +633,7 @@<%= textAreailizable e.notes %>
From d99910e8a100f0237536c36ab95e6f3c1774688a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Apr 2015 16:34:57 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=95=99=E8=A8=80=E5=8A=A8=E6=80=81url?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/users_helper.rb | 25 +++++++++++++++++++++++++ app/views/users/show.html.erb | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 58935dd11..af2d5abc4 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -278,4 +278,29 @@ module UsersHelper end } end + + #获取用户留言相关的连接 + def user_jour_feed_back_url active + if active.act_type == "JournalsForMessage" + jour = JournalsForMessage.find active.act_id + if jour + case jour.jour_type + when "Principal" + link_to(l(:label_goto), user_newfeedback_user_path(jour.jour_id)) + when "Project" + link_to(l(:label_goto), project_feedback_path(jour.jour_id)) + when "Bid" + link_to(l(:label_goto), course_for_bid_path(jour.jour_id)) + when "Course" + link_to(l(:label_goto), course_feedback_path(jour.jour_id)) + when "Contest" + link_to(l(:label_goto), show_contest_contest_path(jour.jour_id)) + when "Softapplication" + link_to(l(:label_goto), softapplication_path(jour.jour_id)) + when "HomeworkAttach" + link_to(l(:label_goto), course_for_bid_path(jour.jour_id)) + end + end + end + end end diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 9b0d3651e..d4c0d4379 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -103,7 +103,8 @@- (60个字符以内) + <%= l(:label_news_title_tips)%>
diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index a1966ea53..7131896ca 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -7,20 +7,20 @@ var name = $("#news_title").val(); if(name.length ==0) { - $("#title_notice_span").text("标题不能为空"); + $("#title_notice_span").text("<%= l(:label_title_blank)%>"); $("#title_notice_span").css('color','#ff0000'); $("#title_notice_span").focus(); return false; } else if(name.length <= 60) { - $("#title_notice_span").text("填写正确"); + $("#title_notice_span").text("<%= l(:label_field_correct)%>"); $("#title_notice_span").css('color','#008000'); return true; } else { - $("#title_notice_span").text("标题超过60个字符"); + $("#title_notice_span").text("<%= l(:label_title_long)%>"); $("#title_notice_span").css('color','#ff0000'); $("#title_notice_span").focus(); return false; @@ -32,14 +32,14 @@ var name = $("#news_description").val(); if(name.length ==0) { - $("#description_notice_span").text("描述不能为空"); + $("#description_notice_span").text("<%= l(:label_descripition_blank)%>"); $("#description_notice_span").css('color','#ff0000'); $("#description_notice_span").focus(); return false; } else { - $("#description_notice_span").text("填写正确"); + $("#description_notice_span").text("<%= l(:label_field_correct)%>"); $("#description_notice_span").css('color','#008000'); return true; } diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index bde061f31..bdaaf22fb 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -7,20 +7,20 @@ var name = $("#news_title").val(); if(name.length ==0) { - $("#title_notice_span").text("标题不能为空"); + $("#title_notice_span").text("<%= l(:label_title_blank)%>"); $("#title_notice_span").css('color','#ff0000'); $("#title_notice_span").focus(); return false; } else if(name.length <= 60) { - $("#title_notice_span").text("填写正确"); + $("#title_notice_span").text("<%= l(:label_field_correct)%>"); $("#title_notice_span").css('color','#008000'); return true; } else { - $("#title_notice_span").text("标题超过60个字符"); + $("#title_notice_span").text("<%= l(:label_title_long)%>"); $("#title_notice_span").css('color','#ff0000'); $("#title_notice_span").focus(); return false; @@ -32,14 +32,14 @@ var name = $("#news_description").val(); if(name.length ==0) { - $("#description_notice_span").text("描述不能为空"); + $("#description_notice_span").text("<%= l(:label_descripition_blank)%>"); $("#description_notice_span").css('color','#ff0000'); $("#description_notice_span").focus(); return false; } else { - $("#description_notice_span").text("填写正确"); + $("#description_notice_span").text("<%= l(:label_field_correct)%>"); $("#description_notice_span").css('color','#008000'); return true; } diff --git a/app/views/projects/_join_project.html.erb b/app/views/projects/_join_project.html.erb index 98ab5dcd2..1498830c5 100644 --- a/app/views/projects/_join_project.html.erb +++ b/app/views/projects/_join_project.html.erb @@ -48,7 +48,7 @@
<%= l('project.join.description')%>
+<%= l('project.join.description')%>
- (<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo| + (<%= l(:label_all_revisions) %>:<%= @repositories.sort.collect {|repo| link_to h(repo.name), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil}, diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml index 806e52720..a7a2ca6ba 100644 --- a/config/locales/commons/en.yml +++ b/config/locales/commons/en.yml @@ -180,6 +180,13 @@ en: label_update_time: Update at label_reply: Reply + + label_field_correct: correct input + label_title_blank: Title cannot be blank! + label_title_long: The title should be less than 60 characters + label_descripition_blank: Description cannot be blank! + label_subject_empty: Subject cannot be blank! + label_anonymous: Anonymous #作业和留言 模块 @@ -217,7 +224,8 @@ en: label_preview: Preview button_update: Update button_copy: Copy - + button_check_all: Check all + button_uncheck_all: Uncheck all # # Trustie上传头像模块 @@ -361,8 +369,8 @@ en: # 新闻 # label_news: News - label_news_description: Track the latest activities of projects, and obtain the latest information! - + label_news_description: "Track the latest activities of projects, and obtain the latest information" + label_news_title_tips: "(less than 60 characters)" # # Trustie # diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index 8219d4445..3b4b24ca1 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -190,6 +190,11 @@ zh: text_are_you_sure_out: 你确定要退出该课程吗? text_are_you_sure_out_group: 你确定要退出该分班吗? + label_field_correct: 填写正确 + label_title_blank: 标题不能为空 + label_title_long: 标题超过60个字符 + label_descripition_blank: 描述不能为空 + label_subject_empty: 主题不能为空 label_no_data: 没有任何数据可供显示 # 项目、课程、用户公用 @@ -222,7 +227,10 @@ zh: label_preview: 预览 button_update: 更新 button_copy: 复制 + button_check_all: 全选 + button_uncheck_all: 清除 + # # Trustie上传头像模块 # @@ -367,7 +375,9 @@ zh: # label_news: 新闻 label_news_description: 实时了解项目的最新动态,掌握最新项目咨询! - + label_news_title_tips: (60个字符以内) + + # # # diff --git a/config/locales/en.yml b/config/locales/en.yml index 445c0b2e6..abad29e19 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -146,7 +146,7 @@ en: field_watcher: Watcher field_content: Content field_group_by: Group results by - field_sharing: Sharinglable_hot_course + field_parent_issue: Parent task field_member_of_group: "Assignee's group" field_assigned_to_role: "Assignee's role" @@ -334,7 +334,7 @@ en: label_contest_modify_settings: Configuration bale_news_notice: Add a notification - label_field_correct: correct input + label_work_description_lengthlimit: less than 500 characters label_create_new_projects: Create a project label_work_scores_people: The total number of users given scores @@ -749,8 +749,7 @@ en: label_gantt_progress_line: Progress line - button_check_all: Check all - button_uncheck_all: Uncheck all + button_collapse_all: Collapse all button_expand_all: Expand all diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index db2aa7801..3b6af9a08 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -146,7 +146,6 @@ en: label_issue_new: New issue # 自定义查询 - label_query_plural: Custom queries label_query_new: New query label_my_queries: My custom queries @@ -216,11 +215,14 @@ en: label_post_by: "Started by " label_post_by_time: "on " label_short_reply: "RE:" + + # # 项目托管平台 # - # 资源库 + # 动态 # + label_active_create_project: "created project" # @@ -228,7 +230,7 @@ en: # # 版本库 # - lael_all_revisions: All revisions: + label_all_revisions: "All revisions" label_latest_revision: Latest revision label_latest_revision_plural: Latest revisions label_view_revisions: View revisions @@ -244,12 +246,18 @@ en: label_issue_category_plural: Issue type label_repository_plural: Repository enumeration_activities: Activity type - + + # 项目工具 text_select_project_modules: "Select tools to enable for this project" project_module_issue_tracking: Issue tracking project_module_time_tracking: Time tracking #project_module_course: 课程 project_module_boards: Forums + + # 项目成员 + label_approve: Approve + label_refusal: Refusal + # # 项目托管平台 @@ -302,6 +310,13 @@ en: id: label: "Project ID:" tips: "Project ID is the unique number for each project" + tips: + notexist: The project does not exist + repeat: Please do not apply to join the project again + success: Application successfully + has: You has joined in the project + fail: Application failure + # # 项目托管平台 @@ -334,5 +349,5 @@ en: # # 项目配置 # - label_approve: Approve - label_refusal: Refusal \ No newline at end of file + field_sharing: Sharinglable + label_title_code_review: Review diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 4c04063f2..3c568085d 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -271,16 +271,16 @@ zh: # # 项目托管平台 # - # 资源库 + # 动态 # - + label_active_create_project: "创建了项目" # # 项目托管平台 # # 版本库 # - label_all_revisions: "所有版本:" + label_all_revisions: "所有版本" label_latest_revision: 最近的修订版本 label_latest_revision_plural: 最近的修订版本 label_view_revisions: 查看修订 @@ -289,19 +289,24 @@ zh: # 项目托管平台 # # 项目配置 - # + # label_module_plural: 模块 label_version_plural: 版本 label_issue_category_plural: 问题类别 label_repository_plural: 版本库 enumeration_activities: 活动(时间跟踪) - + # 项目工具 text_select_project_modules: '请选择此项目可以使用的模块:' project_module_issue_tracking: 问题跟踪 project_moule_boards_show: 项目论坛 project_module_time_tracking: 时间跟踪 - project_module_course: 课程 + #project_module_course: 课程 + + # 成员配置 + label_approve: 批准 + label_refusal: 拒绝 + # @@ -354,8 +359,15 @@ zh: id: label: "项目ID:" tips: "项目ID是所在项目网址中显示的序号" - + tips: + notexist: 您申请的项目不存在 + repeat: 请勿重复申请加入该项目 + success: 申请成功 + has: 您已加入该项目 + fail: 申请失败 + + # # 项目托管平台 # @@ -385,5 +397,5 @@ zh: # # 项目配置 # - label_approve: 批准 - label_refusal: 拒绝 + field_sharing: 共享 + label_title_code_review: 代码评审 diff --git a/config/locales/users/en.yml b/config/locales/users/en.yml index c96ff45b2..76d8265aa 100644 --- a/config/locales/users/en.yml +++ b/config/locales/users/en.yml @@ -24,7 +24,7 @@ en: # # 左边栏 # - label_user_edit: Edit + label_user_edit: Edit information label_user_grade: Score label_user_score: Total diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 76b7f998d..a36955fc9 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -170,7 +170,7 @@ zh: field_content: 内容 field_group_by: 根据此条件分组 - field_sharing: 共享 + field_parent_issue: 父任务 field_member_of_group: 用户组的成员 @@ -839,8 +839,7 @@ zh: label_user_search: "搜索用户:" label_mobile_version: "移动端版本管理" - button_check_all: 全选 - button_uncheck_all: 清除 + button_create_and_continue: 创建并继续 button_test: 测试 @@ -1762,7 +1761,7 @@ zh: label_user_login_softapplication_board: 您还没有登录,请登录后参与应用评价。 label_contest_description_no: 暂无描述。 label_no_contest_softapplication: 暂无参赛应用 - label_field_correct: 填写正确 + label_button_ok: 确定 label_tags_contest: 竞赛标签 label_tags_contest: 竞赛名称 @@ -1890,7 +1889,7 @@ zh: label_contest_news_condition: 竞赛描述超过5000个汉字 label_no_contest_news_title: 竞赛标题不能为空 label_contest_news_title_condition: 竞赛标题超过255个汉字 - label_subject_empty: 主题不能为空 + label_course_organizers: 开设单位 label_teacher_score: 教师评分 label_student_score: 学生评分 diff --git a/plugins/redmine_code_review/app/views/code_review/index.html.erb b/plugins/redmine_code_review/app/views/code_review/index.html.erb index ee1d7df9d..7de7b612f 100644 --- a/plugins/redmine_code_review/app/views/code_review/index.html.erb +++ b/plugins/redmine_code_review/app/views/code_review/index.html.erb @@ -1,5 +1,5 @@
<%= comment.comments.html_safe %>
+<%= comment.comments.html_safe %>
+
<%= journal.notes.html_safe %>