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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-05-18 12:10:37 UTC
  • Revision ID: grantw@unimelb.edu.au-20090518121037-th9qfcf8rapxnnra
Replace DiffView's titles too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from ivle.webapp.base.xhtml import XHTMLView
31
31
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
32
32
from ivle.webapp.errors import NotFound, BadRequest
 
33
from ivle.webapp.filesystem import make_path_segments
33
34
 
34
35
class DiffView(XHTMLView):
35
36
    '''A view to present a nice XHTML Subversion diff from a user's jail.'''
76
77
        )
77
78
 
78
79
        ctx['title'] = self.path.rsplit('/', 1)[-1]
 
80
        ctx['paths'] = make_path_segments(self.path)
79
81
 
80
82
        # Create a dict with (name, HTMLdiff) pairs for each non-empty diff.
81
83
        ctx['files'] = dict([(fd[0], genshi.XML(htmlfy_diff(fd[1])))