修改项目资源时间显示跳转错误页面问题

This commit is contained in:
huang 2015-09-01 16:12:37 +08:00
parent 8b9ee2260a
commit 7361f40b0c
1 changed files with 10 additions and 9 deletions

View File

@ -756,15 +756,16 @@ module ApplicationHelper
return ss
end
def time_tag(time, *args)
options = args.extract_options!
text = distance_of_time_in_words(Time.now, time)
if @project
link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time)))
else
content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
end
end
# def time_tag(time, *args)
# options = args.extract_options!
# text = distance_of_time_in_words(Time.now, time)
# if @project
# content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
# # link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time)))
# else
# content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
# end
# end
def syntax_highlight_lines(name, content)
lines = []