实训首页问题

dev_shixuns
daiao 6 years ago
parent 3f09af9dbb
commit b2db87cb02

@ -1,10 +1,10 @@
<% result = User.current.is_certification_teacher || User.current.admin? %> <%# result = User.current.is_certification_teacher || User.current.admin? %>
<% shixuns.each do |shixun| %> <% shixuns.each do |shixun| %>
<div class="square-Item"> <div class="square-Item">
<% if shixun.tag_repertoires.first.present? %> <% 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> <div class="tag-green"><span class="tag-name"><%= shixun.tag_repertoires.first.try(:name) %></span><img src="/images/educoder/tag2.png"></div>
<% end %> <% end %>
<% unless result %> <% if params[:controller] != "welcome" && shixun_view_allow(shixun, true) %>
<div class="closeSquare"> <div class="closeSquare">
<img src="/images/educoder/icon/lockclose.svg" class="mt80 mb25"> <img src="/images/educoder/icon/lockclose.svg" class="mt80 mb25">
<p class="font-14 color-white">暂未公开</p> <p class="font-14 color-white">暂未公开</p>
@ -15,7 +15,7 @@
</a> </a>
<div class="square-main"> <div class="square-main">
<p class="task-hide"> <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> <a href="<%= shixun_path(shixun) %>" class="justify color-grey-name" title="<%= shixun.name %>" target="_blank"><%= shixun.name %></a>
</p> </p>
<!--五星评分--> <!--五星评分-->

Loading…
Cancel
Save