source: cowsserver/trunk/lib/cowsserver/templates/catalogue.xml @ 6101

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cowsserver/trunk/lib/cowsserver/templates/catalogue.xml@6101
Revision 6101, 2.0 KB checked in by pnorton, 10 years ago (diff)

Removed the csml_geoplot controller and re-adjusted the routing. Also fixed the catalogue template.

Line 
1<?xml version="1.0"?>
2
3<?python
4
5from genshi import QName
6from routes import url_for
7from pylons import config,request   
8if 'cows.cowsclienturl' in config:
9    cowsclient = True
10    cowsclienturl=config['cows.cowsclienturl']
11    serverurl='http://%s'%(request.environ['HTTP_HOST'])
12else:
13    cowsclient = False 
14           
15?>
16<html xmlns:py="http://genshi.edgewall.org/"
17      xmlns:xlink="http://www.w3.org/1999/xlink"
18      >
19  <head>
20    <title>COWS Server Catalogue</title>
21  </head>
22 
23  <body>
24    <h1>COWS Server Catalogue</h1>
25    <h2>Services available:</h2>
26    <ul  py:for="fc, fc_name in c.allwxs">
27   
28      <?python
29        wms_url = url_for(controller='csmlwms', fileoruri=fc, id=None,
30                        request='GetCapabilities', service='WMS',
31                        qualified=True)
32
33        wcs_url = url_for(controller='csmlwcs', fileoruri=fc, id=None,
34                        request='GetCapabilities', service='WCS',
35                        qualified=True)
36
37        wfs_url = url_for(controller='csmlwfs', fileoruri=fc, id=None,
38                        request='GetCapabilities', service='WFS',
39                        qualified=True)
40      ?>
41   
42      <li>
43        ${fc_name}
44        [<a href="$wms_url">WMS</a>
45        [<a href="$wcs_url">WCS</a>]
46        [<a href="$wfs_url">WFS</a>]
47                   
48        <py:if test="cowsclient==True">
49          [<a href="${url_for(cowsclienturl) + 'ENDPOINT=' + wms_url}">Visualize</a>]
50        </py:if>
51       
52        <py:if test="cowsclient!=True">
53          [<a href="${url_for(controller='demo', fileoruri=fc, qualified=True, host=c.host)}">Demo</a>]
54        </py:if>
55      </li>
56
57    </ul>
58    <ul  py:for="fc, fc_name in c.wfsonly">
59      <li >${fc_name}
60        [<a href="${url_for(controller='csmlwfs', fileoruri=fc, id=None,
61                        request='GetCapabilities', service='WFS',
62                        qualified=True)}"
63                >WFS</a>]
64      </li> 
65    </ul>
66  </body>
67</html>
Note: See TracBrowser for help on using the repository browser.