1 | <!-- This is a bunch of named templates for use in pages --> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> |
---|
3 | |
---|
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 | ${XML(c.headExtras)} |
---|
9 | <link media="all, screen" href="${c.baseURL}/layout/ndg2.css" type="text/css" rel="stylesheet"/> |
---|
10 | <link rel="icon" type="image/ico" href="${c.baseURL}/layout/favicon.jpg" /> |
---|
11 | </head> |
---|
12 | |
---|
13 | <div py:def="header()"> |
---|
14 | <div id="header"/> |
---|
15 | <div id="logo"><img src="${c.leftLogo}" alt="${c.leftAlt}" /></div> |
---|
16 | </div> |
---|
17 | |
---|
18 | <div py:def="PageTabs(tabv)" id="PageTabs"> |
---|
19 | <div id="PageTabRow"> |
---|
20 | <ul> |
---|
21 | <span py:for="tab in c.pageTabs"> |
---|
22 | <?python |
---|
23 | linkto=True |
---|
24 | if tab[0] == tabv: |
---|
25 | status='current' |
---|
26 | linkto=False |
---|
27 | else: status='hidden' |
---|
28 | ?> |
---|
29 | <li class="$status"><span class="pagetab"> |
---|
30 | </span></li> |
---|
31 | </span> |
---|
32 | </ul> |
---|
33 | </div> |
---|
34 | <div class="line"/> |
---|
35 | <div class="clear"/> |
---|
36 | </div> |
---|
37 | <py if="c.UpdatePageTabs" py:replace="PageTabs(c.current)"/> |
---|
38 | |
---|
39 | <!-- Page Footer follows --> |
---|
40 | <div py:def="footer(showLoginStatus=False)" id="Footer"> |
---|
41 | <center><table><tbody> |
---|
42 | <tr> |
---|
43 | <td align="left" width="60%"> |
---|
44 | <table><tbody> |
---|
45 | <tr><td><span py:replace="linkimage(c.ndgLink,c.ndgImage,'NDG')"/></td> |
---|
46 | <td>OpenID Provider Site for <a href="http://ndg.nerc.ac.uk"> NERC DataGrid</a> |
---|
47 | ${c.disclaimer} </td> |
---|
48 | </tr> |
---|
49 | </tbody></table> |
---|
50 | </td> |
---|
51 | <td width="40%" align="center"> |
---|
52 | <div py:if="c.loginStatus" id="loginStatus"> |
---|
53 | <!--! now we choose one of the next two (logged in or not) --> |
---|
54 | <div py:if="'username' in c.session" id="loggedIn"> |
---|
55 | <table><tbody><tr><td> |
---|
56 | <!-- Create link using embedded python |
---|
57 | construct because including a link with '&' |
---|
58 | directly causes an error |
---|
59 | --> |
---|
60 | <?python |
---|
61 | logOutLink='%s?submit=true&success_to=%s&fail_to=%s' % \ |
---|
62 | (c.urls['url_loginsubmit'], |
---|
63 | c.urls['url_login'], |
---|
64 | c.urls['url_mainpage']) |
---|
65 | ?> |
---|
66 | Logged in as ${c.session['username']}. |
---|
67 | [<a href="$logOutLink">Log out</a>] |
---|
68 | </td></tr></tbody></table> |
---|
69 | </div> |
---|
70 | <div py:if="'username' not in c.session" id="loggedOut"> |
---|
71 | <table><tbody><tr><td> |
---|
72 | Other services may be available if you <a href="${c.urls['url_login']}">login</a>. |
---|
73 | </td></tr></tbody></table> |
---|
74 | </div> |
---|
75 | </div> |
---|
76 | </td> |
---|
77 | <td align="right"><span py:replace="linkimage(c.stfcLink,c.stfcImage,'Hosted by the STFC CEDA')"/></td> |
---|
78 | </tr> |
---|
79 | </tbody></table></center> |
---|
80 | </div> |
---|
81 | |
---|
82 | <!-- Utility Functions follow --> |
---|
83 | |
---|
84 | <!-- hyperlinked image --> |
---|
85 | <span py:def="linkimage(linkref,imageref,alttext)"> |
---|
86 | <a href="$linkref"><image src="$imageref" alt="$alttext" title="$alttext"/></a> |
---|
87 | </span> |
---|
88 | |
---|
89 | <!-- Help Icons --> |
---|
90 | <span py:def="helpIcon(value)"> |
---|
91 | <span> |
---|
92 | <a href="javascript:;" title="Toggle help" onclick="toggleDiv(1,'$value','shown','hidden','div'); return false;"> |
---|
93 | <img src="${g['helpIcon']}" alt="Toggle help" class="helpicon"/></a> |
---|
94 | |
---|
95 | </span> |
---|
96 | </span> |
---|
97 | </html> |
---|