diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index a5acc4523..caca6fb1e 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -36,7 +36,7 @@ module CoursesHelper #生成课程老师成员链接 def course_teacher_link teacher_num if User.current.member_of_course?(@course) || User.current.admin? - link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue' + link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue', :id => 'teacher_number' else content_tag 'span',teacher_num, :class => 'info_foot_num c_blue' end @@ -45,7 +45,7 @@ module CoursesHelper #生成课程学生列表连接 def course_student_link student_num if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? - link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue' + link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue', :id => "student_number" else content_tag 'span',student_num, :class => 'info_foot_num c_blue' end diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 0ef55d278..305187b02 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -24,9 +24,9 @@
<%#= l(:label_technical_support) %> - - - 请加入:师姐答疑群 + + +

请加入师姐答疑群

173184401

diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 0f622d831..b418be4ab 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -76,7 +76,7 @@
- <%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue' %>) + <%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue', :id => 'project_members_number' %>) <%= l(:label_user_watcher) %>(<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>) <% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 7b951f152..1eddeb517 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -46,7 +46,7 @@
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %> diff --git a/app/views/members/create.js.erb b/app/views/members/create.js.erb index 976f5c724..8a6500572 100644 --- a/app/views/members/create.js.erb +++ b/app/views/members/create.js.erb @@ -4,6 +4,7 @@ <% else%> $('#pro_st_tbc_03').html('<%= escape_javascript(render :partial => 'projects/settings/new_members') %>'); hideOnLoad(); + $("#project_members_number").html("<%= @project.members.count %>"); alert("<%= @succes_message%>"); <% end%> <%elsif @course%> @@ -11,6 +12,8 @@ alert("<%= @create_member_error_messages%>"); <% else%> $('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); + $("#teacher_number").html("<%= searchTeacherAndAssistant(@course).count %>"); + $("#student_number").html("<%= studentCount(@course) %>"); alert("添加成功"); <% end%> hideOnLoad(); diff --git a/app/views/members/destroy.js.erb b/app/views/members/destroy.js.erb index b6f206e05..b331f15a4 100644 --- a/app/views/members/destroy.js.erb +++ b/app/views/members/destroy.js.erb @@ -1,7 +1,10 @@ <%if @project%> $('#pro_st_tbc_03').html('<%= escape_javascript(render :partial => 'projects/settings/new_members') %>'); + $("#project_members_number").html("<%= @project.members.count %>"); // $('#tab-content-members').html('<%#= escape_javascript(render :partial => 'projects/settings/members') %>'); <%elsif @course%> $('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); + $("#teacher_number").html("<%= searchTeacherAndAssistant(@course).count %>") + $("#student_number").html("<%= studentCount(@course) %>"); <%end%> hideOnLoad(); diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 7bc674ea6..7e39ad5fa 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -170,7 +170,7 @@
  • 确认 - +
  • diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index cffb1d97a..fb4ec6bbe 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -41,6 +41,11 @@ <%= homework_common.language_name%>
    <% end %> + <% if homework_common.homework_detail_manual.comment_status == 0 %> +
    + <%= l(:label_publish_time)%>:<%= homework_common.publish_time%> +
    + <% end %>
    <%= l(:label_end_time)%>:<%= homework_common.end_time%>
    diff --git a/config/locales/zh.yml b/config/locales/zh.yml index a7274c3c2..12c1b9258 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2024,6 +2024,7 @@ zh: label_creat: 创建 #api end + label_publish_time: 发布时间 label_end_time: 截止时间 label_send_email: 确定发送 label_input_email: 请输入邮箱地址(必填) diff --git a/public/javascripts/course.js b/public/javascripts/course.js index ed920b48a..da24e2878 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -666,6 +666,7 @@ function regex_homework_end_publish_time() $("#homework_publish_time").val(myDate.toLocaleDateString()); } var publish_time = Date.parse($("#homework_publish_time").val()); + var end_time = Date.parse($("#homework_end_time").val()); if(end_time < publish_time) { $("#homework_end_time_span").text("截止日期不能小于发布日期"); @@ -1258,4 +1259,4 @@ function course_outline(id){ // $('#course_outline_search').on('input',function(){ // alert('<%= @course.id%>') // }) -//}) +//})