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

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

Updated changes to be compatible with:

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