You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/managements/departments.html.erb

54 lines
2.3 KiB

<%= form_tag(url_for(departments_managements_path),:id=>"department_search",:method => "post", :remote=>true) do %>
<div class="edu-con-top clearfix mb20 xmt10 bor-grey-e mt10">
<input class="fl task-form-20 task-height-30 ml25" id="shixun_Look_name" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" >
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt2" onclick="$('#department_search').submit();">搜索</a>
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2" id="clear_contents">清除</a>
<!--超级管理员单位部门列表增加检索非空部门管理员的功能-->
<span class="fl ml60">
<input type="checkbox" name="admin" value="0" id="onlyCheck" class="magic-checkbox">
<label for="onlyCheck" style="top:0px" class="font-14">仅看部门管理员(非空)</label>
</span>
<!--超级管理员单位部门列表增加检索非空url的功能-->
<span class="fl ml20">
<input type="checkbox" name="url" value="0" id="onlyUrl" class="magic-checkbox">
<label for="onlyUrl" style="top:0px" class="font-14">仅看统计url(非空)</label>
</span>
<%= link_to '创建',{:controller => 'managements', :action => 'create_departments'}, :remote => true, :class => "task-btn task-btn-green fr mt6 mr10" %>
<a href="javascript:void(0);" onclick="import_excel_score()" class="task-btn task-btn-green fr mt6 mr30">导入</a>
<input name="sx_order" type="hidden"/>
</div>
<% end %>
<div class="edu-con-bg01 mt15" id="managements_departments_list">
<%= render :partial => "managements/departments_list" %>
</div>
<script>
$(function(){
//仅看部门管理员(非空)、统计url(非空)的选择事件
$("#onlyCheck, #onlyUrl").click(function(){
var checked = $(this).is(":checked");
if(checked){
$(this).val("1");
}else {
$(this).val("0");
}
$('#department_search').submit();
});
});
function clearSearchCondition(){
$("#shixun_Look_name").val("");
$('#department_search').submit();
}
function import_excel_score() {
var htmlvalue = '<%= escape_javascript(render :partial => 'student_work/import_excel_score') %>';
pop_box_new(htmlvalue, 452, 163);
$("#submit_url").val('<%= import_departments_managements_path() %>');
}
</script>