Ignore:
Timestamp:
Dec 20, 2009, 9:45:38 PM (15 years ago)
Author:
broder
Message:

Implement administrator mode

File:
1 edited

Legend:

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

    r2678 r2690  
    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;
     
    4949% if not simple:
    5050% if cherrypy.request.login:
    51 <p class="loggedin">Welcome, <span class="name">${cherrypy.request.login}</span>.</p>
     51<p class="loggedin">Welcome, <span class="name">${cherrypy.request.login}</span>.
     52% if cherrypy.request.state.isadmin:
     53You are currently authenticated as an administrator.
     54% endif
     55</p>
    5256% endif
    5357
Note: See TracChangeset for help on using the changeset viewer.