|
|
|
@ -28,11 +28,6 @@
|
|
|
|
|
<i class="iconfont icon-shixunguanqia fl mr3" data-tip-down="关卡"></i><%= shixun.challenges_count %>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if shixun.shixun_score > 0 %>
|
|
|
|
|
<span class="mr10 fl squareIconSpan">
|
|
|
|
|
<i class="iconfont icon-jingyan fl mr3" data-tip-down="经验值"></i><%= shixun.shixun_score %>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if shixun.myshixuns_count > 0 %>
|
|
|
|
|
<span class="mr10 fl squareIconSpan">
|
|
|
|
|
<i class="iconfont icon-chengyuan fl mr3" data-tip-down="学习人数"></i><%= shixun.myshixuns_count %>
|
|
|
|
@ -66,75 +61,3 @@
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if false %>
|
|
|
|
|
<% result = User.current.is_certification_teacher || User.current.admin? %>
|
|
|
|
|
<% shixuns.each do |shixun| %>
|
|
|
|
|
<div class="square-Item">
|
|
|
|
|
<% if shixun.tag_repertoires.first.present? %>
|
|
|
|
|
<div class="tag-green"><span class="tag-name"><%= shixun.tag_repertoires.first.try(:name) %></span><img src="/images/educoder/tag2.png"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% unless result %>
|
|
|
|
|
<div class="closeSquare">
|
|
|
|
|
<img src="/images/educoder/icon/lockclose.svg" class="mt80 mb25">
|
|
|
|
|
<p class="font-14 color-white">暂未公开</p>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<a href="<%= result ? shixun_path(shixun) : "javascript:void(0);" %>" class="square-img" target="_blank">
|
|
|
|
|
<%= image_tag(url_to_avatar(shixun)) %>
|
|
|
|
|
</a>
|
|
|
|
|
<div class="square-main">
|
|
|
|
|
<p class="task-hide">
|
|
|
|
|
<a href="<%= result ? shixun_path(shixun) : "javascript:void(0);" %>" class="justify color-grey-name" title="<%= shixun.name %>" target="_blank"><%= shixun.name %></a>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<!--五星评分-->
|
|
|
|
|
<p class="clearfix mt3 mb3"><span class="rateYoStar fl" data-star="<%= shixun.shixun_preference %>" style="padding: 0px;width: 100%;height:20px;line-height:19px;width: 90px;"></span><span class="fl ml10 font-12 color-grey-9 lineh-12 mt3"><%= shixun.shixun_preference %>分</span></p>
|
|
|
|
|
|
|
|
|
|
<p class="clearfix mt8 font-12 color-grey-B4">
|
|
|
|
|
<% if shixun.challenges_count > 0 %>
|
|
|
|
|
<span class="mr10 fl squareIconSpan">
|
|
|
|
|
<i class="iconfont icon-shixunguanqia fl mr3" data-tip-down="关卡"></i><%= shixun.challenges_count %>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if shixun.shixun_score > 0 %>
|
|
|
|
|
<span class="mr10 fl squareIconSpan">
|
|
|
|
|
<i class="iconfont icon-jingyan fl mr3" data-tip-down="经验值"></i><%= shixun.shixun_score %>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if shixun.myshixuns.count > 0 %>
|
|
|
|
|
<span class="mr10 fl squareIconSpan">
|
|
|
|
|
<i class="iconfont icon-chengyuan fl mr3" data-tip-down="学习人数"></i><%= shixun.myshixuns.count %>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<span class="fr color-grey-B3 squareIconSpan"><%= shixun.shixun_level %></span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$(function(){
|
|
|
|
|
$(".rateYoStar").raty({
|
|
|
|
|
hints: ['', '', '', '', ''],
|
|
|
|
|
readOnly: true,
|
|
|
|
|
path:"/images/educoder",
|
|
|
|
|
starOff: 'star-off.png',
|
|
|
|
|
starHalf:'star-half.png',
|
|
|
|
|
starOn: 'star-on.png',
|
|
|
|
|
size:'14',
|
|
|
|
|
score:function(){
|
|
|
|
|
var s=$(this).attr("data-star");
|
|
|
|
|
var yu=(s*10)%10;
|
|
|
|
|
if(yu>0){
|
|
|
|
|
return parseFloat(Math.floor((s*10)/10)+".5");
|
|
|
|
|
}else{
|
|
|
|
|
return $(this).attr("data-star");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<% end %>
|
|
|
|
|