From 6df1f55ac45dd8ebd815ea305e56f81f6a4e0fd8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Apr 2015 16:53:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=90=8E=E4=B8=8D=E8=87=AA=E5=8A=A8=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_course_members.html.erb | 13 +------------ app/views/courses/search_member.js.erb | 2 +- app/views/courses/settings.html.erb | 16 +++++++++++++++- app/views/members/create.js.erb | 2 +- app/views/members/destroy.js.erb | 2 +- app/views/members/update.js.erb | 2 +- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/app/views/courses/_course_members.html.erb b/app/views/courses/_course_members.html.erb index a6a3594de..c093d4b2f 100644 --- a/app/views/courses/_course_members.html.erb +++ b/app/views/courses/_course_members.html.erb @@ -1,15 +1,4 @@ -
- <%= form_tag({:controller => 'courses', :action => 'search_member'},:id => "course_member_search_form", :method => :get, :class => "search_form_course",:remote => true) do %> - - <%= text_field_tag 'name', params[:name], :placeholder => "昵称、学号、姓名搜索", :class => "search_text fl" %> - - <%= l(:label_search)%> - -
- - <% end %> -
-
+
- <%= render :partial => "course_members" %> +
+ <%= form_tag({:controller => 'courses', :action => 'search_member'},:id => "course_member_search_form", :method => :get, :class => "search_form_course",:remote => true) do %> + + <%= text_field_tag 'name', params[:name], :placeholder => "昵称、学号、姓名搜索", :class => "search_text fl" %> + + <%= l(:label_search)%> + +
+ + <% end %> +
+
+
+ <%= render :partial => "course_members" %> +
\ No newline at end of file diff --git a/app/views/members/create.js.erb b/app/views/members/create.js.erb index 93aad5b5e..678bb1f18 100644 --- a/app/views/members/create.js.erb +++ b/app/views/members/create.js.erb @@ -19,7 +19,7 @@ alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => er <% if @create_member_error_messages%> alert("<%= @create_member_error_messages%>"); <% else%> - $('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); + $('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); alert("添加成功"); <% end%> <%end%> diff --git a/app/views/members/destroy.js.erb b/app/views/members/destroy.js.erb index 912cfde58..271080788 100644 --- a/app/views/members/destroy.js.erb +++ b/app/views/members/destroy.js.erb @@ -1,6 +1,6 @@ <%if @project%> $('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>'); <%elsif @course%> - $('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); + $('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); <%end%> hideOnLoad(); diff --git a/app/views/members/update.js.erb b/app/views/members/update.js.erb index a166e76ab..4d0e6fe96 100644 --- a/app/views/members/update.js.erb +++ b/app/views/members/update.js.erb @@ -2,7 +2,7 @@ $('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>'); $("#member-<%= @member.id %>").effect("highlight"); <%elsif @course%> -$('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); +$('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); <%end%> hideOnLoad(); From 05712c4c06a5ed6a19f035ac15da231825f357c6 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 17 Apr 2015 17:48:25 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=BD=9C=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_alert_anonyoms.html.erb | 12 +++--- app/views/bids/_bid_homework_show.html.erb | 2 +- .../homework_attach/_homeworks_list.html.erb | 2 +- config/locales/zh.yml | 38 +++++++++---------- public/javascripts/course.js | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/app/views/bids/_alert_anonyoms.html.erb b/app/views/bids/_alert_anonyoms.html.erb index 6467b3f27..2f1c443f4 100644 --- a/app/views/bids/_alert_anonyoms.html.erb +++ b/app/views/bids/_alert_anonyoms.html.erb @@ -39,28 +39,28 @@ <% if @bid.comment_status == 0%>

开启匿评功能

- 开启匿评后学生将不能对作业进行 + 开启匿评后学生将不能对作品进行 修改、删除 等操作,目前有 <%= totle_size%>个 学生,共提交了 <%= cur_size %> - 份作业,占 + 份作品,占 <%= percent %>%, 是否确定开启匿评?

<% elsif @bid.comment_status == 1 %>

关闭匿评功能

- 关闭匿评后学生将不能对作业进行 + 关闭匿评后学生将不能对作品进行 匿评 - ,且作业列表将会 + ,且作品列表将会 公开, 目前分配了 <%= totle_size%>份 - 匿评作业,已评了 + 匿评作品,已评了 <%= cur_size %> - 份作业,占 + 份作品,占 <%= percent %>%, 是否确定关闭匿评?

diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index 6cb975055..2f2dbcd07 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -10,7 +10,7 @@ var hour=Math.floor((leftsecond-day1*24*60*60)/3600); var minute=Math.floor((leftsecond-day1*24*60*60-hour*3600)/60); var second=Math.floor(leftsecond-day1*24*60*60-hour*3600-minute*60); - $("#"+divname).html("作业提交还剩 : " + $("#"+divname).html("作品提交还剩 : " +day1+"  " +hour+"  " +minute+"  " diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb index 4f15b9204..3444eca36 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -47,7 +47,7 @@ <%= link_to User.current.login, user_path(User.current), :title => User.current.login%> -
  • 您还没交作品,请创建作品
  • +
  • 您还没提交作品,请点击提交作品按钮:)
  • <%= link_to "提交作品", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
  • diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 8318e0068..5c4ebfe06 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -20,7 +20,7 @@ zh: notice_file_not_found: 您访问的页面不存在或已被删除。 notice_locking_conflict: 数据已被另一位用户更新 notice_not_authorized: 对不起,您无权访问此页面。 - notice_has_homework: 您已经提交过一份作业 + notice_has_homework: 您已经提交过一份作品 notice_not_contest_setting_authorized: 对不起,您无权配置此竞赛。 notice_not_contest_delete_authorized: 对不起,您无权删除此竞赛。 notice_not_authorized_archived_project: 要访问的项目已经归档。 @@ -312,13 +312,13 @@ zh: permission_view_course_messages: 查看留言 permission_view_real_name: 查看真名 permission_view_students: 查看成员 - permission_export_homeworks: 导出作业 + permission_export_homeworks: 导出作品 permission_quote_project: 引用项目 permission_is_manager: 作为管理员 permission_as_teacher: 作为教师 permission_as_student: 作为学生 permission_paret_in_homework: 加入作业 - permission_view_homework_attaches: 查看作业附件 + permission_view_homework_attaches: 查看作品附件 permission_view_course_journals_for_messages: 查看课程留言 view_course_journals_for_messages: 课程留言 label_send_course_journals_for_messages: 发布了留言 @@ -1135,7 +1135,7 @@ zh: label_current_contributors: 位当前贡献者 label_commit_limit: 已截止,但可补交 label_commit_ar: 作业提交截止时间快到了! - lable_has_commit_homework: 您已提交过作业 + lable_has_commit_homework: 您已提交过作品 #modify by men label_x_current_contributors: zero: 位当前贡献者 @@ -1147,7 +1147,7 @@ zh: label_users_on_trustie: 用户 label_front: 第一页 label_commit_on: 次提交 - label_uncommit_homework: 暂无学生提交作业! + label_uncommit_homework: 暂无学生提交作品! #modify by men label_x_commit_on: zero: 次提交 @@ -1207,7 +1207,7 @@ zh: label_student_response: 作业答疑 # modified by bai label_bidding_project: 参与项目 - label_homework_project: 已提交作业 #huang + label_homework_project: 已提交作品 #huang button_bidding: 我要参加 field_enterprise: '企业:' @@ -1228,11 +1228,11 @@ zh: label_wrong_date: 时间格式错误,请输入正确的时间 yyyy-mm-dd label_bidding_succeed: 应标成功 label_bidding_contest_succeed: 竞赛提交成功 #added by bai - label_bidding_homework_succeed: 作业提交成功 #added by bai - label_bidding_homework_failed: 作业提交失败 #added by bai - label_bidding_homework_committed: 你已经提交过作业,不能重复提交! + label_bidding_homework_succeed: 作品提交成功 #added by bai + label_bidding_homework_failed: 作品提交失败 #added by bai + label_bidding_homework_committed: 你已经提交过作品,不能重复提交! label_bidding_fail: 应标失败,该项目已经应标 - label_bidding_homework_fail: 作业提交失败,该作业已经被提交! + label_bidding_homework_fail: 作品提交失败,该作品已经被提交! label_requirement_list: 需求列表 @@ -1242,9 +1242,9 @@ zh: other: 应标项目 #end label_x_homework_project: #modify by huang - zero: 已提交的作业 - one: 已提交的作业 - other: 已提交的作业 + zero: 已提交的作品 + one: 已提交的作品 + other: 已提交的作品 #end label_x_responses: #modify by men zero: 留言 @@ -1396,8 +1396,8 @@ zh: label_bid_project: 项目 label_project_no_follow: 该项目暂未被关注! label_no_bid_project: 暂无参与项目 - label_no_course_project: 暂无已提交的作业! - label_course_submit_homework: 提交了作业 + label_no_course_project: 暂无已提交的作品! + label_course_submit_homework: 提交了作品 label_bids_reward_method: 奖励方式 : label_bids_reward_what: 输入奖励内容 label_call_bonus: 奖金 @@ -1428,7 +1428,7 @@ zh: label_have_feedback: 有了 label_of_feedback: 的 label_welcome_participate: 参与了 - label_cant_download: 未开启互评功能作业不允许下载 + label_cant_download: 未开启互评功能作品不允许下载 lable_close_evaluation: 该作业未开启互评功能 lable_has_evaluation: 您已进行过评价 #modify by men @@ -1891,7 +1891,7 @@ zh: label_max_length: 最多250个字 label_create_person: 创建人员 label_participation_person: 参与人员 - label_homework_without_description: 该作业无任何描述! + label_homework_without_description: 该作品无任何描述! label_sure_exit_homework: 是否确认退出该作业 label_teacher_comments: 教师评论 label_anonymous_comments: 匿评 @@ -1964,9 +1964,9 @@ zh: label_totle: 共有 label_homework_count: 个作业 - lebel_homework_commit: 已提交的作业 + lebel_homework_commit: 已提交的作品 label_open_anonymous_evaluation: 是否匿评 - label_evaluation_description: 即每份作业被允许匿评的人数 + label_evaluation_description: 即每份作品被允许匿评的人数 label_name_not_null: 名称不能为空 modal_valid_unpassing: 该分班已经存在 diff --git a/public/javascripts/course.js b/public/javascripts/course.js index fe9ea965c..396db3ddd 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -357,7 +357,7 @@ function show_bid_dead_line(year,month,day,divname) + " 分" + " 秒" + "" - + "

    作业提交还剩:

    "); + + "

    作品提交还剩:

    "); } //验证新建作业的名字 function regex_bid_name() From ab93d19b5644d5581b68745eef7f23b5b48bbf2a Mon Sep 17 00:00:00 2001 From: whimlex Date: Tue, 21 Apr 2015 16:17:51 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=B8=AD=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=9B=B4=E6=96=B0=E9=A1=B9=E7=9B=AE=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/show.html.erb | 839 +++++++++++++++++----------------- config/locales/users/zh.yml | 2 +- 2 files changed, 421 insertions(+), 420 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 055a00a82..44318c389 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -45,546 +45,547 @@ <% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %> <% act = e.act %> <% unless act.nil? %> - <% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest'%> + <% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest' %> - +
    -
    - <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> - - - <% case e.act_type %> - <% when 'JournalsForMessage' %> - - + + + + <% else %> + <% end %> +
    - <% if User.current.login == e.user.try(:login) %> - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   - <% if User.current.language == "zh" %> + <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> + + + <% case e.act_type %> + <% when 'JournalsForMessage' %> + + - - - + + + - - - + + + - - <% when 'Bid' %> - - <% if act.reward_type == 3 && @show_course == 1%> - <% if e.user == User.current %> - + + <% when 'Bid' %> + + <% if act.reward_type == 3 && @show_course == 1 %> + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - <% else %> - <% if e.user == User.current %> - + <% end %> + <% else %> + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - <% end %> - - - - - - + <% end %> + <% end %> + + + + + + - - <% when 'Journal' %> - - <% if e.user == User.current %> - + + <% when 'Journal' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - <% if act.notes.nil? %> - <% desStr = '' %> - <% else %> - <% desStr= textAreailizable(act, :notes) %> - <% end %> - - - - + <% end %> + + + <% if act.notes.nil? %> + <% desStr = '' %> + <% else %> + <% desStr= textAreailizable(act, :notes) %> + <% end %> + + + + - - <% when 'Changeset' %> - - <% if e.user == User.current %> - + + <% when 'Changeset' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'Message' %> - - <% if e.user == User.current %> - + + <% when 'Message' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'Principal' %> - - <% if e.user == User.current %> - + + <% when 'Principal' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'News' %> - - <% if e.user == User.current %> - + + <% when 'News' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'Issue' %> - <% if e.user == User.current %> - + + <%= l(:label_comments_count, :count => e.act.comments_count) %> + + + + + <% when 'Issue' %> + <% if e.user == User.current %> + - - - - - - - + + + + + + - - <% else %> - + + <% else %> + - - - - - - + + + + + + - + + <%= l(:label_comments_count, :count => e.act.journals.count) %> + + + + - <% end %> + <% end %> - <% when 'Contest' %> - - <% if e.user == User.current && @show_contest == 1%> - + <% if e.user == User.current && @show_contest == 1 %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - <% else %> - <% end %> -
    + <% if User.current.login == e.user.try(:login) %> + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   + <% if User.current.language == "zh" %> <%= l(:label_i_have_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> - - <% else %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> + + <% else %> <%= l(:label_i_have_feedback) %> - <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <% end %> - <% else %> - - <%= link_to("#{e.user.name}", user_path(e.user_id)) %> - - <% if User.current.language == "zh" %> + <% end %> + <% else %> + + <%= link_to("#{e.user.name}", user_path(e.user_id)) %> + + <% if User.current.language == "zh" %> <%= l(:label_have_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> - - <% else %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> + + <% else %> <%= l(:label_have_feedback) %> - <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <% end %> - <% end %> -
    -

    - <%= textAreailizable act.notes %> -

    -
    + <% end %> + <% end %> +
    +

    + <%= textAreailizable act.notes %> +

    + +
    - <% puts 11111111111111%> + <% puts 11111111111111 %> <%= user_jour_feed_back_url e %> -
    -
    -
    +
    +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - + +
    +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + <%= l(:label_i_new_activity) %> - <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> -   + <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> +   <%= l(:label_new_activity) %>   - <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %> - - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - + <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %> + + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + <%= l(:label_i_new_activity) %> - <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> -   + <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> +   <%= l(:label_new_activity) %>   - <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> -
    -

    - <%=textAreailizable act, :description %> -

    -
    + <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
    +

    + <%= textAreailizable act, :description %> +

    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    - - - - - - - - -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + + + + + + + + + +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_i_new_activity) %> -   - <%= 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}"} %> - - - <%= link_to(h(e.user), user_path(e.user_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}"} %> + + + <%= 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 format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), - {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> -
    -

    - <%= desStr %> -

    -
    -
    +   + <%= 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}"} %> +
    +

    + <%= desStr %> +

    +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + +
    +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_i_new_activity) %> -   - <%= link_to format_activity_title(act.title), - {:controller => 'repositories', - :action => 'revision', - :id => act.repository.project, - :repository_id => act.repository.identifier_param, - :rev => act.identifier} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= link_to format_activity_title(act.title), + {:controller => 'repositories', + :action => 'revision', + :id => act.repository.project, + :repository_id => act.repository.identifier_param, + :rev => act.identifier} %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> + +   <%= l(:label_new_activity) %> -   - <%= link_to format_activity_title(act.title), - {:controller => 'repositories', - :action => 'revision', - :id => act.repository.project, - :repository_id => act.repository.identifier_param, - :rev => act.identifier} %> -
    -

    - <%= textAreailizable act,:long_comments %> -

    -
    -
    +   + <%= link_to format_activity_title(act.title), + {:controller => 'repositories', + :action => 'revision', + :id => act.repository.project, + :repository_id => act.repository.identifier_param, + :rev => act.identifier} %> +
    +

    + <%= textAreailizable act, :long_comments %> +

    +
    +
    <%= format_time(e.act.committed_on) %> -
    -
    +
    +
    <%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, - :rev => act.identifier} if e.act.count!= 0%> + :rev => act.identifier} if e.act.count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.count) %> - -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + + <%= l(:label_comments_count, :count => e.act.count) %> + + +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_i_new_activity) %> -   - <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), - {:controller => 'messages', - :action => 'show', - :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), + {:controller => 'messages', + :action => 'show', + :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> + +   <%= l(:label_new_activity) %> -   - <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), - {:controller => 'messages', - :action => 'show', - :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> -
    -

    - <%= textAreailizable(act,:content) %> -

    -
    -
    +   + <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), + {:controller => 'messages', + :action => 'show', + :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> +
    +

    + <%= textAreailizable(act, :content) %> +

    +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + +
    +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_new_user) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   + + + <%= link_to(h(e.user), user_path(e.user_id)) %> + +   <%= l(:label_new_user) %> -
    -

    -
    -
    +
    +

    +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + +
    +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_i_new_activity) %> -   - <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> + +   <%= l(:label_new_activity) %> -   - <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> -
    -

    - <%= textAreailizable act,:description %> -

    -
    -
    +   + <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> +
    +

    + <%= textAreailizable act, :description %> +

    +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    +
    +
    - <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} if e.act.comments_count!= 0%> + <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} if e.act.comments_count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.comments_count) %> - -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_i_new_activity) %>   - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), - {:controller => 'issues', - :action => 'show', - :id => act.id} %> -
    - <%= textAreailizable act, :description %> -
    -
    + <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), + {:controller => 'issues', + :action => 'show', + :id => act.id} %> +
    + <%= textAreailizable act, :description %> +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    +
    +
    <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.journals.count) %> - -
    -
    - - <%= link_to(h(e.user), user_path(e.user_id)) %> -   + + <%= l(:label_comments_count, :count => e.act.journals.count) %> + + +
    + + <%= link_to(h(e.user), user_path(e.user_id)) %> +   <%= l(:label_new_activity) %>   - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), - {:controller => 'issues', - :action => 'show', - :id => act.id} %> -
    - <%= textAreailizable act, :description %> -
    -
    + <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), + {:controller => 'issues', + :action => 'show', + :id => act.id} %> +
    + <%= textAreailizable act, :description %> +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    +
    +
    <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.journals.count) %> - -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + <% when 'Contest' %> +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_i_new_activity) %> -   - <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> + +   <%= l(:label_new_activity) %> -   - <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> -
    -

    - <%= textAreailizable act, :description %> -

    -
    -
    +   + <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> +
    +

    + <%= textAreailizable act, :description %> +

    +
    +
    <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
    -
    -
    +
    - <% end %> - <% end %> - <% end %> + <% end %> + <% end %> + <% end %> -
    - <%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%> - <%= get_course_term @course %> -
    - -
    - <%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %> - <%= content_tag "div", course.short_description, :class => "brief_introduction", :title => course.short_description %> -
    -
    <%= image_tag( "/images/sidebar/tags.png") %> From d6527f1f7e7e0db0fd2fbfc421a60b7323a03650 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 21 Apr 2015 17:54:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 13 ++++++++----- app/views/courses/_new_member_list.html.erb | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index c0e99d546..191606afb 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -191,8 +191,9 @@ class CoursesController < ApplicationController results = searchmember_by_name(student_homework_score(@group.id,0,0,"desc"), q) end @is_remote = true - @result_count = results.count - @results = paginateHelper results, 10 + #@result_count = results.count + #@results = paginateHelper results, 10 + @results = results @search_name = q end @@ -315,13 +316,15 @@ class CoursesController < ApplicationController when '1' @subPage_title = l :label_teacher_list @all_members = searchTeacherAndAssistant(@course) - @members = paginateHelper @all_members, 10 + #@members = paginateHelper @all_members, 10 + @members = @all_members when '2' @subPage_title = l :label_student_list page = params[:page].nil? ? 0 : (params['page'].to_i - 1) @all_members = student_homework_score(0,page, 10,"desc") # @all_members = @course.members - @members = paginateHelper_for_members @all_members, 10 + # @members = paginateHelper_for_members @all_members, 10 + @members = @all_members end respond_to do |format| if params[:page] @@ -877,7 +880,7 @@ class CoursesController < ApplicationController students_for_courses.course_id = #{@course.id} and members.user_id = students_for_courses.student_id AND members.user_id NOT IN (SELECT homework_attaches.user_id FROM homework_attaches WHERE homework_attaches.bid_id in (SELECT bid_id FROM homework_for_courses WHERE course_id = #{@course.id} ) ) - GROUP BY members.user_id ORDER BY score #{score_sort_by} limit #{start_from}, #{nums}" + GROUP BY members.user_id ORDER BY score #{score_sort_by} " #limit #{start_from}, #{nums}" end else diff --git a/app/views/courses/_new_member_list.html.erb b/app/views/courses/_new_member_list.html.erb index 30b77ee50..e8eebe00d 100644 --- a/app/views/courses/_new_member_list.html.erb +++ b/app/views/courses/_new_member_list.html.erb @@ -70,9 +70,9 @@ <% end; reset_cycle %>
    -
      - <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%> -
    + <% else%>

    <%= l(:label_no_data) %> From b99f8d80566885d8e4c4ea664427cd7454fcff01 Mon Sep 17 00:00:00 2001 From: whimlex Date: Tue, 21 Apr 2015 17:56:01 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=EF=BC=8C=E4=B8=8A=E4=BC=A0=E8=AF=BE=E7=A8=8B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?logo=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/avatar/_avatar_form.html.erb | 3 ++- app/views/avatar/_new_avatar_form.html.erb | 3 ++- public/stylesheets/application.css | 4 ++++ public/stylesheets/public.css | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/avatar/_avatar_form.html.erb b/app/views/avatar/_avatar_form.html.erb index 6f9b9c7b1..fef9f7bdb 100644 --- a/app/views/avatar/_avatar_form.html.erb +++ b/app/views/avatar/_avatar_form.html.erb @@ -46,7 +46,8 @@ <%= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "btn_addPic", :style => "text-decoration:none;" %> <%= l(:button_upload_photo) %> - + + (个人头像建议90*90大小,课程和项目logo建议60*60大小,或者等比图像) <%= file_field_tag 'avatar[image]', diff --git a/app/views/avatar/_new_avatar_form.html.erb b/app/views/avatar/_new_avatar_form.html.erb index 8ca08c766..8b81ebf66 100644 --- a/app/views/avatar/_new_avatar_form.html.erb +++ b/app/views/avatar/_new_avatar_form.html.erb @@ -2,7 +2,8 @@ <%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%> <%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "upbtn fl" %> -上传图片 +<%= l(:button_upload_photo) %> +(个人头像建议90*90大小,课程和项目logo建议60*60大小,或者等比图像) <%= file_field_tag 'avatar[image]', :id => nil, :class => 'upload_file ', diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 4b6b681c7..3e88bb30a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -30,9 +30,13 @@ ol,ul,li{ list-style-type:none} a{ text-decoration:none; } .ml10{ margin-left:10px;} .ml20{ margin-left:20px;} +.ml25{ margin-left:25px;} +.ml30{ margin-left:30px;} .mr10{ margin-right:10px;} .mb5{ margin-bottom:5px;} .mb10{ margin-bottom:10px;} +.f12{font-size:12px; font-weight:normal;} +.c_orange{color:#ff5722;} .fl{ float: left;} .fr{ float:right;} .project_h4{ font-size:14px; color:#3b3b3b;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 9d714b1de..917360b38 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -54,6 +54,7 @@ h4{ font-size:14px; color:#3b3b3b;} .ml10{ margin-left:10px;} .ml15{ margin-left:15px;} .ml20{ margin-left:20px;} +.ml25{ margin-left:25px;} .ml40{ margin-left:40px;} .ml45{ margin-left:45px;} .ml55{ margin-left:55px;} @@ -71,6 +72,7 @@ h4{ font-size:14px; color:#3b3b3b;} .mt5{ margin-top:5px;} .mt8{ margin-top:8px;} .mt10{ margin-top:10px;} +.mt43{ margin-top:43px;} .mb5{ margin-bottom:5px;} .mb10{ margin-bottom:10px;} .pl15{ padding-left:15px;}