~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/directory_ui.py

  • Committer: Michael Hudson
  • Date: 2008-09-30 03:05:31 UTC
  • mfrom: (226.1.3 fix-breadcrumbs)
  • Revision ID: michael.hudson@canonical.com-20080930030531-at8220tnkx9pvqcw
small fixes to the breadcrumbs in the --prefix case.
(thanks Matt Nordhoff for the prods)

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    def __init__(self, static_url_base, path, name):
48
48
        class _branch(object):
49
49
            context_url = 1
 
50
            @staticmethod
 
51
            def static_url(path):
 
52
                return self._static_url_base + path
50
53
        self._branch = _branch
51
54
        self._history = None
52
55
        self._path = path
61
64
        listing.sort(key=lambda x: x.lower())
62
65
        dirs = []
63
66
        parity = 0
64
 
        def static_url(path):
65
 
            return self._static_url_base + path
66
67
        for d in listing:
67
68
            p = os.path.join(self._path, d)
68
69
            try:
79
80
        return {
80
81
            'dirs': dirs,
81
82
            'name': self._name,
82
 
            'static_url': static_url,
83
83
            'directory_breadcrumbs': directory_breadcrumbs,
84
84
            }