|
|
|
<td class="shixun-line-no"><%= page_no %></td>
|
|
|
|
<td><%= shixun.identifier %></td>
|
|
|
|
<td class="text-left">
|
|
|
|
<span>
|
|
|
|
<%= link_to overflow_hidden_span(shixun.name,width:160), "/shixuns/#{shixun.identifier}", :target => "_blank", :title => shixun.name %>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= display_text shixun.shixun_main_name %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<% status_options = [['超级管理员', '0'], ["合作团队", "1"]] %>
|
|
|
|
<%= select_tag(:use_scope, options_for_select(status_options,shixun.use_scope),class:"form-control shixun-setting-form",data:{id:shixun.id}) %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= select_tag(:tag_repertoires, options_for_select(@shixun_tags,shixun.tag_repertoires.pluck(:id)),multiple:true,class:"form-control shixun-setting-form",data:{id:shixun.id},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),"/users/#{shixun.owner.login}",target:'_blank' %></td>
|
|
|
|
<td>
|
|
|
|
<% 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 %>
|
|
|
|
<span>已关闭</span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= check_box_tag :can_copy,!shixun.can_copy,shixun.can_copy,remote:true,data:{id:shixun.id},class:"shixun-setting-form" %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input name="excute_time" value="<%= shixun.excute_time %>" class="form-control shixun-setting-form" data-id="<%= shixun.id %>">
|
|
|
|
</td>
|
|
|
|
<td class="operate">
|
|
|
|
<%= check_box_tag :webssh,(shixun.webssh == 1 ? 0 : 1),(shixun.webssh == 1 ? true : false),remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},class:"shixun-setting-form",title:"ssh" %>
|
|
|
|
<%= check_box_tag :hidden,!shixun.hidden,shixun.hidden,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},class:"shixun-setting-form" ,title:"隐藏"%>
|
|
|
|
<%= check_box_tag :homepage_show,!shixun.homepage_show,shixun.homepage_show,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},class:"shixun-setting-form",title:"首页" %>
|
|
|
|
<%= check_box_tag :task_pass,!shixun.task_pass,shixun.task_pass,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},class:"shixun-setting-form" ,title:"跳关"%>
|
|
|
|
<%= check_box_tag :code_hidden,!shixun.code_hidden,shixun.code_hidden,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},class:"shixun-setting-form" ,title:"隐藏目录"%>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$("#tags-chosen-<%= shixun.id %>").select2({
|
|
|
|
multiple: true,
|
|
|
|
maximumSelectionLength: 3,
|
|
|
|
placeholder: '请选择技术体系'});
|
|
|
|
</script>
|