2
from loggerhead.zptsupport import zpt
5
def templatefunc(func):
6
templatefunctions[func.__name__] = func
10
_base = os.path.dirname(__file__)
12
return zpt(os.path.join(_base, 'templates', name + '.pt'))
15
templatefunctions['macros'] = _pt('macros').macros
18
def file_change_summary(url, entry, modified_file_link):
19
return _pt('revisionfilechanges').expand(
20
url=url, entry=entry, modified_file_link=modified_file_link,
24
def revisioninfo(url, branch, entry, modified_file_link=None):
25
from loggerhead import util
26
return _pt('revisioninfo').expand(
27
url=url, change=entry, branch=branch, util=util,
28
modified_file_link=modified_file_link,
32
def collapse_button(group, name, branch, normal='block'):
33
return _pt('collapse-button').expand(
34
group=group, name=name, normal=normal, branch=branch,
38
def collapse_all_button(group, branch, normal='block'):
39
return _pt('collapse-all-button').expand(
40
group=group, normal=normal, branch=branch,
44
def revno_with_nick(entry):
46
extra = ' ' + entry.branch_nick
49
return '(%s%s)'%(entry.revno, extra)
52
def modified_file_link_rev(url, entry, item):
53
return _pt('modified-file-link-rev').expand(
54
url=url, entry=entry, item=item,
58
def modified_file_link_log(url, entry, item):
59
return _pt('modified-file-link-log').expand(
60
url=url, entry=entry, item=item,