实训路径权限问题

dev_shixuns
daiao 6 years ago
parent 5a41e4a15f
commit 5e029c5e67

@ -1,19 +1,19 @@
<% result = User.current.is_certification_teacher || User.current.admin? %>
<% result = User.current.is_certification_teacher || User.current.member_of_subject?(subject) %>
<% subjects.each do |subject| %>
<div class="square-Item">
<% if subject.repertoire.present? %>
<div class="tag-green"><span class="tag-name"><%= subject.repertoire.name %></span><img src="/images/educoder/tag2.png"></div>
<% end %>
<% unless result %>
<% if subject.status < 2 && !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 ? subject_path(subject) : "javascript:void(0);" %>" class="square-img" target="_blank"><%= image_tag(url_to_avatar(subject)) %></a>
<a href="<%= result || subject.status >= 2 ? subject_path(subject) : "javascript:void(0);" %>" class="square-img" target="_blank"><%= image_tag(url_to_avatar(subject)) %></a>
<div class="square-main">
<p class="task-hide">
<%= link_to subject.name, "#{result ? subject_path(subject) : "javascript:void(0);"}", :class => "justify color-grey-name", :target => "_blank" %>
<%= link_to subject.name, "#{ result || subject.status >= 2 ? subject_path(subject) : "javascript:void(0);"}", :class => "justify color-grey-name", :target => "_blank" %>
</p>
<p class="clearfix mt8 font-12 color-grey-B4">
<% if subject.stages_count > 0 %>

Loading…
Cancel
Save