<%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %>
-
- <% case object_flag %>
- <% when '1'%>
+
+ <% if @tags.size > 0 %>
+ <% @tags.each do |tag| %>
+
+ <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
+
+ <% case object_flag %>
+ <% when '1' %>
<% 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 %>
+ <%= 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)).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 %>
+ <%= 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)).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 %>
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
<% end %>
- <% when '4'%>
+ <% 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 %>
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
<% end %>
- <% when '6'%>
- <% if ( User.current.logged? &&
- User.current.admin?
- # && (@project && User.current.member_of?(@project))
- )
- %>
- <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
- :taggable_id => obj.id,:taggable_type => object_flag %>
+ <% when '6' %>
+ <% if (User.current.logged? &&
+ User.current.admin?
+ # && (@project && User.current.member_of?(@project))
+ )
+ %>
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
<% end %>
- <% when '7'%>
+ <% 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 %>
+ <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
+ :taggable_id => obj.id, :taggable_type => object_flag %>
<% end %>
<% end %>
-
-<% end %>
-<% else %>
-
+