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.
53 lines
2.1 KiB
53 lines
2.1 KiB
6 years ago
|
<div class="edu-class-container " >
|
||
|
<p class="mb10"><a href="<%= user_path(@user) %>" class="color-grey-9"><%= @user.show_real_name %> </a> >
|
||
|
<a href="<%= shixuns_path %>" class="color-grey-9">精选实训 </a> > 我的实训 </p>
|
||
|
<div class="edu-con-bg01" >
|
||
|
<div class="">
|
||
|
<div class="edu-tab clearfix mb20">
|
||
|
<ul id="edu-tab-nav" class="border-bottom-orange">
|
||
|
<li id="shixun_all" class="new-tab-nav background-orange">
|
||
|
<a href="javascript:void(0);" class="tab_type font-16">全部</a>
|
||
|
</li>
|
||
|
<li id="shixun_create" class="new-tab-nav">
|
||
|
<a href="javascript:void(0);" class="tab_type font-16">我创建的</a>
|
||
|
</li>
|
||
|
<li id="shixun_cooperative" class="new-tab-nav">
|
||
|
<a href="javascript:void(0);" class="tab_type font-16" >我合作的</a>
|
||
|
</li>
|
||
|
<li id="shixun_challenge" class="new-tab-nav">
|
||
|
<a href="javascript:void(0);" class="tab_type font-16">我挑战的</a>
|
||
|
</li>
|
||
|
<a href="javascript:void(0);" class="white-btn orange-btn fr font-16" style = "margin-top:8px" onclick="shixun_new(<%= @mail %>)">+ 新建</a>
|
||
|
</ul>
|
||
|
<div class="cl"></div>
|
||
|
<div id="edu-tab-con-1" class="user_bg_shadow bor-grey-e">
|
||
|
<%= render :partial => "users/myshixuns_list" %>
|
||
|
</div>
|
||
|
<div class="cl"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
$(function(){
|
||
|
$(".new-tab-nav").on("click", function(){
|
||
|
console.log($(this).attr("id"));
|
||
|
var filter = $(this).attr("id");
|
||
|
$(".new-tab-nav").removeClass("background-orange");
|
||
|
$(this).addClass("background-orange");
|
||
|
$.ajax({
|
||
|
url: '<%= shixuns_user_path(@user) %>',
|
||
|
data: {filter: filter},
|
||
|
dataType: 'script'
|
||
|
});
|
||
|
})
|
||
|
});
|
||
|
// 新建实训
|
||
|
function shixun_new(mail){
|
||
|
if(mail){
|
||
|
sure_box_redirect_btn('<%= security_settings_path %>', '新建实训,请先绑定邮箱','绑定邮箱');
|
||
|
}else{
|
||
|
window.location.href= '<%= new_shixun_path %>';
|
||
|
}
|
||
|
}
|
||
|
</script>
|