|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
<td><%= shixun.identifier %></td>
|
|
|
|
|
<td class="text-left">
|
|
|
|
|
<span>
|
|
|
|
|
<%= link_to overflow_hidden_span(shixun.name,width:230), "/shixuns/#{shixun.identifier}", :target => "_blank", :title => shixun.name %>
|
|
|
|
|
<%= link_to overflow_hidden_span(shixun.name,width:200), "/shixuns/#{shixun.identifier}", :target => "_blank", :title => shixun.name %>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
@ -13,73 +13,46 @@
|
|
|
|
|
<%= select_tag(:use_scope, options_for_select(status_options,shixun.use_scope),class:"form-control shixun-setting-form",data:{id:shixun.id},onchange:"update_change(this)") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<%= select_tag(:tag_repertoires, options_for_select(@shixun_tags,shixun.is_tag_used?(tag.id)),multiple:true,class:"form-control tags-selected_multi",onchange: "update_change(this)") %>
|
|
|
|
|
<!-- 新版技术标签-->
|
|
|
|
|
<!-- <div class="fl pr ml30">-->
|
|
|
|
|
<!-- <input type="hidden" name="small_type" class="shixun_language" value="">-->
|
|
|
|
|
<!-- <input type="text" class="input-100-40 pr20 color-grey-3 font-14 pointer techInput" readonly value="<%#= shixun.shixun_tag_name.join(";") %>" placeholder="请选择技术体系"/>-->
|
|
|
|
|
<!-- <input class="search" contenteditable="true" style=" display: none; max-width: 70px;-->
|
|
|
|
|
<!-- position: absolute;-->
|
|
|
|
|
<!-- min-width: 40px;-->
|
|
|
|
|
<!-- height: 96%;-->
|
|
|
|
|
<!-- left: 180px;-->
|
|
|
|
|
<!-- top: 0px;-->
|
|
|
|
|
<!-- padding: 0 4px;-->
|
|
|
|
|
<!-- width: fit-content;-->
|
|
|
|
|
<!-- background: #fff;-->
|
|
|
|
|
<!-- line-height: 40px;-->
|
|
|
|
|
<!-- border: 1px solid rgb(234, 234, 234);"></input>-->
|
|
|
|
|
<!-- <div class="down-select shixun_small_language_option" style="padding: 2px 0px">-->
|
|
|
|
|
<%# @shixun_tags.each do |tag| %>
|
|
|
|
|
<!-- <p data-shixun-value="<%#= index + 1 %><%= tag.name %>_<%#= tag.id %>">-->
|
|
|
|
|
<!-- <input name="select<%#= index %>" data-value="<%#= tag.id %>" <%#= shixun.is_tag_used?(tag.id) ? "checked" : "" %> data-shixun="<%#= shixun.id %>" type="checkbox" class="select<%#= count %> magic-checkbox" id="<%#= count %>_<%#= tag.name %>_<%#= tag.id %>" value="<%#= tag.name %>"/>-->
|
|
|
|
|
<!-- <label style="top:0px" for="<%#= index %>_<%#= tag.name %>_<%#= tag.id %>" class="task-hide"><%#= tag.name %></label>-->
|
|
|
|
|
<!-- </p>-->
|
|
|
|
|
<%# end %>
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<%= select_tag(:tag_repertoires, options_for_select(@shixun_tags,shixun.tag_repertoires.pluck(:id)),multiple:true,class:"form-control tags-selected_multi",data:{id:shixun.id},onchange: "update_change(this)",id:"tags-chosen-#{shixun.id}") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<!-- 图片上传,稍后添加-->
|
|
|
|
|
|
|
|
|
|
<a href="javascript:void(0);" id="object_upload_img_<%= shixun.id %>" onclick="$('#upload_img_<%= shixun.id %>').click();">
|
|
|
|
|
<%= File.exist?(disk_filename("Shixun",shixun.id)) ? "重新上传" : "上传图片" %>
|
|
|
|
|
</a>
|
|
|
|
|
<% if File.exist?(disk_filename("Shixun",shixun.id)) %>
|
|
|
|
|
<%= image_tag(url_to_avatar(shixun), :class => "w80 h80 fl ml5 shixun_image_show", :id => "shixun_image_show_#{shixun.id}") %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<img src="" class="w80 h80 fl ml5 shixun_image_show none" id="shixun_image_show_<%= shixun.id %>"/>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
<td><%= link_to shixun.owner.try(:show_real_name),user_path(shixun.user_id),target:'_blank' %></td>
|
|
|
|
|
<td><%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.login}",target:'_blank' %></td>
|
|
|
|
|
<td>
|
|
|
|
|
<% if shixun.status == 2 %>
|
|
|
|
|
<%= link_to "关闭", "###", :class => "", :remote => true %>
|
|
|
|
|
<% if shixun.status.to_i < 3 %>
|
|
|
|
|
<%= link_to "关闭", admins_shixun_setting_path(shixun,status:3,page_no:page_no),method: :put, :class => "", :remote => true %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a href="javascript:void(0)">关闭</a>
|
|
|
|
|
<span>已关闭</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="operate">
|
|
|
|
|
<input type="checkbox" <%= shixun.can_copy ? 'checked' : "" %> name="can_copy" value="<%= shixun.id %>" id="can_copy_<%= shixun.id %>" class="ml5 mr5 magic-checkbox" >
|
|
|
|
|
<label style="top:-15px;" class="color-grey" for="can_copy_<%= shixun.id %>"></label>
|
|
|
|
|
<td>
|
|
|
|
|
<%= check_box_tag :can_copy,!shixun.can_copy,shixun.can_copy,remote:true,data:{id:shixun.id},onchange:"update_change(this)" %>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="operate">
|
|
|
|
|
<input name="excute_time" value="<%= shixun.excute_time %>" class="input-100-35 ml5 mr5 excute_time">
|
|
|
|
|
<div class="undis"><%= shixun.id %></div>
|
|
|
|
|
<td>
|
|
|
|
|
<input name="excute_time" value="<%= shixun.excute_time %>" class="form-control" data-id="<%= shixun.id %>" onchange="update_change(this)">
|
|
|
|
|
</td>
|
|
|
|
|
<td class="operate">
|
|
|
|
|
<span class="fl ml5 shixun_webssh">
|
|
|
|
|
<input type="checkbox" <%= shixun.webssh == 1 ? 'checked' : "" %> value="0" id="join_course_role_<%= shixun.id %>" class="ml-3 mr5 magic-checkbox">
|
|
|
|
|
<label style="top:0px;padding-left: 19px;" for="join_course_role_<%= shixun.id %>">ssh</label>
|
|
|
|
|
<div class="undis"><%= shixun.id %></div>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="fl ml5 shixun_hidden">
|
|
|
|
|
<input type="checkbox" <%= shixun.hidden ? 'checked' : "" %> value="0" id="shixun_hidden_<%= shixun.id %>" name="hidden" class="ml-3 mr5 magic-checkbox">
|
|
|
|
|
<label style="top:0px;padding-left: 19px;" for="shixun_hidden_<%= shixun.id %>">隐藏</label>
|
|
|
|
|
<div class="undis"><%= shixun.id %></div>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="fl ml5 homepage_show">
|
|
|
|
|
<input type="checkbox" name="homepage_show_cell" <%= shixun.status == 2 ? "" : "disabled" %> value="<%= shixun.id %>" <%= shixun.homepage_show ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="homepage_show_<%= shixun.id %>">
|
|
|
|
|
<label style="top:0px;padding-left: 19px;" for="homepage_show_<%= shixun.id %>">首页</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="fl ml5 shixun_pass">
|
|
|
|
|
<input type="checkbox" name="shixun_pass_cell" value="<%= shixun.id %>" <%= shixun.task_pass ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="shixun_pass_<%= shixun.id %>">
|
|
|
|
|
<label style="top:0px;padding-left: 19px;" for="shixun_pass_<%= shixun.id %>">跳关</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="fl ml5 shixun_file">
|
|
|
|
|
<input type="checkbox" name="shixun_file_cell" value="<%= shixun.id %>" <%= shixun.code_hidden ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="shixun_file_<%= shixun.id %>">
|
|
|
|
|
<label style="top:0px;padding-left: 19px;" for="shixun_file_<%= shixun.id %>">隐藏文件目录</label>
|
|
|
|
|
</span>
|
|
|
|
|
<%= check_box_tag :webssh,(shixun.webssh == 1 ? 0 : 1),(shixun.webssh == 1 ? true : false),remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},onchange:"update_change(this)",title:"ssh" %>
|
|
|
|
|
<%= check_box_tag :hidden,!shixun.hidden,shixun.hidden,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},onchange:"update_change(this)" ,title:"隐藏"%>
|
|
|
|
|
<%= check_box_tag :homepage_show,!shixun.homepage_show,shixun.homepage_show,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},onchange:"update_change(this)",title:"首页" %>
|
|
|
|
|
<%= check_box_tag :task_pass,!shixun.task_pass,shixun.task_pass,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},onchange:"update_change(this)" ,title:"跳关"%>
|
|
|
|
|
<%= check_box_tag :code_hidden,!shixun.code_hidden,shixun.code_hidden,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},onchange:"update_change(this)" ,title:"隐藏文件目录"%>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$("#tags-chosen-<%= shixun.id %>").select2({
|
|
|
|
|
multiple: true,
|
|
|
|
|
maximumSelectionLength: 3,
|
|
|
|
|
placeholder: '请选择技术体系'});
|
|
|
|
|
</script>
|