实训复制添加可配置功能
This commit is contained in:
parent
945a3772e6
commit
84643fe2cb
|
|
@ -487,6 +487,7 @@ class ShixunsController < ApplicationController
|
|||
#@shixun.major_id = params[:major_id]
|
||||
@shixun.trainee = params[:trainee]
|
||||
@shixun.webssh = params[:webssh].to_i
|
||||
@shixun.can_copy = params[:can_copy].to_i
|
||||
@shixun.identifier = identifier
|
||||
# if params[:course_id]
|
||||
# params[:course_id].each do |course_id|
|
||||
|
|
@ -665,6 +666,7 @@ class ShixunsController < ApplicationController
|
|||
@shixun.language = params[:language]
|
||||
@shixun.trainee = params[:trainee]
|
||||
@shixun.webssh = params[:webssh].to_i
|
||||
@shixun.can_copy = params[:can_copy].to_i
|
||||
# if params[:course_id]
|
||||
# @shixun.shixun_major_courses.destroy_all
|
||||
# params[:course_id].each do |course_id|
|
||||
|
|
|
|||
|
|
@ -102,6 +102,13 @@
|
|||
<label style="top:6px" class="color-grey" for="websh">(勾选则给学员的实践任务提供命令行窗口,否则不提供)</label>
|
||||
</span>
|
||||
</li>
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl">复制 </label>
|
||||
<span class="fl mr20">
|
||||
<input type="checkbox" <%= @shixun.can_copy ? 'checked' : "" %> name="can_copy" value="1" id="can_copy" class="ml5 mr5 magic-checkbox" >
|
||||
<label style="top:6px" class="color-grey" for="can_copy">(勾选则给实训合作者提供复制实训功能,否则不提供)</label>
|
||||
</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0)" class="task-btn task-btn-blue fr" onclick="submit_new_project();">提交</a>
|
||||
<%= link_to "取消", shixuns_path, :class => "task-btn fr mr10" %>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,13 @@
|
|||
<label style="top:6px" class="color-grey" for="webssh">(勾选则给学员的实践任务提供命令行窗口,否则不提供)</label>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl">复制 </label>
|
||||
<span class="fl mr20">
|
||||
<input type="checkbox" <%= @shixun.can_copy ? 'checked' : "" %> name="can_copy" value="<%= @shixun.can_copy ? 1 : 0 %>" id="can_copy" class="ml5 mr5 magic-checkbox" >
|
||||
<label style="top:6px" class="color-grey" for="can_copy">(勾选则给实训合作者提供复制实训功能,否则不提供)</label>
|
||||
</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0)" class="task-btn task-btn-green fr " onclick="submit_edit_shixun(<%= @shixun.id %>);">保存</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -58,6 +58,13 @@
|
|||
<!--<%#= @shixun.language %>-->
|
||||
<!--</div>-->
|
||||
</li>
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl">复制 </label>
|
||||
<span class="fl mr20">
|
||||
<input type="checkbox" <%= @shixun.can_copy ? 'checked' : "" %> name="can_copy" value="<%= @shixun.can_copy ? 1 : 0 %>" id="can_copy" disabled="disabled" class="ml5 mr5 magic-checkbox" >
|
||||
<label style="top:6px" class="color-grey" for="can_copy">(勾选则给实训合作者提供复制实训功能,否则不提供)</label>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@
|
|||
<%= link_to "继续实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15 ", :id => "shixun_operation", :remote => true %>
|
||||
<% end %>
|
||||
<%= link_to '发送至', search_user_courses_shixun_path(@shixun), :remote => true, :class => "fr shixun-task-btn task-btn-green mr15" %>
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<%= link_to "复制", copy_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15" %>
|
||||
<!--<a href="javascript:void(0);" onclick="op_confirm_box('<%#= copy_shixun_path(@shixun) %>', '复制信息包括:实训关卡、版本库等基本信息');" class = "fr shixun-task-btn task-btn-green mr15">复制</a>-->
|
||||
<% end %>
|
||||
<% elsif @shixun.status == 3 %>
|
||||
<% unless myshixun.blank? %>
|
||||
<%= link_to "继续实战", operation_shixun_path(@shixun, :myshixun_id => myshixun.try(:id)), :class => "fr shixun-task-btn task-btn-orange mr15 ", :id => "shixun_operation", :remote => true %>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" class="fr shixun-task-ban-btn mr15">已关闭</a>
|
||||
<% end %>
|
||||
<% if @shixun.can_copy && User.current.manager_of_shixun?(@shixun) %>
|
||||
<%= link_to "复制", copy_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15" %>
|
||||
<!--<a href="javascript:void(0);" onclick="op_confirm_box('<%#= copy_shixun_path(@shixun) %>', '复制信息包括:实训关卡、版本库等基本信息');" class = "fr shixun-task-btn task-btn-green mr15">复制</a>-->
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% unless User.current.manager_of_shixun?(@shixun) %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue