~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/svnlog/__init__.py

  • Committer: William Grant
  • Date: 2009-12-08 10:05:52 UTC
  • Revision ID: grantw@unimelb.edu.au-20091208100552-51qd6m3pl3h2owkk
Improve the diff/log breadcrumbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
class SubversionLogView(XHTMLView):
34
34
    template = 'template.html'
35
35
    tab = 'files'
 
36
    breadcrumb_text = 'Files'
36
37
 
37
38
    subpath_allowed = True
38
39
 
77
78
        ctx['url'] = req.make_path(os.path.join('svnlog', self.path))
78
79
        ctx['diffurl'] = req.make_path(os.path.join('diff', self.path))
79
80
        ctx['title'] = os.path.normpath(self.path).rsplit('/', 1)[-1]
80
 
        self.extra_breadcrumbs = make_path_breadcrumbs(req, self.subpath,
81
 
                                                   suffix='(Subversion log)')
 
81
        self.extra_breadcrumbs = make_path_breadcrumbs(req, self.subpath)
 
82
        self.extra_breadcrumbs.append(SubversionLogBreadcrumb())
82
83
 
83
84
        sr = ivle.svn.revision_from_string(
84
85
                   req.get_fieldstorage().getfirst("r"))
98
99
    def path(self):
99
100
        return os.path.join(*self.subpath) if self.subpath else ''
100
101
 
 
102
 
 
103
class SubversionLogBreadcrumb(object):
 
104
    text = 'Subversion Log'
 
105
 
 
106
 
101
107
class Plugin(ViewPlugin, MediaPlugin):
102
108
    views = [(ApplicationRoot, 'svnlog', SubversionLogView)]
103
109