source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/meta.kid @ 2694

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

Interim commit to support common cache. At this point
it's implemented in retrieve (although not obviously
working in all cases).

Line 
1<!-- This is a bunch of named functions for using when displaying metadata -->
2<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#">
3
4<!-- Parameter list class, used in StubB and DIF -->
5   
6    <div py:def="ParameterList(params)" class="ParameterList">
7        <table py:if="params is not None" cellspacing="0" cellpadding="3" border="0" width="100%"><tbody>
8            <tr><td class="linehead"><span class="heading0"> Parameters</span></td></tr>
9            <span py:for="item in params">
10                <tr><td class="rowhead">$item</td></tr>
11                <?python
12                #need to make sure keyword with spaces are not split inappropriately
13                keywords=[]
14                for word in params[item]:
15                    keywords.append(word.replace(' ','&nbsp;'))
16                keywords=',  '.join(keywords)
17                ?>
18                <tr py:if="params[item]!=[]"><td>$keywords</td></tr>
19            </span>
20        </tbody></table>
21    </div>
22   
23    <div py:def="Services()" id="ServiceList">
24        <table cellspacing="0" cellpadding="3" width=" 100%" border="0"><tbody>
25            <tr><td class="linehead" colspan="3"><span class="headingO">Links and Services</span></td></tr>
26            <!-- s=renderService(self.config)
27            <tr py:for="item in c.doc.services"><td>$s.get(item)<td><tr>
28            -->
29            <tr py:if="c.doc.ndgObject is not None">
30            <td width="20%"><span py:replace="linkimage(c.doc.ndgObject.xmlURL,g.icons_xml,'[XML]')"/></td>
31            <td>Downloadable XML version of this record
32            <span py:if="c.doc.ndgObject.gettable==1">
33            (Original <span py:replace="linkimage(c.doc.ndgObject.xmlURL+'&amp;original=1',g.icons_xml,'[XML]')"/>)
34            </span></td></tr>
35            <tr py:if="c.doc.ndgObject is not None">
36            <td width="20%"><span py:replace="linkimage(c.doc.ndgObject.printableURL,g.icons_prn,'[HTML]')"/></td>
37            <td>Viewable XML version of this record
38             <span py:if="c.doc.ndgObject.gettable==1">
39            (Original <span py:replace="linkimage(c.doc.ndgObject.printableURL+'&amp;original=1',g.icons_prn,'[HTML]')"/>)
40            </span></td></tr>
41            <span py:if="c.doc.ndgObject.gettable==1">
42                <tr><td></td><td>(Original records are the raw material harvested from data providers)</td></tr>
43                <tr><td><span py:replace="linkimage(c.doc.ndgObject.BURL,g.icons_B,'[NDG-BROWSE]')"/>
44                </td><td> NERC DataGrid Browse Metadata Record (should provide more information)</td></tr>
45            </span>
46        </tbody></table>
47    </div> <!-- ServiceList -->
48   
49   
50    <div py:def="Spatial(bbox)">
51        <!-- Currently this only shows the first bounding box -->
52        <table py:if="bbox.nboxes==1"><tbody>
53            <tr><td colspan="2" class="cellhead">Spatial coverage</td></tr>
54            <tr><td colspan="2" align="center">${bbox.boxes[0][0]}</td></tr>
55            <tr><td align="center">${bbox.boxes[0][1]}</td><td align="center">${bbox.boxes[0][2]}</td></tr>
56            <tr><td colspan="2" align="center">${bbox.boxes[0][3]}</td></tr>
57        </tbody></table>
58        <span py:if="bbox.nboxes!=1"><p class="cellhead">Spatial Coverage</p>
59        <p> Record includes $bbox.nboxes spatial bounding box records </p></span>
60    </div>
61   
62    <div py:def="Coverage(bbox,timcov)">
63        <table cellspacing="0" cellpadding="3" border="0" width="100%"><tbody>
64            <tr><td class="linehead" colspan="2"><span class="heading0"> Data Coverage</span> </td></tr>
65            <tr><td><div py:replace="Spatial(bbox)"/></td>
66                <td><table><tr><td colspan="2" class="cellhead"> Temporal coverage</td></tr>
67                           <tr><td> Start Date: ${timcov[0]}</td><td>End Date: ${timcov[1]}</td></tr>
68                           <tr><td colspan="2"> Status:${timcov[2]}</td></tr></table>
69                </td></tr>
70        </tbody></table>
71    </div>
72   
73    <div py:def="People(ptype,listOf)">
74        <table py:if="listOf!=[]" cellspacing="0" cellpadding="3" border="0" width="100%"><tbody>
75            <tr><td class="linehead"><span class="heading0"> $ptype</span></td></tr>
76            <tr py:for="p in listOf"><td>${XML(p.core['role'])}</td><td>${XML(p.toHTML())}</td></tr>
77        </tbody></table>
78    </div>
79   
80    <div py:def="Centre(cen)">
81        <table cellspacing="0" cellpadding="3" border="0" width="100%"><tbody>
82            <tr><td class="linehead"><span class="heading0"> Data Centre</span></td></tr>
83            <tr><td>${XML(cen.toHTML())}</td></tr>
84        </tbody></table>
85    </div>
86   
87    <div py:def="Keywords(Name,listOf)">
88         <table cellspacing="0" cellpadding="3" border="0" width="100%"><tbody>
89            <tr><td class="linehead"><span class="heading0"> $Name</span></td></tr>
90            <tr py:for="item in listOf"><td>$item</td></tr>
91        </tbody></table>
92    </div>
93   
94</html>
Note: See TracBrowser for help on using the repository browser.