Changeset 2862
- Timestamp:
- 31/08/07 11:36:52 (13 years ago)
- Location:
- TI05-delivery/ows_framework/trunk/ows_server/ows_server
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py
r2854 r2862 59 59 map.connect('addSelection/:uri/:name',controller='tabs',action='addSelection') 60 60 map.connect('clear/:value',controller='tabs',action='clear') 61 map.connect('visualise/:dataset/:view',controller='visualise',action='inpagetab') 61 62 62 63 return map -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/visualise.py
r2854 r2862 4 4 5 5 class VisualiseController(BaseController): 6 def index(self): 6 7 def __setup(self): 8 9 c.fullpage=1 # we want the whole page 7 10 c.datasets = {} 11 c.inpageid = 'api' 12 self.first=None 8 13 9 14 for uri, dif in session.get('selection', []): … … 14 19 15 20 c.datasets[uri] = dataset 21 if self.first is None: self.first=uri 22 23 def index(self): 24 25 self.__setup() 26 if c.datasets!={}: 27 c.visible='Dataset' 28 c.currentDataset=self.first 16 29 17 30 return render_response('visualise') 31 32 def inpagetab(self,dataset,view): 33 ''' Take ajax request for inpage tab change ''' 34 self.__setup() 35 c.visible=view 36 c.currentDataset=dataset 37 38 c.fullpage=0 39 return render_response('visualise',fragment=True) 40 -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/public/layout/ndg2.css
r2829 r2862 57 57 58 58 59 /* In page tabs */ 60 /* Reminder: top, right, bottom, left */ 61 .InPageTabs {margin: 5px 20px 0px 20px; line-height:normal; border: solid black; border-width: 0px 0px 0px 0px;} 62 63 .InPageHdr ul {margin:0 0 0 10px; padding:0; list-style:none; } 64 .InPageHdr li {float:left; margin-right:10px; padding: 2px 10px; border: solid black; border-width:1px 1px 0px 1px; } 65 .InPageHdr li.current {position:relative; top:1px; background-color: #f0f0f0; } /* color should be same as searchBar! */ 66 .InPageHdr li.hidden {} 67 .InPageHdr a {display:block; text-decoration:none;} 68 .InPageContent {border:1px solid black; clear: both;} 69 .InPageContent .hidden {display:none;} 59 70 /* Left Column if Necessary */ 60 71 -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/visualise.kid
r2854 r2862 2 2 3 3 <head py:replace="pagehead(0)"/> 4 5 <div py:def="notebook(divid)"> 6 <?python 7 headers=['Dataset','Variable','Detail'] 8 status={} 9 for hh in headers:status[hh]='hidden' 10 status[c.visible]='current' 11 ds=c.datasets[c.currentDataset] 12 ?> 13 <div id="$divid"> 14 <div class="InPageTabs"> 15 <div class="InPageHdr"> 16 <ul> 17 <li py:for="hh in headers" class="${status[hh]}"> 18 ${XML(h.link_to_remote(hh,dict(update=divid, url=h.url_for(controller="visualise", action="inpagetab",dataset=c.currentDataset,view=hh))))} 19 </li> 20 </ul> 21 </div> 22 <div class="InPageContent"> 23 <div id="${headers[0]}" class="${status[headers[0]]}"> 24 <ul> 25 <li py:for="uri in c.datasets">$uri</li> 26 </ul> 27 </div> 28 <div id="${headers[1]}" class="${status[headers[1]]}"> 29 <ul> 30 <li py:for="featureID in ds.getFeatureList()"> 31 <?python feature=ds.getFeature(featureID)?> 32 ${feature.name.CONTENT}</li> 33 </ul> 34 </div> 35 <div id="${headers[2]}" class="${status[headers[2]]}"> 36 <ul> 37 <li>Not yet implemented</li> 38 </ul> 39 </div> 40 </div> 41 </div> 42 </div> 43 </div> 44 <div py:if="not c.fullpage" py:replace="notebook(c.inpageid)"/> 45 4 46 <body> 5 <div id="entirepage"> 47 48 <div py:if="c.fullpage" id="entirepage"> 6 49 <div py:replace="header()"/> 7 50 <div py:replace="PageTabs('Visualise')"/> … … 10 53 <div py:if="'selection' in session"> 11 54 <p> The visualisation feature is not fully implemented. </p> 12 <ol> 13 <li py:for="uri in c.datasets" class="dataset"> 14 <?python 15 ds = c.datasets[uri] 16 divid='csml_%s'%uri 17 ?> 18 <ol id="$divid"> 19 <li py:for="featureId in ds.getFeatureList()"> 20 <?python 21 feature = ds.getFeature(featureId) 22 ?> 23 ${feature.name.CONTENT} 24 </li> 25 </ol> 26 </li> 27 </ol> 55 <div py:replace="notebook(c.inpageid)"/> 28 56 </div> 29 57 <div py:if="'selection' not in session">
Note: See TracChangeset
for help on using the changeset viewer.