|
|
|
<div id="Auth_main">
|
|
|
|
<div class="mb20 authMainImg">
|
|
|
|
<p class="font-30 color-white font-bd"><%= @school.name %></p>
|
|
|
|
</div>
|
|
|
|
<% if @school_managers.count > 0 %>
|
|
|
|
<div class="educontent mb10 clearfix edu-back-white">
|
|
|
|
<div class="padding20-30">
|
|
|
|
<p class="mb20"><span class="font-18 mr20">学校管理员</span><span class="font-12 color-grey-9">温馨提醒:学校管理员有添加专业及设置专业管理员等权限</span></p>
|
|
|
|
<ul class="clearfix managerPanel">
|
|
|
|
<% @school_managers.each do |manager| %>
|
|
|
|
<a href="<%= user_path(manager) %>" class="fl">
|
|
|
|
<%= image_tag(url_to_avatar(manager), :width =>"48",:height => "48", :class => "radius", :alt=>"头像") %>
|
|
|
|
<span data-tip-down="<%= manager.show_real_name %>"><%= manager.show_real_name %></span>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="educontent mb30">
|
|
|
|
<ul class="clearfix padding20-30 bor-bottom-greyE edu-back-white">
|
|
|
|
<li class="fl">
|
|
|
|
<p class="font-18">专业列表</p>
|
|
|
|
<p><span class="color-grey-9 mr10">请添加参与认证的专业名称</span><a href="javascript:void(0)" onclick="elasticLayer(3527);" class="color-blue">查看详情</a></p>
|
|
|
|
</li>
|
|
|
|
<% if @is_school_manager %>
|
|
|
|
<a href="javascript:void(0)" class="fr white-btn edu-blueback-btn mt25" onclick="addNewMajorPanel();">添加专业</a>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<div class="clearfix padding20-30 bor-bottom-greyE edu-back-white">
|
|
|
|
<span class="fl font-12 mt5">
|
|
|
|
<span class="color-orange-tip mr3" id="search_major_count"><%= @obj_count %></span>
|
|
|
|
个检索结果(<span id="all_major_count"><%= @major_count %></span> 专业)
|
|
|
|
</span>
|
|
|
|
<div class="fr" id="pollingPanel">
|
|
|
|
<input type="text" name="search" placeholder="请输入专业代码或名称搜索" />
|
|
|
|
<a href="javascript:void(0)" onclick="submit_search_major()"><i class="iconfont icon-sousuo font-16 color-grey-9"></i></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ListTableLine" id="school_major_list">
|
|
|
|
<%= render :partial => "department_list" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$(function(){
|
|
|
|
|
|
|
|
$(".MajorName i").click(function(){
|
|
|
|
$(this).parents(".MajorName").remove();
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#school_major_list").on("click", ".addMajorManager", function(){
|
|
|
|
if($("#major_managers_"+$(this).attr("data-major-id")).children("span").length < 5){
|
|
|
|
var html="<%= escape_javascript(render :partial => "ecs/authList_addUnit") %>";
|
|
|
|
pop_box_new(html,572,500);
|
|
|
|
$("#object_id").val($(this).attr("data-major-id"));
|
|
|
|
$("#object_type").val('major');
|
|
|
|
$("input[name='school']").val('<%= @school.name %>');
|
|
|
|
} else {
|
|
|
|
notice_box("只能配置5个专业管理员");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#pollingPanel").on("keydown", "input[name='search']", function(e){
|
|
|
|
// 兼容FF和IE和Opera
|
|
|
|
var theEvent = e || window.event;
|
|
|
|
var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
|
|
|
|
if (code == 13) {
|
|
|
|
//回车执行查询
|
|
|
|
submit_search_major()
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
function addNewMajorPanel(){
|
|
|
|
var html="<%= escape_javascript(render :partial => "ecs/auth_newMajor") %>";
|
|
|
|
pop_box_new(html,572,500);
|
|
|
|
}
|
|
|
|
|
|
|
|
function submit_search_major(){
|
|
|
|
$.get('/ecs/department?school_id=<%= @school.id %>',
|
|
|
|
{ search: $("input[name='search']").val().trim()});
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|