only teacher can know his tag and modify it

This commit is contained in:
xianbo 2013-10-31 17:28:10 +08:00
parent 08f1453dbd
commit 743ef9856a
2 changed files with 11 additions and 8 deletions

View File

@ -149,15 +149,19 @@
</div>
<!--Modified by nie-->
<!--tags-->
<div class="user_underline"></div>
<% if User.current.logged? %>
<% if User.current.admin?||User.current.login==@user.login%>
<div class="user_underline"></div>
<!-- <div class="user_fans"> -->
<!-- added by william -for tag -->
<!-- <div class="user_tags"> -->
<div class="user_tags">
<div id="tags">
<%= render :partial => 'tags/tag', :locals => {:obj => @user,:object_flag => "1"}%>
<div class="user_tags">
<div id="tags">
<%= render :partial => 'tags/tag', :locals => {:obj => @user,:object_flag => "1"}%>
</div>
</div>
</div>
<% end %>
<% end %>
<!-- </div> -->
<!-- </div> -->

View File

@ -2,11 +2,10 @@
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 -->
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
<% if object_flag == '3' %>
<span><%= image_tag("/images/sidebar/tags.png") %></span>
<span><%= image_tag("/images/sidebTar/tags.png") %></span>
<span class="font_title_tag"><%= l(:label_tag) %>:</span>
<% if User.current.logged? %>
<span> <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %></span>
<span> <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %></span>
<% end %>
<div id="tags_show_issue">