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

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

ows_server/ows_server/lib/base.py: temp fix to passing of credentials over
http redirect - see TODOs esp. use of eval()

ows_server/ows_server/templates/ndgPage.kid: revised for cleaner display of
roles

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></td><td/><td align="right">
51
52            <span py:if="'ndgSec' in session" id="loginBar">
53            <span py:replace="logOut()"/></span>
54            <span py:if="'ndgSec' not in session" id="loginBar">
55            <span py:replace="logIn()"/></span>
56          </td></tr></table>
57          <div id="nts_help" class="hidden">
58            <div class="helptxt"><p> This will do a completely new text search with no constraints beyond the target of the
59            text search from the drop down list (All, Authors, Parameters) </p></div>
60          </div>
61    </div>
62
63    <!-- History and Shopping Cart follow -->
64
65    <div py:def="leftpanel()" id="Left">
66            <div py:if="session['panelView']=='History'">
67                <div class="tabhdr">
68                    <ul>
69                        <li class="current"> History</li>
70                        <li class="hidden">${XML(h.link_to_remote("Selected",dict(update="Left", url=h.url_for(controller="tabs", action="update",value="Selection"))))}</li>
71                    </ul>
72                </div>
73                <div class="tabcontent">
74                   <p> Dataset History </p> 
75                   <ul py:if="'history' in session">
76                        <li py:for="item in session['history']">
77                        ${XML(h.link_to(item[0],item[1]))}</li>
78                   </ul>
79                </div>
80            </div>
81            <div py:if="session['panelView']=='Selection'">
82                <div class="tabhdr">
83                    <ul>
84                    <li class="hidden">${XML(h.link_to_remote("History",dict(update="Left", url=h.url_for(controller="tabs", action="update",value="History"))))}</li>
85                    <li class="current">Selection</li>
86                    </ul>
87                </div>
88                <div class="tabcontent">
89                    <p> Selected Datasets </p> 
90                    <ul py:if="'selection' in session">
91                        <li py:for="item in session['selection']">
92                        ${XML(h.link_to(item[1],item[0]))}</li>
93                    </ul>
94                    ${XML(h.link_to_remote("Clear",dict(update="Left", url=h.url_for(controller="tabs", action="clear",value="Selection"))))}
95                </div>
96            </div>
97    </div>
98   
99    <!-- Page Footer follows -->
100
101    <div py:def="footer()" id="Footer">
102        <center><table><tbody>
103            <tr>
104                <td align="center" width="60%">
105                    <table><tbody>
106                    <tr><td><span py:replace="linkimage(g.ndgLink,g.ndgImage,'NDG')"/></td>
107                    <td> This portal is a product of the <a href="http://ndg.nerc.ac.uk"> NERC DataGrid</a>
108                    Not all functionality is completely implemented, bugs and problems are expected </td>
109                    </tr>
110                    </tbody></table>
111                </td>
112                <td width="40%" align="center">
113                    <div id="loginStatus">
114                        <!--! now we choose one of the next two (logged in or not) -->
115                        <div py:if="'ndgSec' in session"><table><tbody><tr><td> User [${session['ndgSec']['u']}] logged in
116                        at [${session['ndgSec']['h']}] with roles [${len(session['ndgSec']['r'])==1 and session['ndgSec']['r'][0] or ', '.join(session['ndgSec']['r'])}]</td><td>
117                        &nbsp;<span py:replace="logOut()"/></td></tr></tbody></table></div>
118                        <div py:if="'ndgSec' not in session">Further services maybe available if you can
119                            <span py:replace="logIn()"/></div>
120                    </div>
121                </td>
122                <td><span py:replace="linkimage(g.stfcLink,g.stfcImage,'Hosted by the STFC CEDA')"/></td>
123            </tr>
124        </tbody></table></center>
125    </div>
126   
127    <!-- Utility Functions follow -->
128   
129    <!-- hyperlinked image -->
130    <span py:def="linkimage(linkref,imageref,alttext)">
131        <a href="$linkref"><image src="$imageref" alt="$alttext" title="$alttext"/></a>
132    </span>
133   
134    <!-- Help Icons -->
135    <span py:def="helpIcon(value)">
136        <span>
137            <a href="javascript:;" title="Toggle help" onclick="toggleDiv(1,'$value','shown','hidden','div'); return false;">
138            <img src="$g.helpIcon" alt="Toggle help" class="helpicon"/></a>
139     
140        </span>
141    </span>
142   
143    <!-- Login and out buttons -->
144   
145    <span py:def="logOut()" class="logOut">
146        <form action="$g.logout">
147            <input type="hidden" name="r" value="$c.requestURL"/>
148            <input type="submit" value="Logout"/>
149        </form>
150    </span>
151   
152    <span py:def="logIn()" class="logIn">
153        <form action="$g.wayfuri">
154            <input type="hidden" name="r" value="$c.requestURL"/>
155            <input type="submit" value="Login"/>
156        </form>
157    </span>
158   
159   
160   
161</html>
Note: See TracBrowser for help on using the repository browser.