issue解决
This commit is contained in:
parent
290df45c79
commit
e23dfaa2f8
|
|
@ -136,7 +136,7 @@ class ManagementsController < ApplicationController
|
|||
end
|
||||
|
||||
if params[:support_shixuns]
|
||||
@major = @major.where(:support_shixuns => params[:support_shixuns].to_i)
|
||||
@major = @major.where(:support_shixuns => params[:support_shixuns].to_i,:major_level=> 1)
|
||||
end
|
||||
|
||||
@major = @major.order("created_at #{@sx_order}")
|
||||
|
|
@ -603,6 +603,7 @@ end
|
|||
def class_shixuns
|
||||
@menu_type = 4
|
||||
@sub_type = 1
|
||||
@sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
|
||||
@edit_class_sx_num=Subject.where(:status => 0).count
|
||||
@audit_class_sx_num=Subject.where(:status => 1).count
|
||||
@publish_class_sx_num=Subject.where(:status => 2).count
|
||||
|
|
@ -631,6 +632,8 @@ end
|
|||
user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id))
|
||||
@schools = School.where(:id => user_exs.map(&:school_id))
|
||||
end
|
||||
@c_shixuns = @c_shixuns.order("created_at #{@sx_order}")
|
||||
|
||||
@c_shixuns_count = @c_shixuns.count
|
||||
limit = 20
|
||||
@c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1
|
||||
|
|
@ -651,6 +654,7 @@ end
|
|||
def class_publish_shixuns
|
||||
@menu_type = 4
|
||||
@sub_type = 2
|
||||
@sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
|
||||
search = params[:search] # 搜索字
|
||||
keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/课程名搜索
|
||||
if params[:school_id] && params[:school_id] != '0'
|
||||
|
|
@ -670,7 +674,7 @@ end
|
|||
user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id))
|
||||
@schools = School.where(:id => user_exs.map(&:school_id))
|
||||
end
|
||||
@c_shixuns = @c_shixuns.order("created_at desc")
|
||||
@c_shixuns = @c_shixuns.order("created_at #{@sx_order}")
|
||||
@c_shixuns_count = @c_shixuns.count
|
||||
limit = 20
|
||||
@c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1
|
||||
|
|
@ -1106,6 +1110,7 @@ end
|
|||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
# 课程实训发布审批
|
||||
def deal_subject_authorization
|
||||
apply_action = ApplyAction.find(params[:apply_id])
|
||||
|
|
@ -1131,6 +1136,7 @@ end
|
|||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 项目实训发布审批
|
||||
def deal_shixun_authorization
|
||||
apply_action = ApplyAction.find(params[:apply_id])
|
||||
|
|
|
|||
|
|
@ -668,7 +668,8 @@ class UsersController < ApplicationController
|
|||
@offset ||= @course_result_pages.offset
|
||||
@course_result = paginateHelper @course_result, @limit
|
||||
else
|
||||
@shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc")
|
||||
# @shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc")
|
||||
@shixuns_result = Shixun.where("name like ?", "%#{@search}%").reorder("created_at desc")
|
||||
@shixuns_result_count = @shixuns_result.count
|
||||
@shixun_pages = Paginator.new @shixuns_result_count, @limit, params['page'] || 1
|
||||
@offset ||= @shixun_pages.offset
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
<div class="panel-form">
|
||||
<div id="edit_skill_show" class="<%= @challenge_tags.blank? ? "undis" : "" %>">
|
||||
<div class="clearfix mb20">
|
||||
<p class="fr">
|
||||
<% if User.current.manager_of_shixun?(@shixun) %>
|
||||
<a href="javascript:void(0);" class="shixun-task-btn task-btn-green fr" id="edit_skill">编辑</a>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<% unless @challenge_tags.blank? %>
|
||||
<label class="panel-form-label fl"> 技能标签:</label>
|
||||
<div class="fl task-bd-grey panel-box-sizing panel-form-width-690">
|
||||
<% @challenge_tags.each do |tag| %>
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<%= tag.name %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="<%= @challenge_tags.blank? ? "" : "undis" %>" id="skill_edit">
|
||||
<!--<div id="edit_skill_show" class="<%#= @challenge_tags.blank? ? "undis" : "" %>">-->
|
||||
<!--<div class="clearfix mb20">-->
|
||||
<!--<p class="fr">-->
|
||||
<!--<%# if User.current.manager_of_shixun?(@shixun) %>-->
|
||||
<!--<a href="javascript:void(0);" class="shixun-task-btn task-btn-green fr" id="edit_skill">编辑</a>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</p>-->
|
||||
<!--</div>-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix">-->
|
||||
<!--<%# unless @challenge_tags.blank? %>-->
|
||||
<!--<label class="panel-form-label fl"> 技能标签:</label>-->
|
||||
<!--<div class="fl task-bd-grey panel-box-sizing panel-form-width-690">-->
|
||||
<!--<%# @challenge_tags.each do |tag| %>-->
|
||||
<!--<div class="task-tag tag-grey mb10 mr10 fl">-->
|
||||
<!--<%#= tag.name %>-->
|
||||
<!--</div>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</div>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
<ul class="<%#= @challenge_tags.blank? ? "" : "undis" %>" id="skill_edit">
|
||||
<%= form_for @challenge, :url => update_evaluation_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 5),
|
||||
:html => {:id => "challenge_skill_update", :onkeydown => "if(event.keyCode==13)return false;"} do |f| %>
|
||||
<%= render :partial => "skill_form", :locals => {:f => f} %>
|
||||
|
|
@ -30,8 +30,8 @@
|
|||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
$("#edit_skill").click(function(){
|
||||
$("#edit_skill_show").hide();
|
||||
$("#skill_edit").show();
|
||||
});
|
||||
// $("#edit_skill").click(function(){
|
||||
// $("#edit_skill_show").hide();
|
||||
// $("#skill_edit").show();
|
||||
// });
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<!--<li class="clearfix">-->
|
||||
<!--<a href="javascript:void(0);" class="task-btn task-btn-green fr" onclick="challenge_skill_update();">保存</a>-->
|
||||
<!--<a href="<%= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 5) %>" class="task-btn fr mr10" id="skill_cancel">取消</a>-->
|
||||
<!--<a href="<%#= edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => 5) %>" class="task-btn fr mr10" id="skill_cancel">取消</a>-->
|
||||
<!--</li>-->
|
||||
</div>
|
||||
|
||||
|
|
@ -57,6 +57,7 @@
|
|||
// 获取父节点的id
|
||||
var obj = $(thisObj).parent();
|
||||
$(obj).remove();
|
||||
$("#challenge_skill_update").submit();
|
||||
}
|
||||
$(document).click(function(e){
|
||||
if(e.target.id==$("#edit_skill").attr("id")||e.target.id==$("#add_knowledge").attr("id")||e.target.className==$(".knowledge_frame").attr("class")||e.target.className==$(".close").attr("class")||e.target.id==$("#shixun_skill_input").attr("id")){
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@
|
|||
var keyword = $("input[name='search_keyword']").val(); // 搜索关键字
|
||||
var index = $("#all_status_show_value").text(); // 搜索课程/项目
|
||||
index = index == "课堂" ? 1 : 2;
|
||||
console.log("课堂" === index);
|
||||
console.log("实训" === index);
|
||||
// console.log("课堂" === index);
|
||||
// console.log("实训" === index);
|
||||
window.location.href = "<%= search_shixuns_or_courses_users_path %>" + "?search=" + keyword + "&index=" + index;
|
||||
/* $.ajax({
|
||||
url: "<%#= search_shixuns_or_courses_users_path %>",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<th width="40%" class="edu-txt-left">实训套件名称</th>
|
||||
<th width="20%" class="edu-txt-left">单位</th>
|
||||
<th width="15%">创建者</th>
|
||||
<th class="eud-pointer">发布时间<i class="fa fa-long-arrow-down color-light-green ml5"></i></th>
|
||||
<th class="eud-pointer">发布时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -29,3 +29,15 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(".eud-pointer").on("click", function(ev){
|
||||
var nArrow = $(this).find("i");
|
||||
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
|
||||
$("input[name='sx_order']").val(sx_order);
|
||||
$.ajax({
|
||||
url:"<%= class_publish_shixuns_managements_path %>",
|
||||
data: $("#class_publish_shixuns_search").serialize(),
|
||||
dateType: "script"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -51,17 +51,6 @@
|
|||
|
||||
<script>
|
||||
// alert(window.location.href);
|
||||
$(".eud-pointer").on("click", function(ev){
|
||||
var nArrow = $(this).find("i");
|
||||
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
|
||||
$("input[name='sx_order']").val(sx_order);
|
||||
$.ajax({
|
||||
url:"<%= class_shixuns_managements_path %>",
|
||||
data: $("#class_shixuns_search").serialize(),
|
||||
dateType: "script"
|
||||
});
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$(".subject_hidden").on("click", 'input', function(ev){
|
||||
var id = $(ev.target).parent().find("div").html();
|
||||
|
|
@ -71,5 +60,16 @@
|
|||
data:{subject_id: id}
|
||||
});
|
||||
});
|
||||
});
|
||||
$(".eud-pointer").on("click", function(ev){
|
||||
var nArrow = $(this).find("i");
|
||||
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
|
||||
$("input[name='sx_order']").val(sx_order);
|
||||
$.ajax({
|
||||
url:"<%= class_shixuns_managements_path %>",
|
||||
data: $("#class_shixuns_search").serialize(),
|
||||
dateType: "script"
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="10%">ID</th>
|
||||
<th class="table_Name_text" width="30%">实训名称</th>
|
||||
<th width="30%" class="edu-txt-left">实训名称</th>
|
||||
<th width="8%">顶</th>
|
||||
<th width="8%">踩</th>
|
||||
<th width="8%">未通关</th>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td><%= shixun.identifier %></td>
|
||||
<td><span class="table_Name_text"><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td class="edu-txt-left"><span><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td>
|
||||
<%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<% unless @apply_status.blank? %>
|
||||
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -24,6 +25,9 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% end %>
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="9%">ID</th>
|
||||
<th class="table_Name_text" >实训名称</th>
|
||||
<th width="18%" class="edu-txt-left">实训名称</th>
|
||||
<th width="8%">顶</th>
|
||||
<th width="8%">踩</th>
|
||||
<th width="8%">已通关</th>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td><%= shixun.identifier %></td>
|
||||
<td><span class="table_Name_text"><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td class="edu-txt-left"><span><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td>
|
||||
<%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="10%">ID</th>
|
||||
<th class="table_Name_text" width="25%">实训名称</th>
|
||||
<th width="25%" class="edu-txt-left">实训名称</th>
|
||||
<th width="15%">技术平台</th>
|
||||
<th width="5%">任务</th>
|
||||
<th width="10%">状态</th>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<% @shixuns.each do |shixun| %>
|
||||
<tr>
|
||||
<td><%= shixun.identifier %></td>
|
||||
<td><span class="table_Name_text"><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td class="edu-txt-left"><span><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td><%= shixun.language %></td>
|
||||
<td><%= shixun.challenges.count %></td>
|
||||
<td><%= shixun_authentication_status shixun %></td>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<td class="operate">
|
||||
<!-- <a class="fl" href="<%#= shixun_path(shixun) %>" data-method="delete" >删除</a>-->
|
||||
<% if shixun.status == 0 %>
|
||||
<%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "确认删除" } ) %>
|
||||
<%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "您确定要删除吗?" } ) %>
|
||||
<% end %>
|
||||
<span class="fr ml5 shixun_hidden">
|
||||
<input type="checkbox" <%= shixun.hidden ? 'checked' : "" %> value="0" id="shixun_hidden_<%= shixun.id %>" name="hidden" class="ml-3 mr5 magic-checkbox">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<% unless @authorizations.blank? %>
|
||||
<% @authorizations.each do |authorization| %>
|
||||
<div class="admin-con-box clearfix">
|
||||
<% user = authorization.user %>
|
||||
|
|
@ -34,6 +35,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
function subject_agree_authorization(id){
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<% unless @apply_status.blank? %>
|
||||
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -81,6 +82,10 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% end %>
|
||||
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<input class="fl task-form-20 task-height-30" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="cla_sx_Look_name">
|
||||
<a href="javascript:void(0);" class="fl task-btn task-btn-blue ml5" onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
<a href="javascript:clearSearchCondition();" class="fl task-btn ml5 mt2 ">清除</a>
|
||||
<input name="sx_order" type="hidden">
|
||||
</div>
|
||||
<div class="edu-con-bg01 mt15" id="class_shixun_list">
|
||||
<%= render :partial => "managements/class_publish_shixuns_list" %>
|
||||
|
|
|
|||
|
|
@ -37,29 +37,25 @@
|
|||
<div class="">
|
||||
<div class="edu-tab clearfix mb20 user_bg_shadow">
|
||||
<ul id="edu-tab-nav" class="border-bottom-orange">
|
||||
<li id="edu-tab-nav-1" class="new-tab-nav background-orange" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" class="tab_type">作业详情</a>
|
||||
</li>
|
||||
<li id="edu-tab-nav-2" class="new-tab-nav" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" class="tab_type">作品列表</a>
|
||||
</li>
|
||||
<li id="edu-tab-nav-1" class="new-tab-nav background-orange" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" class="tab_type">作业问答</a>
|
||||
</li>
|
||||
<% if @homework.homework_type!= 4 && (@is_teacher || (@homework.answer_public && @homework.homework_detail_manual.comment_status > 2)) %>
|
||||
<li id="edu-tab-nav-3" class="new-tab-nav" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0);" class="tab_type">参考答案</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div id="edu-tab-con-1">
|
||||
<div class="" style="padding:<%= @is_teacher ? '5px' : '15px' %> 15px;">
|
||||
<% if @is_teacher%>
|
||||
<% if @is_teacher %>
|
||||
<div class="fr edu-position edu-position-hidebox">
|
||||
<a href="javascript:void(0);" class="font-16"><i class="fa fa-bars"></i></a>
|
||||
<a href="javascript:void(0);" class="font-16"><i class="fa fa-bars mr15 mt20"></i></a>
|
||||
<ul class="edu-position-hide undis" style="left:-85px;">
|
||||
<% if @homework.homework_type != 4 %>
|
||||
<li>
|
||||
<%= link_to l(:button_edit), edit_homework_common_path(@homework) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:button_edit), edit_homework_common_path(@homework) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= link_to "设置", setting_homework_common_path(@homework) %>
|
||||
|
|
@ -97,10 +93,14 @@
|
|||
<% else %>
|
||||
<%= user_work_status @homework %>
|
||||
<% if @homework.homework_type == 4 && !@homework.student_works.where(:user_id => User.current.id, :work_status => 0).blank? %>
|
||||
<%= link_to "开始实战", shixun_path(@homework.homework_commons_shixuns.shixun),:class => 'task-btn task-btn-blue fr mr10',:target => "_blank" %>
|
||||
<%= link_to "开始实战", shixun_path(@homework.homework_commons_shixuns.shixun),:class => 'task-btn task-btn-blue fr mr10',:target => "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to "查看设置", setting_homework_common_path(@homework), :class => 'edu-btn fr mr10' %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div id="edu-tab-con-1" class="undis">
|
||||
<div class="" style="padding:<%= @is_teacher ? '5px' : '15px' %> 15px;">
|
||||
<div class="cl"></div>
|
||||
<div class="upload_img list_style">
|
||||
<%= @homework.description.html_safe %>
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
<%= render :partial => 'student_work_replies' %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="edu-tab-con-2" class="undis">
|
||||
<div id="edu-tab-con-2">
|
||||
<div class="padding15">
|
||||
<div class="clearfix mb10">
|
||||
<% if @is_teacher %>
|
||||
|
|
|
|||
|
|
@ -21,21 +21,24 @@
|
|||
<div class="color-grey school-name"><%= user.school_name.empty? ? "--" : user.school_name %></div>
|
||||
<div class="clearfix" style="line-height: 35px">
|
||||
<span class="font-12 color-grey">粉丝 <%= get_fans_users(user)[0] %></span>
|
||||
<!-- <a href="javascript:void(0);" class="btn-focus fr color-grey">已关注</a>-->
|
||||
<% if user.watched_by?(@user) %>
|
||||
<%= link_to "已关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "delete",
|
||||
:remote => "true",
|
||||
:title => "取消关注" %>
|
||||
<% else %>
|
||||
<%= link_to "关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "post",
|
||||
:remote => "true",
|
||||
:title => "关注" %>
|
||||
<% if @user == current_user %>
|
||||
<% if user.watched_by?(@user)%>
|
||||
<%= link_to "已关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "delete",
|
||||
:remote => "true",
|
||||
:title => "取消关注" %>
|
||||
|
||||
<% else %>
|
||||
<%= link_to "关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => user.id, :user_watcher => action),
|
||||
:class => "btn-focus fr color-grey",
|
||||
:method => "post",
|
||||
:remote => "true",
|
||||
:title => "关注" %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,41 +9,48 @@
|
|||
<div class="content clearfix" id="intelligence_course_list">
|
||||
<% if !@course_result.blank? %>
|
||||
<div class="mh650">
|
||||
<% @course_result.each do | sy | %>
|
||||
<% sy_author = User.find(sy.tea_id) %>
|
||||
<div class="sub-con fl" style="cursor: default;">
|
||||
<div class="task-index-list-box-top">
|
||||
<a href="<%= course_path(sy) %>" title="<%= sy.name %>" target="_blank">
|
||||
<p class="font-14 task-index-list-title two_lines_show">
|
||||
<%= sy.name %>
|
||||
<% @course_result.each do |sy| %>
|
||||
<% sy_author = User.find(sy.tea_id) %>
|
||||
<div class="sub-con fl" style="cursor: default; position:relative">
|
||||
<% unless (sy.is_public == 1 || User.current.admin? || User.current.member_of_course?(sy)) %>
|
||||
<div class="black-half">
|
||||
<div class="black-half-lock"><i class="fa fa-lock" style="font-size: 50px"></i></div>
|
||||
<div class="black-half-info font-16">私有课堂,非成员不能访问</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="task-index-list-box-top">
|
||||
<a href="<%= course_path(sy) %>" title="<%= sy.name %>" target="_blank">
|
||||
<p class="font-14 task-index-list-title two_lines_show">
|
||||
<%= sy.name %>
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<div class="clearfix task-index-list-user">
|
||||
<%= link_to image_tag(url_to_avatar(sy_author), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "用户"), user_path(sy_author), :target => '_blank' %>
|
||||
<%= link_to sy_author.show_name, user_path(sy_author), :class => 'task-index-name task-hide fl', :target => '_blank' %>
|
||||
</div>
|
||||
<p class="color-grey">
|
||||
<% if !sy_author.user_extensions.school_id.blank? && sy_author.user_extensions.school %>
|
||||
<%= sy_author.user_extensions.school.name %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="bot" style="text-align: center;">
|
||||
<p class="color-grey pl15 pr15 clearfix">
|
||||
<% syMembers = sy.members.count %>
|
||||
<% syResource = visable_attachemnts_incourse(sy) %>
|
||||
<% syHome = visable_course_homework(sy) %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-users color-light-green pr10" aria-hidden="true" title="成员"></i><em><%= syMembers %></em></span>
|
||||
<% if syResource.count > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-cubes color-light-green pr10" aria-hidden="true" title="资源"></i><em><%= syResource.count %></em></span>
|
||||
<% end %>
|
||||
<% if syHome > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-map color-light-green pr10" aria-hidden="true" title="题库"></i><em><%= syHome %></em></span>
|
||||
<% end %>
|
||||
</p>
|
||||
</a>
|
||||
<div class="clearfix task-index-list-user">
|
||||
<%= link_to image_tag(url_to_avatar(sy_author), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "用户"), user_path(sy_author), :target => '_blank' %>
|
||||
<%= link_to sy_author.show_name, user_path(sy_author), :class => 'task-index-name task-hide fl', :target => '_blank' %>
|
||||
</div>
|
||||
<p class="color-grey">
|
||||
<% if !sy_author.user_extensions.school_id.blank? && sy_author.user_extensions.school %>
|
||||
<%= sy_author.user_extensions.school.name %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="bot" style="text-align: center;">
|
||||
<p class="color-grey pl15 pr15 clearfix">
|
||||
<% syMembers = sy.members.count %>
|
||||
<% syResource = visable_attachemnts_incourse(sy) %>
|
||||
<% syHome = visable_course_homework(sy) %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-users color-light-green pr10" aria-hidden="true" title="成员"></i><em><%= syMembers %></em></span>
|
||||
<% if syResource.count > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-cubes color-light-green pr10" aria-hidden="true" title="资源"></i><em><%= syResource.count %></em></span>
|
||||
<% end %>
|
||||
<% if syHome > 0 %>
|
||||
<span class="" style="margin: 0 10px"><i class="fa fa-map color-light-green pr10" aria-hidden="true" title="题库"></i><em><%= syHome %></em></span>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
|
|
@ -55,37 +62,54 @@
|
|||
</div>
|
||||
</div>
|
||||
<% elsif !@shixuns_result.blank? %>
|
||||
<div class="mh650">
|
||||
<% @shixuns_result.each do |shixun| %>
|
||||
<div class="task-index-list-box fl">
|
||||
<div class="task-index-list-box fl" style="position: relative">
|
||||
<% if shixun.status == 2 %>
|
||||
<p class="triangle-topright font-12"></p>
|
||||
<span class="triangle-font">已发布</span>
|
||||
<% end %>
|
||||
<% if shixun.status < 2 && !User.current.manager_of_shixun?(shixun) %>
|
||||
<div class="black-half">
|
||||
<div class="black-half-lock"><i class="fa fa-lock" style="font-size: 50px"></i></div>
|
||||
<div class="black-half-info font-16">非试用内容,需要授权</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="task-index-list-box-top xy_box" onclick="shixun_link('<%= shixun.identifier %>')" style="cursor: pointer;">
|
||||
<p class="task-index-list-title two_lines_show">
|
||||
<a href="javascript:void(0);"><%= shixun.name %></a>
|
||||
</p>
|
||||
|
||||
<div class="clearfix task-index-list-user task_yx_bo">
|
||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(shixun.owner), :width =>"60", :height => "60", :class => "panel-warp-img mr10 fl", :alt=>"头像") %></a>
|
||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(shixun.owner), :width => "60", :height => "60", :class => "panel-warp-img mr10 fl", :alt => "头像") %></a>
|
||||
<span class="task-index-name task-hide fl"><%= shixun.owner.try(:show_name) %></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="mt10 mb10"><%= shixun.language %></span>
|
||||
|
||||
<p class="xy_level"><%= shixun.shixun_trainee %></p>
|
||||
</div>
|
||||
<ul class="task-index-list-box-bottom clearfix">
|
||||
<li><i class="fa fa-gamepad mr5 color-light-green" title="实训任务"></i><span><%= shixun.challenges.count %></span></li>
|
||||
<li><i class="fa fa-users mr5 color-light-green" title="已开启实训"></i><span><%= shixun.myshixuns.count %></span></li>
|
||||
<li><i class="fa fa-viacoin mr5 color-light-green" title="实训经验值"></i><span><%= shixun.shixun_score %></span></li>
|
||||
<li>
|
||||
<i class="fa fa-gamepad mr5 color-light-green" title="实训任务"></i><span><%= shixun.challenges.count %></span>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-users mr5 color-light-green" title="已开启实训"></i><span><%= shixun.myshixuns.count %></span>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-viacoin mr5 color-light-green" title="实训经验值"></i><span><%= shixun.shixun_score %></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @shixun_pages, @shixuns_result_count, :per_page_links => false, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="edu-tab-con-box">
|
||||
|
|
@ -93,11 +117,37 @@
|
|||
<p class="edu-nodata-p mb30">没有数据可以显示!</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function shixun_link(shixun){
|
||||
console.log(shixun);
|
||||
window.open('/shixuns/' + shixun);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function shixun_link(shixun){
|
||||
console.log(shixun);
|
||||
window.open('/shixuns/' + shixun);
|
||||
};
|
||||
|
||||
var timer="";
|
||||
$(".task-index-list-box").hover(function(ev){
|
||||
this.fn = function(){
|
||||
$(this).find(".black-half").show();
|
||||
}
|
||||
clearTimeout(timer);
|
||||
var item=$(this);
|
||||
timer=setTimeout(this.fn(),500);
|
||||
},function(){
|
||||
clearTimeout(timer);
|
||||
$(this).find(".black-half").hide();
|
||||
});
|
||||
|
||||
var timer="";
|
||||
$(".sub-con").hover(function(ev){
|
||||
this.fn = function(){
|
||||
$(this).find(".black-half").show();
|
||||
};
|
||||
clearTimeout(timer);
|
||||
var item=$(this);
|
||||
timer=setTimeout(this.fn(),500);
|
||||
},function(){
|
||||
clearTimeout(timer);
|
||||
$(this).find(".black-half").hide();
|
||||
})
|
||||
</script>
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<!--<%#= link_to '编辑我的资料', my_account_path %>-->
|
||||
<!--</p>-->
|
||||
|
||||
<p class="p2 font-12">
|
||||
<p class="p2 font-12 mt12">
|
||||
<i class="fa fa-eye font-12" aria-hidden="true"></i>
|
||||
<% update_visiti_count @user %>
|
||||
<span><%= @user.visits.to_i %></span> 次访问
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<div class="-task-con">
|
||||
<div class="-task-con-int">
|
||||
<div class="favour">
|
||||
<% str = current_user ? '我' : 'TA' %>
|
||||
<% str = (current_user == @user) ? '我' : 'TA' %>
|
||||
<ul id="edu-user-tab-nav">
|
||||
<li class=" new-tab-nav">
|
||||
<a href="<%= user_watchlist_user_path(@user) %>" class="font-16 tab_type" id="user_watcher_cout" ><%= str %>的关注 <%= @user_watchlist_count %></a>
|
||||
<a href="<%= user_watchlist_user_path(@user) %>" class="font-16 tab_type" id="user_watcher_cout" ><%= str %>的关注 <%= @user_watchlist_count %></a>
|
||||
</li>
|
||||
<li class="edu-user-tab-hover new-tab-nav">
|
||||
<a href="<%= user_fanslist_user_path(@user) %>" class="font-16 tab_type" id="user_fans_count"><%= str %>的粉丝 <%= @user_fanlist_count %></a>
|
||||
|
|
@ -29,4 +29,5 @@
|
|||
$(this).html() == "关注" ? $(this).html("关注") : $(this).html("已关注");
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -437,3 +437,5 @@ input::-ms-clear{display:none;}
|
|||
.transform90{transform: rotate(90deg);}
|
||||
/*---------------------编辑器边框------------------------*/
|
||||
.kindeditor{background: #F0F0EE;height:22px;border:1px solid #CCCCCC;border-bottom: none}
|
||||
/**/
|
||||
#edu-tab-nav .edu-position-hidebox li a{font-size: 12px}
|
||||
Loading…
Reference in New Issue