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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/breadcrumbs.py

  • Committer: Matt Giuca
  • Date: 2010-02-25 06:52:48 UTC
  • mto: This revision was merged to the branch mainline in revision 1731.
  • Revision ID: matt.giuca@gmail.com-20100225065248-p1t8oys3olxtwdlg
project-form no longer assumes the type of context; pass an extra projectset value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
 
94
94
 
95
95
class ProjectsBreadcrumb(object):
96
 
    """Static 'Projects' breadcrumb to precede ProjectBreadcrumb."""
 
96
    """Static 'Projects' breadcrumb to precede ProjectBreadcrumb.
 
97
    context must be a ProjectSet.
 
98
    """
97
99
    def __init__(self, req, context):
98
100
        self.req = req
99
101
        self.context = context
100
102
 
101
103
    @property
102
104
    def url(self):
103
 
        return self.req.publisher.generate(self.context, None, '+projects')
 
105
        return self.req.publisher.generate(self.context.offering, None,
 
106
                                           '+projects')
104
107
 
105
108
    @property
106
109
    def text(self):
122
125
 
123
126
    @property
124
127
    def extra_breadcrumbs_before(self):
125
 
        return [ProjectsBreadcrumb(self.req, self.context.project_set.offering)]
 
128
        return [ProjectsBreadcrumb(self.req, self.context.project_set)]
126
129
 
127
130
 
128
131
class EnrolmentsBreadcrumb(object):