source: cows/trunk/cows/pylons/templates/catalogue.xml @ 5756

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/pylons/templates/catalogue.xml@5756
Revision 5756, 2.2 KB checked in by domlowe, 11 years ago (diff)

modified catalogue controller and template to allow for wfs only service endpoints. Add wfsonly.txt to csmlstore directory to use

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#need to handle wfs only features separately so sort into two lists
16wfsonly=list(c.wfsonly)
17allwxs=[]
18
19#for fc in c.wfsonly:
20        #wfsonly.append(fc)     
21               
22for fc in c.featureCollections:
23        if fc not in wfsonly:
24                allwxs.append(fc)
25                   
26?>
27<html xmlns:py="http://genshi.edgewall.org/"
28      xmlns:xlink="http://www.w3.org/1999/xlink"
29      >
30  <head>
31    <title>COWS Server Catalogue</title>
32  </head>
33 
34  <body>
35    <h1>COWS Server Catalogue</h1>
36 
37        <ul  py:for="fc in allwxs">
38      <li py:if="cowsclient==True">${fc}
39        [<a href="${url_for(controller='csmlwms', fileoruri=fc, id=None,
40                            request='GetCapabilities', service='WMS')}"
41                            >WMS</a>]
42            [<a href="${url_for(controller='csmlwcs', fileoruri=fc, id=None,
43                            request='GetCapabilities', service='WCS')}"
44                            >WCS</a>]
45            [<a href="${url_for(controller='csmlwfs', fileoruri=fc, id=None,
46                            request='GetCapabilities', service='WFS')}"
47                            >WFS</a>]
48        [<a href="${url_for(cowsclienturl) + 'ENDPOINT=' + serverurl +url_for(controller='csmlwms', fileoruri=fc, id=None)}"
49                            >Visualize</a>]
50      </li>
51          <li py:if="cowsclient!=True">${fc}
52        [<a href="${url_for(controller='csmlwms', fileoruri=fc, id=None,
53                            request='GetCapabilities', service='WMS')}"
54                            >WMS</a>]
55            [<a href="${url_for(controller='csmlwcs', fileoruri=fc, id=None,
56                            request='GetCapabilities', service='WCS')}"
57                            >WCS</a>]
58            [<a href="${url_for(controller='csmlwfs', fileoruri=fc, id=None,
59                            request='GetCapabilities', service='WFS')}"
60                            >WFS</a>]
61            [<a href="${url_for(controller='demo', fileoruri=fc)}"
62                            >Demo</a>]
63      </li>     
64    </ul>
65        <ul  py:for="fc in wfsonly">
66      <li >${fc}
67            [<a href="${url_for(controller='csmlwfs', fileoruri=fc, id=None,
68                            request='GetCapabilities', service='WFS')}"
69                            >WFS</a>]
70      </li> 
71        </ul>
72  </body>
73</html>
Note: See TracBrowser for help on using the repository browser.