Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
0d055fd807
|
@ -1,8 +1,9 @@
|
||||||
<%
|
<%
|
||||||
id = "finish_course_tag"
|
id = "finish_course_#{project.id}"
|
||||||
|
display = (project.course_extra.teacher.id == User.current.id )
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<% if course_endTime_timeout?(project) #如果课程已结束%>
|
<% if display && course_endTime_timeout?(project) #如果课程已结束%>
|
||||||
<%= link_to '重启课程', restartcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要重启课程?') %>
|
<%= link_to '重启课程', restartcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要重启课程?') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to '关闭课程', finishcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要关闭课程?') %>
|
<%= link_to '关闭课程', finishcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要关闭课程?') %>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<% if Rails.env.development? %>
|
<% if Rails.env.development? %>
|
||||||
console.debug('课程修改成功:结束时间改为<%=Course.find_by_extra(@project.identifier).try(:endup_time)%>');
|
console.debug('课程修改成功:结束时间改为<%=Course.find_by_extra(@project.identifier).try(:endup_time)%>');
|
||||||
<% end %>
|
<% end %>
|
||||||
$('#finish_course_tag').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:project => @project} )%>")
|
$('#finish_course_<%=@project.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:project => @project} )%>")
|
||||||
<% else %>
|
<% else %>
|
||||||
alert('设置失败,请在论坛提交问题,等待管理员处理。');
|
alert('设置失败,请在论坛提交问题,等待管理员处理。');
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
<td>
|
<td>
|
||||||
<table width="580" border="0">
|
<table width="580" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top"><span><%= link_to_project(membership.project) %></span>
|
<td colspan="2" valign="top">
|
||||||
|
<span><%= link_to_project(membership.project) %></span>
|
||||||
<!--added by huang for: filter by roles-->
|
<!--added by huang for: filter by roles-->
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
|
<%=render :partial => 'courses/set_course_time', :locals => {:project => membership.project} %>
|
||||||
<% if User.current == @user %>
|
<% if User.current == @user %>
|
||||||
<% (membership.roles).each do |role| %>
|
<% (membership.roles).each do |role| %>
|
||||||
<% unless (role == Role.find(9) || role == Role.find(3)) %>
|
<% unless (role == Role.find(9) || role == Role.find(3)) %>
|
||||||
|
|
Loading…
Reference in New Issue