From 812481d5fa3f388905eff2792236d5463a67d8ed Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 25 Jul 2016 14:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E7=8F=AD=E7=BA=A7=E6=88=90=E5=91=98?= =?UTF-8?q?=E9=82=80=E8=AF=B7=E7=A0=81=E6=98=BE=E7=A4=BA=E4=B8=BA*****?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_course_base_info.html.erb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb index 04162fc9c..d364f84e1 100644 --- a/app/views/layouts/_course_base_info.html.erb +++ b/app/views/layouts/_course_base_info.html.erb @@ -28,7 +28,15 @@ <%= image_tag(url_to_avatar(@course), :width => "110", :height => "110", :alt => "班级logo") %>
-

邀请码
<%=@course.generate_invite_code %>

+

邀请码
+ + <% if User.current.admin? || User.current.member_of_course?(@course) %> + <%=@course.generate_invite_code %> + <% else %> + ***** + <% end %> + +