示例#1
0
文件: web_ui.py 项目: rwbaumg/trac
 def get_timeline_link(self, req, date, label=None, precision='hours',
                       query=None, fragment=None, title=None):
     iso_date = format_datetime(date, 'iso8601', req.tz)
     href = req.href.timeline(from_=iso_date, precision=precision)
     return tag.a(label or iso_date, class_='timeline',
                  title=title or _("See timeline at %(absolutetime)s",
                                   absolutetime=iso_date),
                  href=concat_path_query_fragment(href, query, fragment))
示例#2
0
 def get_timeline_link(self, req, date, label=None, precision='hours',
                       query=None, fragment=None, title=None):
     iso_date = format_datetime(date, 'iso8601', req.tz)
     href = req.href.timeline(from_=iso_date, precision=precision)
     return tag.a(label or iso_date, class_='timeline',
                  title=title or _("See timeline at %(absolutetime)s",
                                   absolutetime=iso_date),
                  href=concat_path_query_fragment(href, query, fragment))