This commit is contained in:
sw 2014-08-14 15:16:20 +08:00
commit 2a831136ae
1 changed files with 18 additions and 11 deletions

View File

@ -43,32 +43,32 @@
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 --> <!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %> <% case object_flag %>
<% when '1' %> <% when '1' %>
<% if User.current.eql?(obj) %> <% if User.current.eql?(obj) %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% when '2' %> <% when '2' %>
<% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %> <% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% when '3' %> <% when '3' %>
<% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %> <% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% when '4' %> <% when '4' %>
<% if obj.author_id == User.current.id %> <% if obj.author_id == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% when '6' %> <% when '6' %>
@ -82,10 +82,10 @@
<% end %> <% end %>
<% when '7' %> <% when '7' %>
<% if obj.author_id == User.current.id %> <% if obj.author_id == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% when '9' %> <% when '9' %>
@ -94,6 +94,13 @@
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% end %> <% end %>
<!--添加的删除标签0814添加 -->
<% if obj.author_id == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
</span> </span>
</div> </div>