~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/__init__.py

convert the side-by-side diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
 
10
10
def file_change_summary(url, entry, links=True):
11
 
    pt = _pt('revisionfilechanges')
12
 
    return pt.render(dict(url=url, entry=entry, links=links))
 
11
    return _pt('revisionfilechanges').render(
 
12
        dict(url=url, entry=entry, links=links))
13
13
 
14
14
def revisioninfo(url, branch, entry, includefilechanges=False):
15
15
    from loggerhead import util
16
 
    pt = _pt('revisioninfo')
17
 
    return pt.render(
 
16
    return _pt('revisioninfo').render(
18
17
        dict(url=url, change=entry, branch=branch, util=util,
19
18
             includefilechanges=includefilechanges,
20
19
             file_change_summary=file_change_summary))
21
20
 
 
21
 
 
22
def collapse_button(group, name, normal='block'):
 
23
    import turbogears
 
24
    return _pt('collapse-button').render(
 
25
        dict(group=group, name=name, normal=normal, tg=turbogears))
 
26
 
 
27
templatefunctions = {'file_change_summary':file_change_summary,
 
28
                     'revisioninfo':revisioninfo,
 
29
                     'collapse_button':collapse_button}