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

« back to all changes in this revision

Viewing changes to www/dispatch/html.py

  • Committer: drtomc
  • Date: 2008-02-14 23:37:08 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:467
makeuser: Add some of the helper functions for activating users.
setup: Add some missing svn config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
            "app from conf.apps.app_url when placed into production."
111
111
            "</small></p>\n")
112
112
 
113
 
    if req.username:
 
113
    # If req has a "no_agreement" attribute, then it is because the user has
 
114
    # not signed the agreement; therefore we are displaying the TOS page.
 
115
    # Do not show apps (see dispatch.login).
 
116
    if req.username and not hasattr(req, 'no_agreement'):
114
117
        # Only print app tabs if logged in
115
118
        print_apps_list(req, req.app)
116
119
    req.write('</div>\n<div id="ivlebody">\n')
125
128
def get_help_url(req):
126
129
    """Gets the help URL most relevant to this page, to place as the
127
130
    "help" link at the top of the page."""
128
 
    if req.app == 'help':
 
131
    reqapp = req.app if hasattr(req, 'app') else None
 
132
    if reqapp == 'help':
129
133
        # We're already in help. Link to the exact current page
130
134
        # instead of the generic help page.
131
135
        return req.uri
132
 
    if conf.apps.app_url[req.app].hashelp:
133
 
        help_path = os.path.join('help', req.app)
 
136
    if reqapp is not None and conf.apps.app_url[reqapp].hashelp:
 
137
        help_path = os.path.join('help', reqapp)
134
138
    else:
135
139
        help_path = 'help'
136
140
    return util.make_path(help_path)