1 | <!-- This is a bunch of named templates for use in pages --> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/"> |
---|
3 | <?python from genshi import HTML ?> |
---|
4 | <!-- HTML Header and Document header follow --> |
---|
5 | |
---|
6 | <head py:def="pagehead()" py:strip="True"> |
---|
7 | <title py:content="c.title">title</title> |
---|
8 | <link media="all, screen" href="${c.baseURL}/layout/default.css" |
---|
9 | type="text/css" rel="stylesheet"/> |
---|
10 | <link rel="icon" type="image/ico" |
---|
11 | href="${c.baseURL}/layout/favicon.jpg"/> |
---|
12 | <script type="text/javascript" src="${c.baseURL}/js/toggleDiv.js"></script> |
---|
13 | </head> |
---|
14 | |
---|
15 | <div py:def="header()" id="header"> |
---|
16 | <div py:if="c.heading"> |
---|
17 | <h1>${c.heading}</h1> |
---|
18 | </div> |
---|
19 | <div py:if="c.leftLogo" id="logo"> |
---|
20 | <img src="${c.leftLogo}" alt="${c.leftAlt}" /> |
---|
21 | </div> |
---|
22 | </div> |
---|
23 | |
---|
24 | <!-- Page Footer follows --> |
---|
25 | <div py:def="footer(showLoginStatus=True)" id="footer"> |
---|
26 | <table width="100%"> |
---|
27 | <tbody> |
---|
28 | <tr> |
---|
29 | <td align="left" width="40%" valign="top"> |
---|
30 | <table> |
---|
31 | <tbody> |
---|
32 | <tr> |
---|
33 | <td valign="top" py:if="c.leftImage and c.leftLink"><span py:replace="linkimage(c.leftLink, c.leftImage, c.leftAlt)"/></td> |
---|
34 | <td valign="top" py:if="c.footerText">${HTML(c.footerText)}</td> |
---|
35 | </tr> |
---|
36 | </tbody> |
---|
37 | </table> |
---|
38 | </td> |
---|
39 | <td width="40%" align="center" valign="top"> |
---|
40 | <div py:if="c.loginStatus and showLoginStatus" id="loginStatus"> |
---|
41 | <div py:if="'username' in c.session" id="loggedIn"> |
---|
42 | <table> |
---|
43 | <tbody> |
---|
44 | <tr> |
---|
45 | <td valign="top"> |
---|
46 | <!-- Create link using embedded python |
---|
47 | construct because including a link with '&' |
---|
48 | directly causes an error |
---|
49 | --> |
---|
50 | <?python |
---|
51 | logOutLink='%s?submit=true&success_to=%s&fail_to=%s' % \ |
---|
52 | (c.urls['url_loginsubmit'], |
---|
53 | c.urls['url_login'], |
---|
54 | c.urls['url_mainpage']) |
---|
55 | ?> |
---|
56 | Logged in as ${c.session['username']}. |
---|
57 | [<a class="FooterLink" href="$logOutLink">Log out</a>] |
---|
58 | </td> |
---|
59 | </tr> |
---|
60 | </tbody> |
---|
61 | </table> |
---|
62 | </div> |
---|
63 | <div py:if="'username' not in c.session" id="loggedOut"> |
---|
64 | <table><tbody><tr><td valign="top"> |
---|
65 | Other services may be available if you <a href="${c.urls['url_login']}" class="FooterLink">login</a>. |
---|
66 | </td></tr></tbody></table> |
---|
67 | </div> |
---|
68 | </div> |
---|
69 | </td> |
---|
70 | <td valign="top" align="right" width="20%"><span py:replace="linkimage(c.rightLink, c.rightImage, c.rightAlt)"/></td> |
---|
71 | </tr> |
---|
72 | </tbody> |
---|
73 | </table> |
---|
74 | </div> |
---|
75 | |
---|
76 | <!-- Utility Functions follow --> |
---|
77 | |
---|
78 | <!-- hyperlinked image --> |
---|
79 | <span py:def="linkimage(linkref,imageref,alttext)"> |
---|
80 | <a href="$linkref"><image src="$imageref" alt="$alttext" title="$alttext"/></a> |
---|
81 | </span> |
---|
82 | </html> |
---|