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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2010-02-11 09:09:53 UTC
  • Revision ID: grantw@unimelb.edu.au-20100211090953-592dk5jruwdg1qrq
Declare appropriate tabs on the rest of the views.

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
    """An form to create a worksheet in an offering."""
370
370
    template = 'templates/worksheet_add.html'
371
371
    permission = 'edit'
 
372
    tab = 'subjects'
372
373
 
373
374
    @property
374
375
    def offering(self):
397
398
    """An form to alter a worksheet in an offering."""
398
399
    template = 'templates/worksheet_edit.html'
399
400
    permission = 'edit'
 
401
    tab = 'subjects'
400
402
 
401
403
    def populate_state(self, state):
402
404
        state.existing_worksheet = self.context
428
430
    """View for arranging worksheets."""
429
431
    permission = 'edit'
430
432
    template = 'templates/worksheets_edit.html'
 
433
    tab = 'subjects'
431
434
 
432
435
    def populate(self, req, ctx):
433
436
        self.plugin_styles[Plugin] = ['tutorial_admin.css']
450
453
    """
451
454
    permission = 'edit'
452
455
    template = 'templates/exercise.html'
 
456
    tab = 'subjects'
453
457
 
454
458
    def populate(self, req, ctx):
455
459
        self.plugin_scripts[Plugin] = ['tutorial.js']
469
473
    permission = 'edit'
470
474
    template = 'templates/exercise_edit.html'
471
475
    breadcrumb_text = 'Edit'
 
476
    tab = 'subjects'
472
477
 
473
478
    def populate(self, req, ctx):
474
479
        self.plugin_styles[Plugin] = ['exercise_admin.css']
501
506
    
502
507
    permission = 'edit'
503
508
    template = 'templates/exercise_delete.html'
 
509
    tab = 'subjects'
504
510
    
505
511
    def populate(self, req, ctx):
506
512
 
523
529
 
524
530
class ExerciseAddView(XHTMLView):
525
531
    """View for creating a new exercise."""
526
 
    
 
532
 
527
533
    permission = 'edit'
528
534
    template = 'templates/exercise_add.html'
 
535
    tab = 'subjects'
 
536
 
529
537
    #XXX: This should be done somewhere else
530
538
    def authorize(self, req):
531
539
        for offering in req.store.find(Offering):
543
551
    permission = 'edit'
544
552
    template = 'templates/exercises.html'
545
553
    breadcrumb_text = 'Exercises'
 
554
    tab = 'subjects'
546
555
 
547
556
    #XXX: This should be done somewhere else
548
557
    def authorize(self, req):