diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1f6091f12..f70e27de6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1555,6 +1555,25 @@ module ApplicationHelper date = time.strftime("%Y年%m月%d日") end + #当TAG数量过多时,更多链接 + #1代表是user类型 2代表是project类型 3代表是issue类型 4代表需求 9代表课程 + def more_tags id,object_flag + a= 1 + case object_flag + when "1" + s = link_to l(:label_more_tags),:controller => "users", :action => "show", :id => id + when "2" + s = link_to l(:label_more_tags),:controller => "projects", :action => "show", :id => id + when "3" + s = link_to l(:label_more_tags),:controller => "issues", :action => "show", :id => id + when "4" + s = link_to l(:label_more_tags),:controller => "bids", :action => "show", :id => id + when "9" + s = link_to l(:label_more_tags),:controller => "courses", :action => "show", :id => id + end + s + end + private def wiki_helper diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index 01889f1f3..6996e8891 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -22,7 +22,7 @@ <% i += 1 %> <% end %> - <%= link_to l(:label_more_tags),:controller => "tags", :action => "show", :id => obj.id %> + <%= more_tags(obj.id,object_flag)%> <% else %>