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

« back to all changes in this revision

Viewing changes to ivle/webapp/tos/__init__.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:
26
26
import ivle.webapp.security
27
27
from ivle.webapp.base.xhtml import XHTMLView
28
28
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
 
29
from ivle.webapp import ApplicationRoot
29
30
 
30
31
def get_terms_of_service(config):
31
32
    """
67
68
 
68
69
    allow_overlays = False
69
70
 
70
 
    def __init__(self, req):
 
71
    def __init__(self, req, context, subpath=None):
 
72
        super(TermsOfServiceView, self).__init__(req, context, subpath)
71
73
        # We need to be able to handle the case where a user has status
72
74
        # 'no_agreement'. In that case, req.user will be None, so we have
73
75
        # to get it ourselves.
94
96
 
95
97
class Plugin(ViewPlugin, MediaPlugin):
96
98
    """Registration for the Terms of Service plugin."""
97
 
    urls = [
98
 
        ('+tos', TermsOfServiceView),
99
 
    ]
 
99
    views = [(ApplicationRoot, '+tos', TermsOfServiceView)]
100
100
 
101
101
    media = 'media'