<% @tags = obj.reload.tag_list %>

<% if @tags.size > 0 %>
    <% @tags.each do |tag| %>
	<span class="re_tag f_l" style="cursor:pointer"> <%#= link_to tag, :controller => "tags", :action => "index", :q => tag,  :object_flag => object_flag, :obj_id => obj.id %>
      <a title="双击可编辑" ondblclick="rename_tag($(this),'<%= tag %>',<%= obj.id%>,<%= object_flag%>);"><%= tag %></a>
      <!-- 对用户主页 是本人 ，对项目，需求，问题是管理员 -->
      <% case object_flag %>
	    <% when '10' %>
          <% if obj.author_id == User.current.id || User.current.admin?%>
		        <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag,
                                               :taggable_id => obj.id, :taggable_type => object_flag %> </span>
			<% end %>
          <% when '6' %>
          <% if obj.author_id == User.current.id || User.current.admin? || (obj.container_type == 'Course' && User.current.allowed_to?(:as_teacher,obj.course)) %>
              <% select_tag_name ||= ""%>
		        <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag,
                                               :taggable_id => obj.id, :taggable_type => object_flag, :select_tag_name => select_tag_name %> </span>
			<% end %>
	    <% end %>
    </span>
    <% end %>
<% else %>
    <!-- <span style="color:#8c8a8a" class="f_l">
	&nbsp;&nbsp;&nbsp;<#%= l(:label_tags_no) %> -->
    </span>
<% end %>