Ignore:
Timestamp:
Sep 27, 2009, 7:55:09 PM (15 years ago)
Author:
quentin
Message:

Implement administrator mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/templates/skeleton.mako

    r2432 r2482  
    66<html>
    77<head><title>${self.title()} &mdash; XVM</title>
    8   <base href="${cherrypy.request.base}" />
    9   <link href="static/favicon.ico" type="image/x-icon" rel="shortcut icon">
    10   <link rel="stylesheet" href="static/style.css" type="text/css" />
    11   <link rel="stylesheet" href="static/layout.css" type="text/css" media="screen" />
    12   <script type="text/javascript" src="static/prototype.js"></script>
     8  <base href="${cherrypy.request.base}${"/admin/" if cherrypy.request.state.isadmin else ""}" />
     9  <link href="/static/favicon.ico" type="image/x-icon" rel="shortcut icon">
     10  <link rel="stylesheet" href="/static/style.css" type="text/css" />
     11  <link rel="stylesheet" href="/static/layout.css" type="text/css" media="screen" />
     12  <script type="text/javascript" src="/static/prototype.js"></script>
    1313  <script type="text/javascript">
    1414var helpWin = null;
     
    5050% if not simple:
    5151% if cherrypy.request.login:
    52 <p class="loggedin">Welcome, <span class="name">${cherrypy.request.login}</span>.</p>
     52<p class="loggedin">Welcome, <span class="name">${cherrypy.request.login}</span>.
     53% if cherrypy.request.state.isadmin:
     54You are currently authenticated as an administrator.
     55% endif
     56</p>
    5357% endif
    5458
Note: See TracChangeset for help on using the changeset viewer.