~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: 2009-12-08 05:05:20 UTC
  • Revision ID: matt.giuca@gmail.com-20091208050520-a4nmmjxwtmhip063
ivle-createdatadirs: Fixed exit -- if path already exists, log and exit(0).

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
 
 
28
18
class ExerciseBreadcrumb(object):
29
19
    def __init__(self, req, context):
30
20
        self.req = req
32
22
 
33
23
    @property
34
24
    def url(self):
35
 
        return self.req.publisher.generate(self.context)
 
25
        return self.req.publisher.generate(self.context, None, '+edit')
36
26
 
37
27
    @property
38
28
    def text(self):
39
29
        return self.context.name
40
30
 
41
 
    @property
42
 
    def extra_breadcrumbs_before(self):
43
 
        return [ExercisesBreadcrumb()]
44
 
 
45
 
 
46
31
class WorksheetBreadcrumb(object):
47
32
    def __init__(self, req, context):
48
33
        self.req = req