~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/templatefunctions.py

  • Committer: Michael Hudson
  • Date: 2008-09-24 04:52:40 UTC
  • mto: (217.1.9 logging)
  • mto: This revision was merged to the branch mainline in revision 226.
  • Revision ID: michael.hudson@canonical.com-20080924045240-9vut19xgxid7txcr
whitespace, style, typos

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# This program is free software; you can redistribute it and/or modify
 
3
# it under the terms of the GNU General Public License as published by
 
4
# the Free Software Foundation; either version 2 of the License, or
 
5
# (at your option) any later version.
 
6
#
 
7
# This program is distributed in the hope that it will be useful,
 
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
# GNU General Public License for more details.
 
11
#
 
12
# You should have received a copy of the GNU General Public License
 
13
# along with this program; if not, write to the Free Software
 
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
#
1
16
import os
2
17
from loggerhead.zptsupport import zpt
3
18
 
13
28
 
14
29
 
15
30
templatefunctions['macros'] = _pt('macros').macros
 
31
templatefunctions['breadcrumbs'] = _pt('breadcrumbs').macros
16
32
 
17
33
@templatefunc
18
34
def file_change_summary(url, entry, modified_file_link):
59
75
    return _pt('modified-file-link-log').expand(
60
76
        url=url, entry=entry, item=item,
61
77
        **templatefunctions)
 
78
 
 
79
@templatefunc
 
80
def search_box(branch, navigation):
 
81
    return _pt('search-box').expand(branch=branch, navigation=navigation,
 
82
        **templatefunctions)
 
83
 
 
84
@templatefunc
 
85
def feed_link(branch, url):
 
86
    return _pt('feed-link').expand(branch=branch, url=url, **templatefunctions)
 
87
 
 
88
@templatefunc
 
89
def menu(branch, url, fileview_active=False):
 
90
    return _pt('menu').expand(branch=branch, url=url,
 
91
        fileview_active=fileview_active, **templatefunctions)