3
from turbosimpletal.zptsupport import zpt
6
def templatefunc(func):
7
templatefunctions[func.__name__] = func
11
_base = os.path.dirname(__file__)
13
return zpt(os.path.join(_base, 'templates', name + '.pt'))
16
templatefunctions['macros'] = _pt('macros').macros
19
def file_change_summary(url, entry, modified_file_link):
20
return _pt('revisionfilechanges').expand(
21
url=url, entry=entry, modified_file_link=modified_file_link,
25
def revisioninfo(url, branch, entry, modified_file_link=None):
26
from loggerhead import util
27
return _pt('revisioninfo').expand(
28
url=url, change=entry, branch=branch, util=util,
29
modified_file_link=modified_file_link,
33
def collapse_button(group, name, normal='block'):
34
return _pt('collapse-button').expand(
35
group=group, name=name, normal=normal, tg=turbogears,
39
def collapse_all_button(group, normal='block'):
40
return _pt('collapse-all-button').expand(
41
group=group, normal=normal, tg=turbogears,
45
def revno_with_nick(entry):
47
extra = ' ' + entry.branch_nick
50
return '(%s%s)'%(entry.revno, extra)
53
def modified_file_link_rev(url, entry, item):
54
return _pt('modified-file-link-rev').expand(
55
url=url, entry=entry, item=item,
59
def modified_file_link_log(url, entry, item):
60
return _pt('modified-file-link-log').expand(
61
url=url, entry=entry, item=item,