source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/ndgPage.kid @ 2799

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/ndgPage.kid@2799
Revision 2799, 7.2 KB checked in by lawrence, 14 years ago (diff)

Minor layout changes, slight fix for trackback.

Line 
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(ol)">
7        <title py:content="c.title">title</title>
8        <!--! The following includes the javascript, note that the XML
9        function is needed to avoid escaping the < character -->
10        ${XML(h.javascript_include_tag(builtins=True))}
11        <script type="text/javascript" src="/js/toggleDiv.js"/>
12        <script py:if="ol==1" src="/js/OpenLayers.js"/>
13        <script py:if="ol==1" src="/js/openlayers-x.js"/>
14        <script py:if="ol==1" src="/js/OLMapBox.js"/>
15        <link media="all, screen" href="/layout/ndg2.css" type="text/css" rel="stylesheet"/>
16
17        <script type="text/javascript">
18          var app = null;
19          function initOLMapBox() {
20            app = new OLMapBoxApp('map','discoForm', 440, 10);
21          }
22        </script>
23
24
25    </head>
26
27    <div py:def="header1(searchBox)">
28        <div id="header"/>
29        <div id="logo"><img src="$g.LeftLogo" alt="$g.LeftAlt" /></div>
30    </div>
31   
32    <div py:def="header()">
33        <div id="header"/>
34        <div id="logo"><img src="$g.LeftLogo" alt="$g.LeftAlt" /></div>
35    </div>
36   
37    <!-- One line search box for top of many pages follows -->
38   
39    <div py:def="searchOneLine()" class="searchBar">
40        <table width="100%"><tr><td align="left">
41        <form action="$g.discoveryURL">
42            New Text Search<span py:replace="helpIcon('nts_help')"/>&nbsp;
43            <input type="text" size="25" name="searchString"/>
44            <select name="textTarget">
45            <option value="Authors">Authors</option>
46            <option value="All" selected="selected">All</option>
47            <option value="Params">Parameters</option>
48            </select>
49            <input type="submit" value="Search"/>
50         </form>
51         </td><td align="right">
52         <form action="$g.discoveryURL">
53            <input type="submit" value="New Search"/>
54            <span py:replace="helpIcon('ns_help')"/>
55         </form>
56         </td><td align="right">
57            <span py:if="'ndgSec' in session" id="loginBar">
58            <span py:replace="logOut()"/></span>
59            <span py:if="'ndgSec' not in session" id="loginBar">
60            <span py:replace="logIn()"/></span>
61        </td></tr></table>
62          <div id="nts_help" class="hidden">
63            <div class="helptxt"><p> This will do a completely new text search with no constraints beyond the target of the
64            text search from the drop down list (All, Authors, Parameters) </p></div>
65          </div>
66          <div id="ns_help" class="hidden">
67            <div class="helptxt"><p> This will return you to the new search page</p></div>
68          </div>
69    </div>
70
71    <!-- History and Shopping Cart follow -->
72
73    <div py:def="leftpanel()" id="Left">
74            <div py:if="session['panelView']=='History'">
75                <div class="tabhdr">
76                    <ul>
77                        <li class="current"> <span class="tabhdri">History</span></li>
78                        <li class="hidden"><span class="tabhdri">${XML(h.link_to_remote("Selected",dict(update="Left", url=h.url_for(controller="tabs", action="update",value="Selection"))))}</span></li>
79                    </ul>
80                </div>
81                <div class="tabcontent">
82                   <p> Dataset History </p> 
83                   <ul py:if="'history' in session">
84                        <li py:for="item in session['history']">
85                        ${XML(h.link_to(item[0],item[1]))}</li>
86                   </ul>
87                </div>
88            </div>
89            <div py:if="session['panelView']=='Selection'">
90                <div class="tabhdr">
91                    <ul>
92                    <li class="hidden"><span class="tabhdri">${XML(h.link_to_remote("History",dict(update="Left", url=h.url_for(controller="tabs", action="update",value="History"))))}</span></li>
93                    <li class="current"><span class="tabhdri">Selection</span></li>
94                    </ul>
95                </div>
96                <div class="tabcontent">
97                    <p> Selected Datasets </p> 
98                    <ul py:if="'selection' in session">
99                        <li py:for="item in session['selection']">
100                        ${XML(h.link_to(item[1],item[0]))}</li>
101                    </ul>
102                    ${XML(h.link_to_remote("Clear",dict(update="Left", url=h.url_for(controller="tabs", action="clear",value="Selection"))))}
103                </div>
104            </div>
105    </div>
106   
107    <!-- Page Footer follows -->
108
109    <div py:def="footer()" id="Footer">
110        <center><table><tbody>
111            <tr>
112                <td align="center" width="60%">
113                    <table><tbody>
114                    <tr><td><span py:replace="linkimage(g.ndgLink,g.ndgImage,'NDG')"/></td>
115                    <td> This portal is a product of the <a href="http://ndg.nerc.ac.uk"> NERC DataGrid</a>
116                    Not all functionality is completely implemented, bugs and problems are expected </td>
117                    </tr>
118                    </tbody></table>
119                </td>
120                <td width="40%" align="center">
121                    <div id="loginStatus">
122                        <!--! now we choose one of the next two (logged in or not) -->
123                        <div py:if="'ndgSec' in session"><table><tbody><tr><td> User [${session['ndgSec']['u']}] logged in
124                        at [${session['ndgSec']['h']}] with roles [${len(session['ndgSec']['roles'])==1 and session['ndgSec']['roles'][0] or ', '.join(session['ndgSec']['roles'])}]</td><td>
125                        &nbsp;<span py:replace="logOut()"/></td></tr></tbody></table></div>
126                        <div py:if="'ndgSec' not in session">Further services maybe available if you can
127                            <span py:replace="logIn()"/></div>
128                    </div>
129                </td>
130                <td><span py:replace="linkimage(g.stfcLink,g.stfcImage,'Hosted by the STFC CEDA')"/></td>
131            </tr>
132        </tbody></table></center>
133    </div>
134   
135    <!-- Utility Functions follow -->
136   
137    <!-- hyperlinked image -->
138    <span py:def="linkimage(linkref,imageref,alttext)">
139        <a href="$linkref"><image src="$imageref" alt="$alttext" title="$alttext"/></a>
140    </span>
141   
142    <!-- Help Icons -->
143    <span py:def="helpIcon(value)">
144        <span>
145            <a href="javascript:;" title="Toggle help" onclick="toggleDiv(1,'$value','shown','hidden','div'); return false;">
146            <img src="$g.helpIcon" alt="Toggle help" class="helpicon"/></a>
147     
148        </span>
149    </span>
150   
151    <!-- Login and out buttons -->
152   
153    <span py:def="logOut()" class="logOut">
154        <form action="$g.logout">
155            <input type="hidden" name="r" value="$c.requestURL"/>
156            <input type="submit" value="Logout"/>
157        </form>
158    </span>
159   
160    <span py:def="logIn()" class="logIn">
161        <form action="$g.wayfuri">
162            <input type="hidden" name="r" value="$c.requestURL"/>
163            <input type="submit" value="Login"/>
164        </form>
165    </span>
166   
167   
168   
169</html>
Note: See TracBrowser for help on using the repository browser.