From 43cfcce44e3ff85efc450e242af91763e3732430 Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Thu, 14 Aug 2014 15:11:14 +0800 Subject: [PATCH] =?UTF-8?q?#826=20=EF=BC=9A=E8=B5=84=E6=BA=90=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4Bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_tag_name.html.erb | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index f5057aba3..f8a549b0f 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -43,32 +43,32 @@ <% case object_flag %> <% when '1' %> - - <% if User.current.eql?(obj) %> + + <% if User.current.eql?(obj) %> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - + <% when '2' %> - + <% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - + <% when '3' %> - + <% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - + <% when '4' %> <% if obj.author_id == User.current.id %> - + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> - + <% end %> <% when '6' %> @@ -82,10 +82,10 @@ <% end %> <% when '7' %> <% if obj.author_id == User.current.id %> - + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> - + <% end %> <% when '9' %> @@ -94,6 +94,13 @@ :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> <% end %> + + <% if obj.author_id == User.current.id %> + + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, + :taggable_id => obj.id, :taggable_type => object_flag %> + + <% end %>