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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2010-07-28 06:09:00 UTC
  • Revision ID: matt.giuca@gmail.com-20100728060900-6a0lcuexcv1juh5r
ivle/webapp/submit/submit.html: Rewrote error message when an offering could not be found to submit to. This can have one of several causes, and the old error assumed it was because you weren't in a subject dir. Now enumerates the possible reasons. (LP: #526853)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
17
 
 
18
class ExercisesBreadcrumb(object):
 
19
    @property
 
20
    def url(self):
 
21
        return '/+exercises'
 
22
 
 
23
    @property
 
24
    def text(self):
 
25
        return 'Exercises'
 
26
 
 
27
 
18
28
class ExerciseBreadcrumb(object):
19
29
    def __init__(self, req, context):
20
30
        self.req = req
22
32
 
23
33
    @property
24
34
    def url(self):
25
 
        return self.req.publisher.generate(self.context, None, '+edit')
 
35
        return self.req.publisher.generate(self.context)
26
36
 
27
37
    @property
28
38
    def text(self):
29
39
        return self.context.name
30
40
 
 
41
    @property
 
42
    def extra_breadcrumbs_before(self):
 
43
        return [ExercisesBreadcrumb()]
 
44
 
 
45
 
31
46
class WorksheetBreadcrumb(object):
32
47
    def __init__(self, req, context):
33
48
        self.req = req