e2214bad808401b66ecaf31e893e9253939109f7
[invirt/packages/invirt-web.git] / code / templates / skeleton.mako
1 <%page expression_filter="h"/>
2 <%namespace name="fn" file="functions.mako" inheritable="True"/>
3 <!DOCTYPE html
4 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6 <html>
7 <head><title>${self.title()} &mdash; XVM</title>
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>
13   <script type="text/javascript">
14 var helpWin = null;
15 function closeWin(){
16         if (helpWin != null){
17                 if(!helpWin.closed)
18                         helpWin.close();
19         }
20 }
21
22 function helppopup(name){
23    closeWin()
24    helpWin = window.open("help?simple=true&subject="+encodeURIComponent(name), "Help",
25 "status, height = 300, width = 400");
26    if (window.focus){helpWin.focus();}
27    return false;
28 }
29 </script>
30 </head>
31 <body id="body"
32 % if hasattr(self.attr, 'pageclass'):
33   class="${self.attr.pageclass}"
34 % endif
35   >
36
37 % if False:
38 <div>
39 <p>We are in the process of modifying the service.  Things likely will not work.</p>
40 </div>
41 % endif
42
43 % if error_text is not UNDEFINED:
44 <div id="err">
45 <p>STDERR:</p><pre>${error_text}</pre>
46 </div>
47 % endif
48
49 % if not simple:
50 % if cherrypy.request.login:
51 <p class="loggedin">Welcome, <span class="name">${cherrypy.request.login}</span>.
52 % if cherrypy.request.state.isadmin:
53 You are currently authenticated as an administrator.
54 % endif
55 </p>
56 % endif
57
58 <ul class="navigation">
59 <li><a href="list">List</a></li>
60 % if machine:
61 <li><a href="machine/${machine.machine_id}">Info</a></li>
62 <li><a href="machine/${machine.machine_id}/vnc">Console</a></li>
63 % endif
64 <li><a href="help">Help</a></li>
65 </ul>
66
67 % if True:
68 <p class="notice">There will be a scheduled XVM outage on the weekend of July
69 20th. See the <a href="/static/outage_email.txt">outage email</a> for further
70 information.</p> 
71 % endif
72
73 % endif
74
75 % if not simple:
76 <h1>${self.title()} &mdash; XVM</h1>
77 % endif
78
79 % if result:
80 <div id="result" class="result">
81 ${result}
82 </div>
83 % endif
84
85 ${next.body()}
86 % if not simple:
87 <hr />
88 Questions? Contact <a href="mailto:xvm@mit.edu">xvm@mit.edu</a>.
89 % endif
90 </body>
91 </html>
92
93 <%def name="title()">
94 XVM
95 </%def>