非班级成员邀请码显示为*****

This commit is contained in:
cxt 2016-07-25 14:49:08 +08:00
parent 0564ddb6ea
commit 812481d5fa
1 changed files with 9 additions and 1 deletions

View File

@ -28,7 +28,15 @@
<%= image_tag(url_to_avatar(@course), :width => "110", :height => "110", :alt => "班级logo") %>
</div>
<div class="sy_class_id fl">
<p>邀请码<br /><span class="sy_corange"><%=@course.generate_invite_code %></span></p>
<p>邀请码<br />
<span class="sy_corange">
<% if User.current.admin? || User.current.member_of_course?(@course) %>
<%=@course.generate_invite_code %>
<% else %>
*****
<% end %>
</span>
</p>
</div>
<div class="sy_class_info fl ml15">
<div class="sy_class_titbox">