#1508 修复课程、项目列表中,点击标签的更多按钮,报错的BUG

This commit is contained in:
sw 2014-08-28 16:18:25 +08:00
parent 56a0ec336a
commit c614734768
2 changed files with 20 additions and 1 deletions

View File

@ -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

View File

@ -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 %>