Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
b762a639ea
|
@ -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
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<!--参数-->
|
||||
<div class="pr_info_foot">
|
||||
<%= 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' %>)
|
||||
<span>| </span>
|
||||
<%= 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 %>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue