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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-12-08 03:50:24 UTC
  • mfrom: (1294.2.143 ui-the-third)
  • Revision ID: grantw@unimelb.edu.au-20091208035024-wjx8zp54gth15ph8
Merge ui-the-third. This is another UI revamp.

The header is now thin! Thin! The yellow bar is gone. The tabs are gone.
Breadcrumbs are here. Routes is replaced (with an object publishing
mechanism). Views are less repetitive. etc.

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