From 5562456a855281ca2e41304be0f7c46e58da4b40 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 9 Apr 2015 16:25:19 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=8F=90=E9=97=AE?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index de72cab7c..a96bc0fbe 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -434,7 +434,7 @@ class CoursesService many_times = course.homeworks.index(bid) + 1 name = bid.name homework_count = bid.homeworks.count #已提交的作业数量 - student_questions_count = bid.commit.nil? ? 0 : bid.commit + student_questions_count = bid.journals_for_messages.where('m_parent_id IS NULL').count description = bid.description #if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2 state = bid.comment_status @@ -454,7 +454,7 @@ class CoursesService many_times = course.homeworks.index(bid) + 1 name = bid.name homework_count = bid.homeworks.count #已提交的作业数量 - student_questions_count = bid.commit.nil? ? 0 : bid.commit + student_questions_count = bid.journals_for_messages.where('m_parent_id IS NULL').count description = bid.description #if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2 state = bid.comment_status From bcf83328f2a46db9185bc2e9f1eddbe8fbc95d31 Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 9 Apr 2015 20:46:48 +0800 Subject: [PATCH 02/21] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/invite_members.html.erb | 2 +- config/locales/commons/en.yml | 16 ++- config/locales/commons/zh.yml | 7 +- config/locales/en.yml | 57 ++-------- config/locales/projects/en.yml | 57 +++++++++- config/locales/projects/zh.yml | 108 ++++++++++++++++-- config/locales/zh.yml | 121 +++++++-------------- 7 files changed, 217 insertions(+), 151 deletions(-) diff --git a/app/views/projects/invite_members.html.erb b/app/views/projects/invite_members.html.erb index 55fa2487b..34764b24b 100644 --- a/app/views/projects/invite_members.html.erb +++ b/app/views/projects/invite_members.html.erb @@ -25,7 +25,7 @@ <%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :method => :post}) do |f| %>
- <%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "10"} %> - <%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "10"} %> + <%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %> + <%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6"} %>
diff --git a/app/views/tags/_tag_add.html.erb b/app/views/tags/_tag_add.html.erb index 610c3edfa..f8cac7c0d 100644 --- a/app/views/tags/_tag_add.html.erb +++ b/app/views/tags/_tag_add.html.erb @@ -2,13 +2,13 @@ :class => "yellowBtn f_l", :onclick=>"$('#add_tag_#{obj.id}').slideToggle();" if User.current.logged? %> - <%= form_for "tag_for_save",:remote=>true,:url => save_tag_path, - :update => "tags_show", - :complete => '$("#put-tag-form").hide();' do |f| %> - - <% end %> +<%= form_for "tag_for_save",:remote=>true,:url => save_tag_path, + :update => "tags_show", + :complete => '$("#put-tag-form").hide();' do |f| %> + +<% end %> diff --git a/app/views/tags/tag_save.js.erb b/app/views/tags/tag_save.js.erb index 2bef1a3a3..c7dbec65d 100644 --- a/app/views/tags/tag_save.js.erb +++ b/app/views/tags/tag_save.js.erb @@ -6,20 +6,16 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n $('#name-issue').val(""); <% elsif @obj_flag == '6'%> $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); -$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); -//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide(); -$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val(""); +$("#tags_name_<%=@obj.id%>").val(""); +$("#add_tag_<%=@obj.id%>").hide(); <% elsif @obj_flag == '9'%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); $('#tags_name').val(""); <% elsif @obj_flag == '10'%> -$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); -$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name', - :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); //$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide(); -$("#tags_name_<%=@obj.id%>").val(""); <% else%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); From 2a35e771c2767040b70d5df07fabf9fc2b28e5c4 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 10 Apr 2015 12:48:02 +0800 Subject: [PATCH 06/21] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E5=8F=8A=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=9B=E6=A0=87=E7=AD=BE=E6=A8=A1=E5=9D=97=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E5=8F=8A=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_project_show.html.erb | 22 ++- app/views/issues/index.html.erb | 2 +- app/views/projects/files_tags.html.erb | 2 +- app/views/projects/settings/_modules.html.erb | 2 +- app/views/repositories/show.html.erb | 2 +- app/views/tags/_show_attachments.html.erb | 10 +- app/views/tags/_show_issues.html.erb | 2 +- .../tags/_show_open_source_projects.html.erb | 2 +- app/views/tags/show_all.html.erb | 2 +- app/views/welcome/contest.html.erb | 4 +- app/views/welcome/course.html.erb | 4 +- app/views/welcome/index.html.erb | 10 +- config/locales/commons/en.yml | 97 +++++----- config/locales/commons/zh.yml | 25 +-- config/locales/en.yml | 20 +-- config/locales/my/en.yml | 4 +- config/locales/navigatiors/en.yml | 35 ++-- config/locales/navigatiors/zh.yml | 5 +- config/locales/projects/en.yml | 166 ++++++++++-------- config/locales/projects/zh.yml | 22 ++- config/locales/zh.yml | 21 +-- 21 files changed, 250 insertions(+), 209 deletions(-) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index e69fa2730..765cb2a65 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -10,7 +10,7 @@
<% if User.current.logged? %>
-

<%= l(:label_message_new) %>

+

<%= l(:project_module_boards_post) %>

<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %> <%= render :partial => 'messages/form', :locals => {:f => f} %> @@ -39,12 +39,18 @@
-

<%= h @board.name %>

+

+ <% if User.current.language == "zh"%> + <%= h @board.name %> + <% else %> + <%= l(:project_module_boards) %> + <% end %> +

-
项目讨论区共有<%= @topic_count %>个帖子
+
<%= l(:label_project_board_count , :count => @topic_count)%>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> - <%= link_to l(:label_message_new), new_board_message_path(@board), + <%= link_to l(:project_module_boards_post), new_board_message_path(@board), :class => 'problem_new_btn fl', :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> <% end %> @@ -61,15 +67,15 @@
<%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %> <% if topic.sticky? %> - 置顶 + <%= l(:label_board_sticky)%> <% end %>
- 由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> - 添加于<%= format_time topic.created_on %> + <%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> +  <%= l(:label_post_by_time)%><%= format_time topic.created_on %>
- <%= link_to (l(:label_reply) + topic.replies_count.to_s), board_message_path(@board, topic), :style =>"color:#fff;" %> + <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :style =>"color:#fff;line-height: 18px;" %>
<% end %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 012178ae2..682ff4c99 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -12,7 +12,7 @@ :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %> <% end %> - <%= l(:label_issues_sum) %>:<%= @project.issues.count %> <%= l(:lable_issues_undo) %> <%= @project.issues.where('status_id in (1,2,4,6)').count %> + <%= l(:label_issues_sum) %>:<%= @project.issues.count %> <%= l(:lable_issues_undo) %>:<%= @project.issues.where('status_id in (1,2,4,6)').count %>
<% if !@query.new_record? && @query.editable_by?(User.current) %> diff --git a/app/views/projects/files_tags.html.erb b/app/views/projects/files_tags.html.erb index f451a59f5..3e40d8d83 100644 --- a/app/views/projects/files_tags.html.erb +++ b/app/views/projects/files_tags.html.erb @@ -7,7 +7,7 @@

<%= l(:label_tags_search_result) %>

- <%= l(:label_tags_numbers) %> + <%= l(:label_tags_numbers) %>: <%= l(:label_issue_plural) %>(<%= @issues_tags_num %>) | <%= l(:label_project_plural) %>(<%= @projects_tags_num %>) | <%= l(:label_user_plural) %>(<%= @users_tags_num %>) | diff --git a/app/views/projects/settings/_modules.html.erb b/app/views/projects/settings/_modules.html.erb index 7b8ff3e6e..77a7321ec 100644 --- a/app/views/projects/settings/_modules.html.erb +++ b/app/views/projects/settings/_modules.html.erb @@ -4,7 +4,7 @@ :method => :post} do |f| %>
-<%= l(:text_select_project_modules) %> +<%= l(:text_select_project_modules) %>: <% Redmine::AccessControl.available_project_modules.each do |m| %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 427ecddc1..df91056a0 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,6 +1,6 @@ <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
-

版本库

+

<%=l(:project_module_repository)%>

<%= render :partial => 'navigation' %> diff --git a/app/views/tags/_show_attachments.html.erb b/app/views/tags/_show_attachments.html.erb index ca6a2dd7a..1c8224029 100644 --- a/app/views/tags/_show_attachments.html.erb +++ b/app/views/tags/_show_attachments.html.erb @@ -24,19 +24,19 @@    <%= file.description %>
- <%= l('attachment.category')%> + <%= l('attachment.category')%>: <%=result_come_from file%>
- <%= l('attachment.download_num')%> + <%= l('attachment.download_num')%>: <%= file.downloads%>| - <%= l('attachment.size')%> + <%= l('attachment.size')%>: <%= number_to_human_size(file.filesize) %>| - <%= l('attachment.sharer')%> + <%= l('attachment.sharer')%>: <%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %> | - <%= l('attachment.upload_time')%> + <%= l('attachment.upload_time')%>: <%= format_time(file.created_on) %>
diff --git a/app/views/tags/_show_issues.html.erb b/app/views/tags/_show_issues.html.erb index d02737e21..6a465a257 100644 --- a/app/views/tags/_show_issues.html.erb +++ b/app/views/tags/_show_issues.html.erb @@ -3,7 +3,7 @@
<% issues_results.each do |issue| %>

- <%= l(:label_tags_issue) %><%= link_to "#{issue.subject}",:controller => "issues",:action => "show",:id => issue.id %> + <%= l(:label_tags_issue) %>:<%= link_to "#{issue.subject}",:controller => "issues",:action => "show",:id => issue.id %>
<%= l(:label_tags_issue_description) %>:<%= textilizable issue.description %>

diff --git a/app/views/tags/_show_open_source_projects.html.erb b/app/views/tags/_show_open_source_projects.html.erb index 311863885..f255515b8 100644 --- a/app/views/tags/_show_open_source_projects.html.erb +++ b/app/views/tags/_show_open_source_projects.html.erb @@ -4,7 +4,7 @@ <% projects_results.each do |prj| %>

- <%= l(:label_tags_project_name) %><%= link_to "#{prj.name}",:controller => "open_source_projects",:action => "show",:id => prj.id %> + <%= l(:label_tags_project_name) %>:<%= link_to "#{prj.name}",:controller => "open_source_projects",:action => "show",:id => prj.id %>
<%= l(:label_tags_project_description) %><%= textilizable prj.short_description %>

diff --git a/app/views/tags/show_all.html.erb b/app/views/tags/show_all.html.erb index e906c9dd9..58fe1fb1f 100644 --- a/app/views/tags/show_all.html.erb +++ b/app/views/tags/show_all.html.erb @@ -1,5 +1,5 @@ <% content_for :content do %> -

<%= l(:label_tags_count) %><%= @tags.size %>个

+

<%= l(:label_tags_count) %>:<%= @tags.size %>个


<% i = 0 %>
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 9bf0d3b9d..ab79eeec7 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -277,11 +277,11 @@ <%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %> - <%=l(:label_question_sponsor)%>: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %> + <%=l(:label_question_sponsor)%> <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %> <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %> - <%=l(:label_final_reply)%>:  + <%=l(:label_final_reply)%>  <%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%> <% end %> diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index dc4679b14..91fa2110c 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -203,12 +203,12 @@ <%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %> - <%= l(:label_question_sponsor)%>: + <%= l(:label_question_sponsor)%> <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %> <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %> - <%= l(:label_final_reply)%>: + <%= l(:label_final_reply)%> <%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%> <% end %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index ba0002eff..dc8ef7f35 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -44,7 +44,11 @@
<% if @organization.nil? %> <% unless @first_page.nil? %> - <%= @first_page.description.html_safe %> + + <%= l(:label_welcome_trustie_project)%>,  + <%= l(:label_welcome_trustie_project_description)%> <% end %> <% else %> @@ -132,12 +136,12 @@ <%= format_time topic_last_time topic %> - <%= l(:label_question_sponsor)%>: + <%= l(:label_question_sponsor)%> <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %> <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %> - <%= l(:label_final_reply)%>: + <%= l(:label_final_reply)%> <%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%> <% end %> diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml index 0de058a0f..806e52720 100644 --- a/config/locales/commons/en.yml +++ b/config/locales/commons/en.yml @@ -176,16 +176,16 @@ en: label_loading: Loading... - label_create_time: Created time - label_update_time: Update time + label_create_time: Created at + label_update_time: Update at label_reply: Reply label_anonymous: Anonymous #作业和留言 模块 text_are_you_sure: Are you sure? #js 提示 - text_are_you_sure_out: 你确定要退出该课程吗? - text_are_you_sure_out_group: 你确定要退出该分班吗? + text_are_you_sure_out: Are you sure to quit from this course? + text_are_you_sure_out_group: Are you sure to quit from this group? @@ -225,9 +225,9 @@ en: # # button_upload_photo: Upload photo - button_delete_file: delete - error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})" - error_pic_type: "Only supports the following image formats:" + button_delete_file: Delete + error_attachment_too_big: "Cannot be uploaded when exceeding (%{max_size})" + error_pic_type: "Only supports the following image formats: " # @@ -240,47 +240,47 @@ en: label_more_tags: More label_add_tag: "+ Add tags" - label_tags_count: "The total number of tags:" + label_tags_count: "Total number of tags" label_tags_selected: Selected Tags label_tags_related: Related Tags label_tags_search_result: Search Results - label_tags_numbers: "Tag numbers:" + label_tags_numbers: "Tags" label_tags_call: Calls - label_tags_contest: Competition tag - label_tags_opensource: Open source projects + label_tags_contest: Competitions + label_tags_opensource: Projects - label_tags_all_objects: all objects + label_tags_all_objects: All objects - label_tags_bid: Call name - label_tags_bid_description: call description + label_tags_bid: Name + label_tags_bid_description: Description - label_tags_course_name: Course Title + label_tags_course_name: Title label_new_course_description: Description - label_tags_issue: "issue:" - label_tags_issue_description: issue description + label_tags_issue: Issue + label_tags_issue_description: Description - label_tags_project_name: "Project name:" - label_tags_project_description: "Project description:" + label_tags_project_name: "Project name" + label_tags_project_description: "Description" label_tags_user_mail: "User E-mail:" label_tags_user_name: "User Name:" - label_tags_contest_name: Contest name - label_tags_contest_description: Contest description + label_tags_contest_name: Name + label_tags_contest_description: Description - label_tags_forum_description: Forum description - label_tags_forum: Call forum + label_tags_forum_description: Description + label_tags_forum: Forum label_attachment: Files attachment: - category: "From:" - download_num: "Downloads:" - size: "Size:" - sharer: "Sharer:" - upload_time: "Upload time:" + category: "From" + download_num: "Downloads" + size: "Size" + sharer: "Sharer" + upload_time: "Upload time" # @@ -316,14 +316,18 @@ en: # "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}" # "缺陷 #1869 (已解决):subject" # tracker.name和status在数据库中以中文字段形式存储 - - # 项目托管平台主页 > 贴吧动态栏 - lable_bar_active: Question&Feedback - label_my_question: My-question - label_my_feedback: My-feedback + + # + # 项目托管平台主页 + # + # 贴吧动态栏 + # + lable_bar_active: Feedbacks + label_my_question: Ask + label_my_feedback: Comment label_updated_time: "Updated %{value} ago" - label_question_sponsor: Sponsor - label_final_reply: Last-reply + label_question_sponsor: Created by + label_final_reply: Updated by # @@ -334,17 +338,30 @@ en: label_feedback: Feedback label_feedback_tips: "Anything you want to say, roar it here ~~" label_technical_support: "Support: " - label_feedback_success: "Your comments have been posted back to the bar of discussion by newbie(in the Public Post Bar), we will be the first time to solve your problem, thanks for your support!" - label_feedback_value: "The posts comes from user feedback!" + label_feedback_success: "Your comments have been sent to the public bar in the home page, thanks for your support!" + label_feedback_value: "The post comes from user feedback box!" + + # + # + # + # 评论 + # + label_find_all_comments: view all comments + label_comments_count: + zero: "(%{count} comment)" + one: "(%{count} comment)" + other: "(%{count} comments)" + + + - # # Trustie # # 新闻 # - label_news: 新闻 - + label_news: News + label_news_description: Track the latest activities of projects, and obtain the latest information! # # Trustie diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index c7d025f28..8219d4445 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -244,12 +244,12 @@ zh: label_more_tags: 更多 label_add_tag: "+ 添加标签" - label_tags_count: "总标签数:" + label_tags_count: "总标签数" label_tags_selected: 已选标签 label_tags_related: 相关标签 label_tags_search_result: 搜索结果 - label_tags_numbers: "Tag统计:" + label_tags_numbers: "Tag统计" label_issue_plural: 问题跟踪 label_project_plural: 项目列表 @@ -270,11 +270,11 @@ zh: label_tags_course_name: 课程名称 label_new_course_description: 课程描述 - label_tags_issue: "问题名称:" + label_tags_issue: "问题名称" label_tags_issue_description: 问题描述 label_tags_project_name: "项目名称:" - label_tags_project_description: "项目描述:" + label_tags_project_description: "项目描述" label_tags_user_mail: "用户邮箱:" label_tags_user_name: "用户名:" @@ -287,11 +287,11 @@ zh: label_attachment: 文件 attachment: - category: "所属分类:" - download_num: "下载:" - size: "大小:" - sharer: "共享者:" - upload_time: "上传时间:" + category: "所属分类" + download_num: "下载" + size: "大小" + sharer: "共享者" + upload_time: "上传时间" # # 项目托管平台主页 @@ -355,7 +355,10 @@ zh: # 评论 # label_find_all_comments: 查看所有评论 - label_comments_count: (%{count}条评论) + label_comments_count: + zero: (%{count}条评论) + one: (%{count}条评论) + other: (%{count}条评论) # # @@ -363,7 +366,7 @@ zh: # 新闻 # label_news: 新闻 - + label_news_description: 实时了解项目的最新动态,掌握最新项目咨询! # # diff --git a/config/locales/en.yml b/config/locales/en.yml index f5e0fc63d..445c0b2e6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -570,10 +570,7 @@ en: label_copied: copied label_renamed: renamed label_deleted: deleted - label_latest_revision: Latest revision - label_latest_revision_plural: Latest revisions - label_view_revisions: View revisions - label_view_all_revisions: View all revisions + label_sort_highest: Move to top label_sort_higher: Move up label_sort_lower: Move down @@ -637,7 +634,7 @@ en: label_board_new: New forum label_board_plural: Forums label_board_locked: Locked - label_board_sticky: Sticky + label_topic_plural: Topics field_sticky: '' field_locked: '' @@ -654,7 +651,7 @@ en: label_date_from: From label_date_to: To label_language_based: Based on user's language - label_sort_by: "Sort by %{value}" + label_send_test_email: Send a test email label_feeds_access_key: RSS access key label_missing_feeds_access_key: Missing a RSS access key @@ -971,9 +968,6 @@ en: label_delete_confirm: Confirm delete? - label_exit_project: Exit Project - label_apply_project_waiting: "Application has been submitted, please wait for administrator review." - label_unapply_project: Unsubscribe #fq @@ -1029,9 +1023,8 @@ en: label_priority_as: Priority as label_author_name: Posted by %{author_name} - label_comments_count: (%{count} comments) label_post_on: posts on - label_find_all_comments: view all comments + label_updated_time_on: " Updated on %{value} " label_call_list: Calls list @@ -1082,8 +1075,7 @@ en: label_create_new_projects_description: Create a new project, you will open a magical journey of collaborative creation and development! label_call_for_bids_description: Publish your call for anything, feel the excitement of hundreds respond to a single call! label_create_course_description: Create a new course, let us share the public resources in the course community which are more than you can imagine! - label_news: News - label_news_description: Track the latest activities of projects, and obtain the latest information! + label_milestone: Milestone label_milestone_description: Review the commits, branches and versions of your project! label_features: Features @@ -1124,7 +1116,7 @@ en: label_follow_no_requirement: You don't have followed any requirements! - label_all_revisions: All revisions: + label_repository_name: Repository name label_upassword_info: The password can be shared in the group label_how_commit_code: How to commit code: diff --git a/config/locales/my/en.yml b/config/locales/my/en.yml index a1a3dd275..3933c61f1 100644 --- a/config/locales/my/en.yml +++ b/config/locales/my/en.yml @@ -13,9 +13,9 @@ en: label_location: Location label_identity: Identity # top_menu 个人相关 - label_my_course: My Course + label_my_course: My Courses label_my_message: Msgs - label_my_projects: My projectsed + label_my_projects: My Projects # diff --git a/config/locales/navigatiors/en.yml b/config/locales/navigatiors/en.yml index 52ee1a4a7..087f759e8 100644 --- a/config/locales/navigatiors/en.yml +++ b/config/locales/navigatiors/en.yml @@ -11,10 +11,10 @@ en: label_course_practice: Courses label_forum_all: Forums label_school_all: Schools - label_contest_innovate: Competition community + label_contest_innovate: Competitions label_software_user: Users # 删除 label_requirement_enterprise: Requirements # 删除 - label_stores_index: Resource search + label_stores_index: Search label_login: Login @@ -23,8 +23,8 @@ en: # # 主旨 # - label_welcome_trustie_project: Trustie online projects hosting platform - label_welcome_trustie_project_description: "Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange." + label_welcome_trustie_project: Trustie online projects hosting services + label_welcome_trustie_project_description: "Socialized research & development communities for distributed collaboration, resource sharing, code hosting and acitivity analysis." # @@ -32,8 +32,8 @@ en: # # 主旨 # - label_welcome_trustie_course: Trustie online courses practice platform - label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research. + label_welcome_trustie_course: "Trustie online course & practice hosting services" + label_welcome_trustie_course_description: "Socialized innovative practicing communities for classroom hosting, resource sharing, collaborative homeworking and ranking." # @@ -41,9 +41,8 @@ en: # # 主旨 # - label_welcome_trustie_contest: Trustie online contests practice platform - label_welcome_trustie_contest_description: Software for Chinese college students and practitioners to provide social-oriented contest management, code hosting, resource sharing, cooperation and exchange. - + label_welcome_trustie_contest: "Trustie online contest hosting services" + label_welcome_trustie_contest_description: "Socialized competition communities for contest management, demo destration and ranking." # # Trustie平台导航 @@ -53,7 +52,7 @@ en: label_search: Search welcome: search: - information: "Please input the keywords!" # 搜索提示信息 + information: "Please input the keywords :)" # 搜索提示信息 select: # 下拉列表 project: project course: course @@ -63,17 +62,17 @@ en: showname: name email: email - label_search_conditions_not_null: The search conditions cannot be blank - label_resources_search_all: "Search all files in the website, while will not search the contents of private items." # 资源搜索提示信息 + label_search_conditions_not_null: Search conditions cannot be blank + label_resources_search_all: "Search all public resources in the website." # 资源搜索提示信息 # # Trustie平台导航 # # 下方托管平台链接 # - label_projects_management_platform: Projects-platform - label_courses_management_platform: Courses-platform - label_contests_management_platform: Competitions-platform + label_projects_management_platform: Projects + label_courses_management_platform: Courses + label_contests_management_platform: Competitions # @@ -81,7 +80,7 @@ en: # # 各模块内导航 # - label_courses_community: Universities Curriculum Communities of Practice - label_projects_community: Software Project Communities of Hosting - label_contest_innovate_community: Innovation Communities of Competition + label_courses_community: Project hosting communities + label_projects_community: Course & practice hosting communities + label_contest_innovate_community: Innovative competition communities label_user_location: Location \ No newline at end of file diff --git a/config/locales/navigatiors/zh.yml b/config/locales/navigatiors/zh.yml index bfda10a85..76131a001 100644 --- a/config/locales/navigatiors/zh.yml +++ b/config/locales/navigatiors/zh.yml @@ -15,8 +15,8 @@ zh: label_forum_all: 公共贴吧 label_school_all: 中国高校 label_contest_innovate: 创新竞赛 - label_software_user: 软件创客 - label_requirement_enterprise: 软件众包 + #label_software_user: 软件创客 + #label_requirement_enterprise: 软件众包 label_stores_index: 资源搜索 label_login: 登录 @@ -26,6 +26,7 @@ zh: # # 主旨 # + label_welcome_trustie_project: Trustie在线项目托管平台 label_welcome_trustie_project_description: "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。" diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index 90d8f2e2b..724fb66cd 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -7,7 +7,6 @@ en: # # 公共类 # - label_apply_project: Apply Project label_project_new: New project label_join_project: Join a project @@ -17,13 +16,13 @@ en: # # 热门项目栏 # - lable_hot_projects: Hot Projects - label_private: private + lable_hot_projects: "Hot Projects" + label_private: "private" label_project_member_amount: one: "%{count} member" other: "%{count} members" - label_project_score_tips: "Considering all activities of the project, project's score reflects the activity level of project" - label_project_score: Score + label_project_score_tips: "The score reflects the workload of this project" + label_project_score: "Score" # @@ -33,27 +32,30 @@ en: # label_project_id: "Projcet ID:" - label_apply_project: "+Apply to Join" - label_exit_project: Exit - label_apply_project_waiting: "Application has been processed, please wait for administrator review." - label_unapply_project: Cancel the application + label_apply_project: "+Join" + label_button_following: "+Follow" + + label_exit_project: "Exit" + label_apply_project_waiting: "Application is sent, please wait for the response of the administrator." + label_unapply_project: "Cancel the application" + lable_sure_exit_project: "Are you sure exit from the projcet" - label_member: Members - project_module_attachments: Resources + label_member: "Members" + project_module_attachments: "Resources" label_invite: Invitation - label_invite_new_user: "Send e-mail to invite new user" + label_invite_new_user: "Send email to invite new user" label_invite_trustie_user: "Invite the Trustie registered user" - label_issue_tracking: Issues - label_release_issue: New Issue + label_issue_tracking: "Issues" + label_release_issue: "New Issue" - project_module_boards: Forums - project_module_boards_post: New Post - project_module_files: Resources - label_upload_files: New File - project_module_repository: Repository - project_module_create_repository: New Repository + project_module_boards: "Forums" + project_module_boards_post: "New Post" + project_module_files: "Resources" + label_upload_files: "New Resource" + project_module_repository: "Repositories" + project_module_create_repository: "New Repository" label_project_more: More project_module_news: News @@ -66,8 +68,8 @@ en: label_project_tool_response: Feedback project_module_dts: DTS Test Tool - label_project_overview: "Profile:" - label_expend_information: More Information + label_project_overview: "Description:" + label_expend_information: More # @@ -106,20 +108,21 @@ en: # 资源库(附件)公用 label_relation_files: Select an existing resource label_search_by_keyword: "Search by keywords" - label_files_filter: "Filter Files:" + label_files_filter: Filter - attachment_all: "All" - attachment_browse: "By Attachment Content " - attachment_sufix_browse: "By Attachment Type " + attachment_all: All + attachment_browse: By Content + attachment_sufix_browse: By Type label_unknow_type: Unknow type field_filename: File field_filesize: Size field_filecontenttype: Content - field_filetype: File Typ + field_filetype: File Type field_downloads: Downloads - field_file_dense: Dense - + field_file_dense: Scope + label_sort_by: "Sort by %{value}" + # 资源库(附件)公用 > 上传文件 label_attachment_new: New file field_version: Version @@ -130,14 +133,14 @@ en: label_max_size: Maximum size label_optional_description: Description - label_file_count: "files were uploaded successfully" + label_file_count: "Uploaded successfully" # # 项目托管平台 # # 问题跟踪 - label_issues_sum: 'Total' - lable_issues_undo: 'Unresolved:' + label_issues_sum: "Total" + lable_issues_undo: "Unresolved" label_successful_create: Successfully created label_query: Custom query label_issue_new: New issue @@ -205,7 +208,14 @@ en: # 项目讨论区 # - + label_project_board_count: + zero: Displaying Topic(%{count} total) + one: Displaying Topic(%{count} total) + other: Displaying Topics(%{count} total) + label_board_sticky: Sticky + label_post_by: "Started by " + label_post_by_time: "on " + label_short_reply: "RE:" # # 项目托管平台 # @@ -218,23 +228,27 @@ en: # # 版本库 # - + lael_all_revisions: All revisions: + label_latest_revision: Latest revision + label_latest_revision_plural: Latest revisions + label_view_revisions: View revisions + label_view_all_revisions: View all revisions # # 项目托管平台 # # 项目配置 # - label_module_plural: Modules - label_version_plural: Versions - label_issue_category_plural: Issue categories - label_repository_plural: Repositories - enumeration_activities: Activities + label_module_plural: Tool + label_version_plural: Version + label_issue_category_plural: Issue type + label_repository_plural: Repository + enumeration_activities: Activity type - text_select_project_modules: "Select modules to enable for this project:" + 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_course: 课程 project_module_boards: Forums # @@ -242,21 +256,19 @@ en: # # 邀请 # - label_invite_new_user: "Send email to invite users" - label_invite_join: Invite - label_invite_email_tips: Enter the email address, Trustie will automatically register a user for the email address! - notice_registed_error: Email address is blank or has been registered! - label_input_email_blank: Email address is blank! - label_email_format_error: Email format is incorrect! - label_send_email: Send - label_input_email: Please input email address - - label_invite_trustie_user: "Invite Trustie registered users" - label_invite_trustie_user_tips: "Type nickname to find users" - label_user_role_null: User and Role can not be blank! + label_invite_join: "Invite" + label_invite_email_tips: "Enter the email address, Trustie will send invitation mail to the user!" + notice_registed_error: "Email address is blank or has been registered!" + label_input_email_blank: "Email address is blank!" + label_email_format_error: "Email format is incorrect!" + label_send_email: "Send" + label_input_email: "Please input email address" + + label_invite_trustie_user_tips: "Type to find users" + label_user_role_null: "User and Role can not be blank!" label_invite_project: "invites you to join the project" - label_invite_success: Successful invitation - label_invite_members: Invite + label_invite_success: "Invitation is successfully sent out!" + label_invite_members: "Invite" # @@ -264,17 +276,17 @@ en: # # 新建项目/项目配置 >信息 # - label_project_new_description: "A project can be used to do anything that requires distributed collaboration." - field_name: Name - field_description: Description - field_identifier: Identifier - field_enterprise_name: Enterprise + label_project_new_description: "A project is used for distributed collaboration." + field_name: "Name" + field_description: "Description" + #field_identifier: Identifier + field_enterprise_name: "Organization" label_organization_choose: "- Please select an organization -" text_length_between: "Length between %{min} and %{max} characters." text_project_identifier_info: "Only lower case letters (a-z), numbers, dashes and underscores are allowed, must start with a lower case letter.
Once saved, the identifier cannot be changed." - field_is_public: Public - field_hidden_repo: code protected + field_is_public: "Public" + field_hidden_repo: "Private repository" @@ -286,33 +298,33 @@ en: project: join: title: Quickly Join to Project - description: "Just hold the project ID, while you can quickly apply to join the project.Private projects can only join by this channel!" + description: "Input the project ID, then you can quickly apply to join the project. Private projects can only join by this way!" id: label: "Project ID:" - tips: "Project ID is the number within project URL" + tips: "Project ID is the unique number for each project" # # 项目托管平台 # # 项目得分 # - label_projects_score: Project Total Score + label_projects_score: "Total Score" - label_issue_score: Issue Score - label_issue_number: issues - label_issue_journal_number: messages of issue + label_issue_score: "Issue Score" + label_issue_number: "issues" + label_issue_journal_number: "messages of issue" - label_news_score: News Score - label_new_number: news + label_news_score: "News Score" + label_new_number: "news" - label_file_score: Document Scores - label_file_number: documents + label_file_score: "Document Score" + label_file_number: "documents" - label_code_submit_score: Code Commit Score - label_code_submit_number: commit code frequency + label_code_submit_score: "Code Commit Score" + label_code_submit_number: "commit code frequency" - label_topic_score: Forum Score - label_topic_number: posts + label_topic_score: "Forum Score" + label_topic_number: "posts" @@ -320,7 +332,7 @@ en: # # 项目托管平台 # - # 项目得分 + # 项目配置 # label_approve: Approve label_refusal: Refusal \ No newline at end of file diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 5a845c4d4..4c04063f2 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -52,7 +52,7 @@ zh: project_module_boards: 讨论区 - project_module_boards_post: 发帖 + project_module_boards_post: 发布新帖 project_module_files: 资源库 project_module_repository: 版本库 project_module_create_repository: 创建版本库 @@ -120,12 +120,13 @@ zh: field_filetype: 文件格式 field_file_dense: 是否公开 field_downloads: 下载次数 + label_sort_by: "根据 %{value} 排序" attachment_sufix_browse: "文件类型" attachment_browse: "内容类型" attachment_all: "全部" label_unknow_type: 未知类型 - + # 资源库(附件)公用 > 上传文件 label_attachment_new: 新建文件 field_version: 版本 @@ -256,8 +257,17 @@ zh: # # 项目讨论区 # - + label_user_login_project_board: 您还没有登录,请登录后参与项目讨论 + + label_project_board_count: + zero: 项目讨论区共有%{count}个帖子 + one: 项目讨论区共有%{count}个帖子 + other: 项目讨论区共有%{count}个帖子 + label_board_sticky: 置顶 + label_post_by: 由 + label_post_by_time: 添加于 + label_short_reply: "回复" # # 项目托管平台 # @@ -270,7 +280,11 @@ zh: # # 版本库 # - + label_all_revisions: "所有版本:" + label_latest_revision: 最近的修订版本 + label_latest_revision_plural: 最近的修订版本 + label_view_revisions: 查看修订 + label_view_all_revisions: 查看所有修订 # # 项目托管平台 # diff --git a/config/locales/zh.yml b/config/locales/zh.yml index dad1def81..76b7f998d 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -474,7 +474,7 @@ zh: label_activities_settings: 显示设置 label_user_login_course_board: 您还没有登录,请登录后参与课程讨论 - label_user_login_project_board: 您还没有登录,请登录后参与项目讨论 + label_user_login_attending_contest: 您还没有登录,请登录后参赛 label_user_login_score_and_comment: 您还没有登录,请登录后对作品进行打分评价 label_user_login_notificationcomment: 您还没有登录,请登录后参加评论 @@ -710,7 +710,7 @@ zh: label_board_new: 新建讨论区 label_board_plural: 讨论区 label_board_locked: 锁定 - label_board_sticky: 置顶 + field_sticky: '' field_locked: '' field_lock: '' @@ -727,7 +727,7 @@ zh: label_date_from: 从 label_date_to: 到 label_language_based: 根据用户的语言 - label_sort_by: "根据 %{value} 排序" + label_send_test_email: 发送测试邮件 label_feeds_access_key: RSS存取键 label_missing_feeds_access_key: 缺少RSS存取键 @@ -1330,7 +1330,7 @@ zh: label_create_new_projects_description: 创建项目,让我们开启一次神奇的协同创作和开发之旅! label_call_for_bids_description: 发布需求,征集解决方案,体验一呼百应的兴奋感觉! - label_news_description: 实时了解项目的最新动态,掌握最新项目咨询! + label_milestone_description: 在这里您可以看见任何一个版本的工程! label_welcome: 欢迎 @@ -1347,12 +1347,7 @@ zh: label_course_homework: 发布了作业 label_follow_no_requirement: 暂未关注任何需求! - label_tags_issue: 问题名称: - label_tags_project_name: 项目名称: - label_tags_project_description: 项目描述: - label_tags_user_mail: 用户邮箱: - label_tags_user_name: 用户名: - label_tags_numbers: Tag统计: + label_your_course: 您的课程《 label_have_message : 》有新的留言 label_all_revisions: 所有版本: @@ -1370,8 +1365,7 @@ zh: label_welcome_my_respond: 请在此留下你的意见和建议! label_course_feedback: 留言 - label_tags_search_result: 搜索结果 - label_tags_call: 需求 + label_user_extensions: 其他信息 label_boy: 男 @@ -1698,8 +1692,7 @@ zh: label_forum: 公共贴吧 label_forum_new: 新建贴吧 label_forum_set: 贴吧设置 - label_tags_forum_description: 贴吧描述 - label_tags_forum: 贴吧名称 + label_project_module_forums: 公共贴吧 label_memo_locked: 帖子已被锁定 label_downloads_list: 进入附件列表 From 1fae44b2013c2e053af9dd435ffcbffe4e744a40 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 10 Apr 2015 13:21:36 +0800 Subject: [PATCH 07/21] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_users.html.erb | 2 +- .../master_apply.html.erb | 1 + app/views/projects/show.html.erb | 2 +- app/views/tags/index.html.erb | 2 +- app/views/users/_user_show.html.erb | 1 + app/views/users/show.html.erb | 4 +- app/views/users/user_fanslist.html.erb | 1 + config/locales/projects/en.yml | 4 +- config/locales/users/en.yml | 79 ++++++++++--------- 9 files changed, 50 insertions(+), 46 deletions(-) diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 3f603368a..651067475 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -173,7 +173,7 @@ @@ -215,7 +215,7 @@ <%= l(:label_new_activity) %>   - <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.id)) %> + <%= link_to(l(:label_activity_project)+":"+act.issue.project.name, project_path(act.issue.project.id)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index f16e6d397..aa7a3155e 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -30,6 +30,7 @@

<% user_courses = user_courses_list(user) %> <%= l(:label_x_course_contribute_to, :count => user_courses.count) %> + <%= ":" unless user_courses.empty? %> <% for course in user_courses %> <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %><%= (user_courses.last == course) ? '' : ',' %> <% end %> diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index 724fb66cd..db2aa7801 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -94,8 +94,8 @@ en: # label_followers: Followers label_contribute_to: - one: "Participates %{count} project—" - other: "Participates %{count} projects—" + one: "Participates %{count} project" + other: "Participates %{count} projects" # diff --git a/config/locales/users/en.yml b/config/locales/users/en.yml index c68087efa..c96ff45b2 100644 --- a/config/locales/users/en.yml +++ b/config/locales/users/en.yml @@ -24,23 +24,23 @@ en: # # 左边栏 # - label_user_edit: Edit information - label_user_grade: Individual score + label_user_edit: Edit + label_user_grade: Score - label_user_score: Individual synthetic score - label_user_score_of_influence: Influence score - label_user_score_of_collaboration: Collaborative score - label_user_score_of_skill: Skill score - label_user_score_of_active: Project score + label_user_score: Total + label_user_score_of_influence: Influence + label_user_score_of_collaboration: Collaboration + label_user_score_of_skill: Skill + label_user_score_of_active: Workload userscore: collaboration: - memos: The number of Posts - message_for_issues: The number of messages to issues - issue_status: Times of change the issue state - reply_for_messages: The number of replies to messages - reply_for_memos: The number of replies to posts + memos: Posts + message_for_issues: Comments to issues + issue_status: Changes to issues + reply_for_messages: Replies to messages + reply_for_memos: Replies to posts influence: - followers: Followers + followers: Fans skill: tramples: 踩别人的帖子数量 like: @@ -53,26 +53,26 @@ en: level3: 帖子被三级会员踩的次数 active: commit: - codes: 提交代码次数 - documents: 提交文档次数 - attachments: 提交附件次数 - update_issues: 更新缺陷完成度次数 - release_issues: 发布缺陷数量 + codes: Commits + documents: Documents + attachments: Attachments + update_issues: Updates of issue states + release_issues: Issues label_score_less_than_zero: Score less than 0, revised to 0 - label_user_info: User information - label_user_watcher: Followers - label_user_fans: Followed by + label_user_info: Information + label_user_watcher: Following + label_user_fans: Followed label_x_user_fans: zero: Fan one: Fan other: Fans - label_brief_introduction: Personality words - label_my_brief_introduction: "How are feeling today? Leave your footprints ~" + label_brief_introduction: Feeling words + label_my_brief_introduction: "How are feeling today? Leave some words ~~" - label_user_joinin: Join date + label_user_join: Join label_user_login: Last login label_technical_title: Title @@ -113,7 +113,7 @@ en: label_goto: "Go to»" - label_activity_project: "Project:" + label_activity_project: "Project" label_active_call: call label_active_homework: homework # 评论、评论数在commons模块下 @@ -136,11 +136,11 @@ en: label_about_issue: "about the issue—" label_about_requirement: "about requirement—" - label_have_respond: had a respond + label_have_respond: " had a respond" label_in_issues: "in the issue—" - label_no_user_respond_you: "There is no respond for you!" + label_no_user_respond_you: "No responses for you now:)" # end @@ -149,12 +149,12 @@ en: # # 项目栏 # - label_project_unadd: "No project, go to creat it!" + label_project_unadd: "No project, creat one!" label_project_un: "You haven't joined any project yet!" - label_has_watched_project: "The projects of attention" - label_project_take: "The projects of participation" + label_has_watched_project: "Followed projects" + label_project_take: "Joined projects" label_project_take_in: "joined the project—" @@ -163,9 +163,9 @@ en: # # 课程栏 # - label_project_course_un: "The user is not enrolled in any course yet. " - label_project_course_unadd: "You have no course,creat one now!" - label_project_cousre_studentun: "You have not joined any course, come and join now!" + label_project_course_un: "Not joined any course yet." + label_project_course_unadd: "You have no course,creat one now:)" + label_project_cousre_studentun: "No courses, come and join now!" user: courses: doing: Strating @@ -178,13 +178,13 @@ en: # 留言栏 # label_responses: Messages - label_user_response: Feedback + label_user_response: Comment label_leave_a_message: "Leave him/her a message" button_leave_meassge: Submit button_clear_meassge: Reset label_user_login_new: Login - label_user_login_tips: "You haven't logged in, please login first to leave a message!" + label_user_login_tips: "Log in before leave a message:)" label_bid_respond_delete: Delete label_bid_respond_quote: Respond @@ -205,12 +205,13 @@ en: # # Followers & Fans # + label_user_joinin: Join at label_x_contribute_to: zero: "participates %{count} project" - one: "participates %{count} project—" - other: "participates %{count} projects—" + one: "participates %{count} project" + other: "participates %{count} projects" label_x_course_contribute_to: zero: "participates %{count} course" - one: "participates %{count} course—" - other: "participates %{count} courses—" + one: "participates %{count} course" + other: "participates %{count} courses" From fc66050413921fd3125024f43b133496a8ffd209 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 10 Apr 2015 14:33:03 +0800 Subject: [PATCH 08/21] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E7=A4=BA=E4=B8=AD=E8=8B=B1=E6=96=87=E6=B7=B7?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index b6d1db25c..063cfafae 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -14,7 +14,7 @@ module Mobile us = UsersService.new user = us.register params.merge(:password_confirmation => params[:password], :should_confirmation_password => true) - raise "register failed #{user.errors.full_messages}" if user.new_record? + raise "该邮箱已经被注册过了" if user.new_record? present :data, user, with: Mobile::Entities::User present :status, 0 From 9ebed65fde01c38033fb40fdcc62198c96d49640 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Apr 2015 14:36:30 +0800 Subject: [PATCH 09/21] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=8A=A8=E6=80=81?= =?UTF-8?q?=EF=BC=9A=E4=BD=9C=E4=B8=9A=E5=8A=A8=E6=80=81url=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- app/views/courses/show.html.erb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 8e57fab4d..ff937990b 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -738,7 +738,7 @@ class CoursesController < ApplicationController @user = User.find_by_id(CourseInfos.find_by_course_id(@course.id).user_id) end - sorted_events = sort_activity_events_course(events); + sorted_events = sort_activity_events_course(events) events = paginateHelper sorted_events,10 @events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)} # documents diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 79cb267b4..9f2fe39df 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -14,7 +14,8 @@ <%= link_to_user_header("(#{e.event_author})", @canShowRealName,:class => 'problem_name c_orange fl') if @canShowRealName && e.respond_to?(:event_author) %>   <%= l(:label_new_activity) %>: - <%= link_to "#{eventToLanguageCourse(e.event_type, @course)} "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) : e.event_url,:class => "problem_tit c_dblue fl fb"%> + <%= link_to "#{eventToLanguageCourse(e.event_type, @course)} "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) : + (e.event_type.eql?("bid") ? homework_course_path(@course) : e.event_url),:class => "problem_tit c_dblue fl fb"%>

<%= 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 10/21] =?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 11/21] =?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) %>

- <%= l(:label_end_time)%>:<%= format_time(news.created_on)%> + <%= l(:label_create_time)%>:<%= format_time(news.created_on)%>
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 17b193a44..32cba7787 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -156,8 +156,8 @@ div#menu ul ul a:hover { color:#ff9900;} div#menu ul ul li.last { margin-left:15px; } div#menu ul ul li {width: 100%;} /* menu::level3 */ -div#menu ul ul ul {padding: 0;margin: -38px 0 0 92px !important; width:140px; } -div#menu ul ul ul li a{ width:125px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;} +div#menu ul ul ul {padding: 0;margin: -38px 0 0 92px !important; width:200px; } +div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;} /*主类容*/ From 0c949b7117edad0abda27e87a6ee6f225c2a8050 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Apr 2015 15:16:02 +0800 Subject: [PATCH 12/21] =?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 --- public/stylesheets/public.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 32cba7787..e1105de53 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -154,7 +154,7 @@ div#menu ul ul { position: absolute;top: 38px; left: -999em; width: 90px; paddin div#menu ul ul a {padding: 0 0 0 15px; height: auto; float: none;display: block; line-height: 24px; font-size:12px; font-weight:normal;color:#15bccf;} div#menu ul ul a:hover { color:#ff9900;} div#menu ul ul li.last { margin-left:15px; } -div#menu ul ul li {width: 100%;} +div#menu ul ul li {width: 100%;}11 /* menu::level3 */ div#menu ul ul ul {padding: 0;margin: -38px 0 0 92px !important; width:200px; } div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;} From 172e69a552e2124b651c4b1c399bd48b363705c0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Apr 2015 15:16:11 +0800 Subject: [PATCH 13/21] =?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 --- public/stylesheets/public.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index e1105de53..32cba7787 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -154,7 +154,7 @@ div#menu ul ul { position: absolute;top: 38px; left: -999em; width: 90px; paddin div#menu ul ul a {padding: 0 0 0 15px; height: auto; float: none;display: block; line-height: 24px; font-size:12px; font-weight:normal;color:#15bccf;} div#menu ul ul a:hover { color:#ff9900;} div#menu ul ul li.last { margin-left:15px; } -div#menu ul ul li {width: 100%;}11 +div#menu ul ul li {width: 100%;} /* menu::level3 */ div#menu ul ul ul {padding: 0;margin: -38px 0 0 92px !important; width:200px; } div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;} From ea0bd7e0dd5c88862ef6019e8ad6510253661c3e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Apr 2015 15:22:03 +0800 Subject: [PATCH 14/21] =?UTF-8?q?1=E3=80=81=E6=8A=80=E6=9C=AF=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=8F=AA=E6=9C=89=E7=99=BD=E7=BE=BD=202=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BC=A0=E6=A0=87=E6=82=AC=E6=B5=AE=E5=9C=A8?= =?UTF-8?q?=E7=99=BD=E7=BE=BD=E4=B8=8A=E6=9C=89=E4=B8=8B=E5=88=92=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 1 - app/views/layouts/_new_feedback.html.erb | 4 ---- public/stylesheets/public.css | 5 ++--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index d1d055bb8..19892e841 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -173,7 +173,6 @@ function cookieget(n) <% end %> diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 4f7e650eb..32afb4e5c 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -21,10 +21,6 @@ <% end %>
- - <%= l(:label_technical_support) %> - 黄井泉 - <%= l(:label_technical_support) %> 白   羽 diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 32cba7787..cd4dc337a 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -199,7 +199,7 @@ html{ overflow-x:hidden;} .close_btn span { display:none;} .side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;} .msgserver { margin-top:5px;} -.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; } +.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; color:#15bccf;} .opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;} a:hover.opnionButton{background: #0fa9bb; } @@ -210,8 +210,7 @@ a:hover.opnionButton{background: #0fa9bb; } a.close_btn {background-position:-44px 0;} a:hover.close_btn {background-position:-66px 0;} .show_btn {background-position:-119px 0;} -.msgserver a {color:#15bccf; } -.msgserver a:hover { text-decoration:underline; } +.msgserver a:hover { color: #0fa9bb; } .break_word{word-break: break-all;word-wrap: break-word;} /***** Ajax indicator ******/ #ajax-indicator { From 400d1a147dc70023f1fc9ba8637351a803e76000 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Apr 2015 15:43:37 +0800 Subject: [PATCH 15/21] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=AF=BC=E8=87=B4=E5=9B=BE=E7=89=87=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_history.html.erb | 2 +- app/views/courses/homework.html.erb | 2 +- app/views/courses/show.html.erb | 2 +- app/views/layouts/base_homework.html.erb | 1 + app/views/messages/_course_show.html.erb | 4 ++-- app/views/news/_course_show.html.erb | 4 ++-- public/stylesheets/courses.css | 3 +++ 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index a302d0981..7b388adc4 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -15,7 +15,7 @@ <%= format_time(journal.created_on) %>
-

+

<%= journal.notes.html_safe %>

diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb index cbb5d6fc1..f7cf2a360 100644 --- a/app/views/courses/homework.html.erb +++ b/app/views/courses/homework.html.erb @@ -31,7 +31,7 @@ $(function(){if($("#bid_description_<%= bid.id%>_content").height()>38){$("#bid_show_more_des_button<%= bid.id%>").show();}});
-
+
<%= bid.description.html_safe %>
diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 9f2fe39df..1cc117dd6 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -9,7 +9,7 @@
<%= image_tag(url_to_avatar(e.event_author), :width => "42", :height => "42") %> -
+
<%= link_to_user_header(e.event_author,false,:class => 'problem_name c_orange fl') if e.respond_to?(:event_author) %> <%= link_to_user_header("(#{e.event_author})", @canShowRealName,:class => 'problem_name c_orange fl') if @canShowRealName && e.respond_to?(:event_author) %>   diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index dd7db06de..1e6b9bca2 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -36,6 +36,7 @@ } .span_wping a:hover{ background-color:#03a1b3;} .span_wping_background{background: #CCC !important;} + .font_lighter_sidebar img{max-width: 100%} diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index c99c41fb9..50a97d9ba 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -30,7 +30,7 @@ :class => 'talk_edit fr' ) if @message.course_destroyable_by?(User.current) %>
-
<%= @topic.content.html_safe %>
+
<%= @topic.content.html_safe %>
<%= link_to_attachments_course @topic, :author => false %>
@@ -54,7 +54,7 @@
">
<%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %>
-
+
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %> <%= format_time(message.created_on) %>
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index f7c5145f0..d7bec4a4f 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -31,7 +31,7 @@ :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @course) %> <%= delete_link(news_path(@news),:class => 'talk_edit fr') if User.current.allowed_to?(:manage_news, @course) %>
-
+
<%= @news.description.html_safe %>
<%= l(:label_create_time) %> : <%= format_time(@news.created_on) %> @@ -74,7 +74,7 @@ <%= format_time(comment.created_on) %>
-

<%= comment.comments.html_safe %>

+

<%= comment.comments.html_safe %>

<%= link_to_if_authorized_course image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index cfb27e20b..a3e358b14 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -435,6 +435,9 @@ a.link_file_board{ background:url(../images/pic_file.png) 0 3px no-repeat !impor #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;} #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;} +/*上传图片处理*/ +.upload_img img{max-width: 100%;} + /* The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9. From 600003e48c3c31f3a5b952ff62693de70a2070e7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 10 Apr 2015 15:54:17 +0800 Subject: [PATCH 16/21] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E4=B8=AD=E4=BD=BF=E7=94=A8=E6=96=B0=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=A7=E5=9B=BE=E7=89=87=EF=BC=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E8=B6=85=E5=87=BA=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_forum_list.html.erb | 2 +- app/views/layouts/base_forums.html.erb | 2 +- app/views/layouts/base_memos.html.erb | 2 +- public/stylesheets/application.css | 3 +++ public/stylesheets/nyan.css | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index fe2f757c3..59ed1092e 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -16,7 +16,7 @@
- - - @@ -227,7 +227,7 @@ <% else %> <% desStr= textAreailizable(act, :notes) %> <% end %> - - - - @@ -428,7 +428,7 @@ <% end %> - - - From b3b0461a424f2d6b1a6ec3b3174b153a93ccd194 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 10 Apr 2015 16:43:42 +0800 Subject: [PATCH 20/21] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E8=A2=AB=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E7=9A=84=E4=BA=BA=E5=B0=B1=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/users_service.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/services/users_service.rb b/app/services/users_service.rb index 8f86029d9..63dd725cd 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -199,13 +199,15 @@ class UsersService #搜索用户 def search_user params - @status = params[:status] || 1 + status = params[:status] || 1 has = { "show_changesets" => true } - scope = User.logged.status(@status) - @search_by = params[:search_by] ? params[:search_by] : "0" - scope = scope.like(params[:name],@search_by) if params[:name].present? + scope = User.logged.status(status) + watcher = User.watched_by(params[:user_id]) + watcher.push(params[:user_id]) + search_by = params[:search_by] ? params[:search_by] : "0" + scope = scope.where("id not in (?)",watcher).like(params[:name],search_by) if params[:name].present? scope end From 69153d2d9558dfa6b3b8cde2a8a5c011451ccff0 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 10 Apr 2015 16:59:45 +0800 Subject: [PATCH 21/21] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=BF=BB=E8=AF=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applied_join_project.js.erb | 10 +++--- app/views/homework_attach/edit.html.erb | 2 +- app/views/messages/_project_show.html.erb | 2 +- app/views/news/_form.html.erb | 2 +- app/views/news/_project_news.html.erb | 10 +++--- app/views/news/_project_show.html.erb | 10 +++--- app/views/projects/_join_project.html.erb | 4 +-- app/views/projects/feedback.html.erb | 2 +- app/views/projects/show.html.erb | 2 +- app/views/repositories/show.html.erb | 2 +- config/locales/commons/en.yml | 14 ++++++-- config/locales/commons/zh.yml | 12 ++++++- config/locales/en.yml | 7 ++-- config/locales/projects/en.yml | 27 ++++++++++++---- config/locales/projects/zh.yml | 32 +++++++++++++------ config/locales/users/en.yml | 2 +- config/locales/zh.yml | 9 +++--- .../app/views/code_review/index.html.erb | 2 +- public/javascripts/attachments.js | 2 +- public/stylesheets/welcome.css | 2 +- 20 files changed, 99 insertions(+), 56 deletions(-) diff --git a/app/views/applied_project/applied_join_project.js.erb b/app/views/applied_project/applied_join_project.js.erb index 3f4f6aff7..ab5cdd484 100644 --- a/app/views/applied_project/applied_join_project.js.erb +++ b/app/views/applied_project/applied_join_project.js.erb @@ -1,11 +1,11 @@ <% if @status == 0%> - alert("您申请的项目不存在"); + alert("<%= l('project.join.tips.notexist') %>"); <% elsif @status == 1%> - alert("请勿重复申请加入该项目"); + alert("<%= l('project.join.tips.repeat') %>"); <% elsif @status == 2%> - alert("申请成功"); + alert("<%= l('project.join.tips.success') %>"); <% elsif @status == 3%> - alert("您已加入该项目"); + alert("<%= l('project.join.tips.has') %>"); <%else%> - alert("申请失败"); + alert("<%= l('project.join.tips.fail') %>"); <%end%> \ No newline at end of file diff --git a/app/views/homework_attach/edit.html.erb b/app/views/homework_attach/edit.html.erb index 91b59d4f2..19c0d9344 100644 --- a/app/views/homework_attach/edit.html.erb +++ b/app/views/homework_attach/edit.html.erb @@ -28,7 +28,7 @@ } else { - $("#homework_attach_name_span").text("填写正确"); + $("#homework_attach_name_span").text("<%= l(:label_field_correct)%>"); $("#homework_attach_name_span").css('color','#008000'); return true; } diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index cbc985c2b..ae6e37f7e 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -58,7 +58,7 @@
-

<%= h @board.name %>

+

<%= l(:label_board_plural) %>

diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb index 024360597..fb8ae1311 100644 --- a/app/views/news/_form.html.erb +++ b/app/views/news/_form.html.erb @@ -7,7 +7,7 @@ <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onkeyup => "regexTitle();" %>

- (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.title')%>

-

<%= 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 @@

-

代码审查

+

<%= l(:label_title_code_review)%>

<% # Code Review plugin for Redmine diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index c5c3a7bd0..dc3e0e522 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -15,7 +15,7 @@ function postUpMsg(attachmentId) function reload(fileSpan) { fileSpan.remove(); - $('#upload_file_count').html("未上传文件"); + $('#upload_file_count').html("<%= l(:label_no_file_uploaded)%>"); $old_file = $("#_file"); $new_file = $old_file.clone(true); $old_file.replaceWith($new_file); diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css index 5cd76c0dc..badeda388 100644 --- a/public/stylesheets/welcome.css +++ b/public/stylesheets/welcome.css @@ -451,7 +451,7 @@ a.attachments_list_color { } /*帖子的各种属性*/ .memo_activity .memo_attr{ - margin-left: 20px; + margin-left: 2px; } /*帖子的时间*/ .memo_activity .memo_timestamp{
- <%= l(:label_user_joinin) %>: + <%= l(:label_user_join) %>: <%= format_time(@user.created_on) %> diff --git a/app/views/open_source_projects/master_apply.html.erb b/app/views/open_source_projects/master_apply.html.erb index f99701932..48e8d275d 100644 --- a/app/views/open_source_projects/master_apply.html.erb +++ b/app/views/open_source_projects/master_apply.html.erb @@ -64,6 +64,7 @@ <% cond = Project.visible_condition(User.current) + "AND projects.project_type = 1" %> <% memberships = user.memberships.all(:conditions => cond) %> <%= l(:label_x_course_contribute_to, :count => memberships.count) %> + <%= ":" unless user_courses.empty? %> <% for member in memberships %> <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> <% end %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index f38595302..4b899ac5c 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -93,7 +93,7 @@ <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> - <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.id)) %> + <%= link_to(l(:label_activity_project)+":"+act.issue.project.name, project_path(act.issue.project.id)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb index ede20fd78..947366eeb 100644 --- a/app/views/tags/index.html.erb +++ b/app/views/tags/index.html.erb @@ -17,7 +17,7 @@

<%= l(:label_tags_search_result) %>

- <%= l(:label_tags_numbers) %> + <%= l(:label_tags_numbers) %>: <%= l(:label_issue_plural) %>(<%= @issues_tags_num %>) | <%= l(:label_project_plural) %>(<%= @projects_tags_num %>) | <%= l(:label_user_plural) %>(<%= @users_tags_num %>) | diff --git a/app/views/users/_user_show.html.erb b/app/views/users/_user_show.html.erb index d0c9e204b..4a503f651 100644 --- a/app/views/users/_user_show.html.erb +++ b/app/views/users/_user_show.html.erb @@ -42,6 +42,7 @@ <%# memberships = user.memberships.all(:conditions => cond) %> <% user_courses = user_courses_list(user) %> <%= l(:label_x_course_contribute_to, :count => user_courses.count) %> + <%= ":" unless user_courses.empty? %> <% for course in user_courses %> <%# if course.name != nil %> <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %><%= (user_courses.last == course) ? '' : ',' %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index b16c017a7..673e01d72 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -201,7 +201,7 @@ <%= l(:label_i_new_activity) %>   - <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.id)) %> + <%= link_to(l(:label_activity_project)+":"+act.issue.project.name, project_path(act.issue.project.id)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
+

<%= 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 f94184bc8101b4ebfa60aac02eb420574297c780 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 10 Apr 2015 16:27:26 +0800 Subject: [PATCH 18/21] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=9D=83=E9=99=90=E9=83=A8=E5=88=86=E6=80=A7=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 79 ++++++++++++++++++++--- config/initializers/delayed_job_config.rb | 2 +- 2 files changed, 70 insertions(+), 11 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 482dc4d45..2a10af260 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -448,16 +448,73 @@ class UsersController < ApplicationController end activity = Activity.where(where_condition).where(user_id: user_ids).order('id desc') - #Issue - # act_ids = Activity.where(act_type: 'Issue', user_id: user_ids).select('act_id').map{|x| x.act_id} - # project_ids = Issue.where(id: act_ids).select('distinct project_id').map{|x| x.project_id} - # valid_p_ids = [] - # Project.where(id: project_ids).each do |x| - # x.visible?(User.current) - # valid_p_ids << x.id - # end - - # activity = Activity.where(act_id: Issue.where(id: act_ids, project_id: valid_p_ids).map{|x| x.id}).order('id desc') + permission = !User.current.admin? + if permission + #Issue + act_ids = activity.where(act_type: 'Issue').select('act_id').map{|x| x.act_id} + project_ids = Issue.where(id: act_ids).select('distinct project_id').map{|x| x.project_id} + p_ids = [] + Project.where(id: project_ids).each do |x| + p_ids << x.id unless x.visible?(User.current) + end + ids = [] + ids << Issue.where(id: act_ids, project_id: p_ids).map{|x| x.id} + + #Bid + act_ids = activity.where(act_type: 'Bid').select('act_id').map{|x| x.act_id} + course_ids = HomeworkForCourse.where(bid_id: act_ids).select('distinct course_id').map{|x| x.course_id} + c_ids = [] + Course.where(id: course_ids).each do |x| + c_ids << x.id unless x.is_public !=0 && User.current.member_of_course?(x) + end + ids << HomeworkForCourse.where(bid_id: act_ids, course_id: c_ids).map{|x| x.id} + + #Journal + act_ids = activity.where(act_type: 'Journal').select('act_id').map{|x| x.act_id} + project_ids = Journal.where(id:act_ids, journalized_type: 'Project').select('distinct journalized_id').map{|x| x.journalized_id} + p_ids = [] + Project.where(id: project_ids).each do |x| + p_ids << x.id unless x.visible?(User.current) + end + ids << Journal.where(id: act_ids, journalized_id: p_ids, journalized_type: 'Project').map{|x| x.id} + + #News + act_ids = activity.where(act_type: 'News').select('act_id').map{|x| x.act_id} + project_ids = News.where(id: act_ids).select('distinct project_id').map{|x| x.project_id} + p_ids = [] + Project.where(id: project_ids).each do |x| + p_ids << x.id unless x.visible?(User.current) + end + ids << News.where(id: act_ids, project_id: p_ids).map{|x| x.id} + + project_ids = News.where(id: act_ids).select('distinct course_id').map{|x| x.course_id} + c_ids = [] + Course.where(id: project_ids).each do |x| + c_ids << x.id unless x.is_public !=0 && User.current.member_of_course?(x) + end + ids << News.where(id: act_ids, course_id: p_ids).map{|x| x.id} + + #Message + act_ids = activity.where(act_type: 'Message').select('act_id').map{|x| x.act_id} + board_ids = Message.where(id: act_ids).select('distinct board_id').map{|x| x.board_id} + project_ids = Board.where(id: board_ids).select('distinct project_id').map{|x| x.project_id} + p_ids = [] + Project.where(id: project_ids).each do |x| + p_ids << x.id unless x.visible?(User.current) + end + ids << Message.where(id: act_ids, board_id: p_ids).map{|x| x.id} + + project_ids = Board.where(id: board_ids).select('distinct course_id').map{|x| x.course_id} + c_ids = [] + Course.where(id: project_ids).each do |x| + c_ids << x.id unless x.is_public !=0 && User.current.member_of_course?(x) + end + ids << Message.where(id: act_ids, board_id: c_ids).map{|x| x.id} + + logger.debug "filter ids #{ids}" + + activity = activity.where('act_id not in (?)', ids.flatten ).order('id desc') unless ids.flatten.empty? + end # activity = activity.reject { |e| # e.act.nil? || @@ -468,6 +525,8 @@ class UsersController < ApplicationController # (e.act_type == "News" && ((!e.act.project.nil? && !e.act.project.visible?(User.current)) || (!e.act.course.nil? && e.act.course.is_public == 0 && !User.current.member_of_course?(e.act.course)))) || # (e.act_type == "Message" && !e.act.board.nil? && ((!e.act.board.project.nil? && !e.act.board.project.visible?(User.current)) || (!e.act.board.course.nil? && e.act.board.course.is_public == 0 && !User.current.member_of_course?(e.act.board.course)))))) # } + # + @activity_count = activity.count @activity_pages = Paginator.new @activity_count, pre_count, params['page'] @activity = activity.slice(@activity_pages.offset,@activity_pages.per_page) diff --git a/config/initializers/delayed_job_config.rb b/config/initializers/delayed_job_config.rb index 8a763c7df..1a4cf8463 100644 --- a/config/initializers/delayed_job_config.rb +++ b/config/initializers/delayed_job_config.rb @@ -1,5 +1,5 @@ Delayed::Worker.destroy_failed_jobs = false -Delayed::Worker.sleep_delay = 3 +Delayed::Worker.sleep_delay = 10 Delayed::Worker.max_attempts = 1 Delayed::Worker.max_run_time = 5.minutes Delayed::Worker.read_ahead = 10 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 19/21] =?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 @@

- <%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %> + <% puts 11111111111111%> + <%= user_jour_feed_back_url e %>