1 | <html py:extends="'ndgPage.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> |
---|
2 | <head> |
---|
3 | <replace py:replace="pagehead()"/> |
---|
4 | <script src="$g.server/js/ndgJavascript.js"/> |
---|
5 | </head> |
---|
6 | <?python |
---|
7 | onloadAttribute = "" |
---|
8 | if c.redirectToConterra: |
---|
9 | onloadAttribute = "document.forms.ConTerraForm.submit();" |
---|
10 | ?> |
---|
11 | <body onload="${onloadAttribute}"> |
---|
12 | <div id="redirectForm" py:if="c.redirectToConterra"> |
---|
13 | <div py:replace="XML(render('conterra_aggregate',fragment=True, format='xml'))"/> |
---|
14 | </div> |
---|
15 | <div id="entirepage"> |
---|
16 | <div py:replace="header()"/> |
---|
17 | <div py:replace="PageTabs('Selections')"/> |
---|
18 | <div py:replace="searchOneLine()"/> |
---|
19 | <div id="contents"> |
---|
20 | <h2> Selected Datasets </h2> |
---|
21 | <div id="resultsTab" py:if="'selection' in session"> |
---|
22 | <p> Please select which datasets you wish to view and which viewer you wish to use<span py:replace="helpIcon('select_help')"/></p> |
---|
23 | <div id="select_help" class="hidden"> |
---|
24 | <div class="helptxt"> |
---|
25 | <p> |
---|
26 | Clicking on an icon in the 'Google-Earth', 'Con Terra' or 'Local' columns will open the corresponding dataset in the specified viewer. |
---|
27 | To view multiple datasets together, select these using the 'Select' column then click on the 'View Selected' button for the |
---|
28 | desired viewer. |
---|
29 | </p> |
---|
30 | </div> |
---|
31 | </div> |
---|
32 | |
---|
33 | <form name="selectionsForm" id="selectionsForm" onSubmit='return true;'> |
---|
34 | <table class="selectedDatasets" id="selectedDatasets" width="100%"> |
---|
35 | <thead> |
---|
36 | <tr> |
---|
37 | <th rowspan="2" width="60%">Dataset Title</th> |
---|
38 | <th rowspan="2">Select |
---|
39 | <input type="checkbox" name="chk_cbox" onclick="selectAll(this,'selectedDatasets');"/> |
---|
40 | </th> |
---|
41 | <th colspan="3">Viewer</th> |
---|
42 | <th rowspan="2"></th> |
---|
43 | </tr> |
---|
44 | <tr> |
---|
45 | <th>Google-Earth</th> |
---|
46 | <th>Con Terra</th> |
---|
47 | <th>Local</th> |
---|
48 | </tr> |
---|
49 | </thead> |
---|
50 | <tbody> |
---|
51 | <?python x=0 ?> |
---|
52 | <for py:for="i in session['selection']" class="dataset" py:strip="True"> |
---|
53 | <!-- need a row for each KML or WMC URL to allow individual selection |
---|
54 | - choose the large array to loop over to create table correctly --> |
---|
55 | <?python |
---|
56 | rowNo = 1 |
---|
57 | listToIterate = i.kmlList |
---|
58 | if i.kmlList: |
---|
59 | rowNo = len(i.kmlList) |
---|
60 | if i.wmcList and len(i.wmcList) > rowNo: |
---|
61 | rowNo = len(i.wmcList) |
---|
62 | listToIterate = i.wmcList |
---|
63 | j=0 |
---|
64 | # include dummy list incase there is no wmc or kml data |
---|
65 | if len(listToIterate) == 0: |
---|
66 | listToIterate = ['1'] |
---|
67 | ?> |
---|
68 | <for py:for="l in listToIterate" py:strip="True"> |
---|
69 | <tr class="${x%2 and 'rowhi' or 'rowlo'}"> |
---|
70 | <td> |
---|
71 | <span py:if="j == 0" py:strip="True"> |
---|
72 | ${i.title} |
---|
73 | </span> |
---|
74 | </td> |
---|
75 | <td align="center"> |
---|
76 | <!-- NB, append counter to checkbox to allow retrieval of exact |
---|
77 | KML/WMC doc selected - in selectedItems.getSelectedItems() --> |
---|
78 | <input type="checkbox" name="${str(i.entryID) + '____' + str(j)}" /> |
---|
79 | </td> |
---|
80 | <td align="center"> |
---|
81 | <span py:if="i.kmlURL and len(i.kmlList) > j" py:strip="True"> |
---|
82 | <span py:replace="linkimage(i.kmlList[j],g.icons_plot,'[Display]')" py:strip="True"/> |
---|
83 | </span> |
---|
84 | </td> |
---|
85 | <td align="center"> |
---|
86 | <span py:if="i.wmcURL and len(i.wmcList) > j" py:strip="True"> |
---|
87 | <input type="image" src="$g.icons_plot" name="PlotConTerra____${i.wmcList[j]}"/> |
---|
88 | </span> |
---|
89 | </td> |
---|
90 | <td align="center"> |
---|
91 | <span py:if="i.wmcURL and len(i.wmcList) > j" py:strip="True"> |
---|
92 | <span py:replace="linkimage(g.server + '/viewItems?ENDPOINT=' + i.wmcList[j],g.icons_plot,'[Display]')" py:strip="True"/> |
---|
93 | </span> |
---|
94 | </td> |
---|
95 | <td align="center"> |
---|
96 | <span py:if="j == 0" py:strip="True"> |
---|
97 | ${XML(h.link_to_remote("Remove", |
---|
98 | dict(update="entirepage", |
---|
99 | url=h.url_for(controller="selectedItems", |
---|
100 | action="removeSelectedItem", |
---|
101 | entryid=i.entryID))))} |
---|
102 | </span> |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | <?python |
---|
106 | j+=1 |
---|
107 | ?> |
---|
108 | </for> |
---|
109 | <?python |
---|
110 | x+=1 |
---|
111 | ?> |
---|
112 | </for> |
---|
113 | <tr> |
---|
114 | <td colspan="2"></td> |
---|
115 | <td> |
---|
116 | <input name="PlotSelectedInGoogle" type="submit" value="View Selected" /> |
---|
117 | </td> |
---|
118 | <td> |
---|
119 | <input name="PlotSelectedInConTerra" type="submit" value="View Selected" /> |
---|
120 | </td> |
---|
121 | <td> |
---|
122 | <input name="PlotSelectedInLocal" type="submit" value="View Selected" /> |
---|
123 | </td> |
---|
124 | <td> |
---|
125 | <input name="ClearSelections" type="submit" value="Remove All" /> |
---|
126 | </td> |
---|
127 | </tr> |
---|
128 | </tbody> |
---|
129 | </table> |
---|
130 | </form> |
---|
131 | </div> |
---|
132 | <div py:if="'selection' not in session"> |
---|
133 | <p> There are currently no selected datasets; please return to the 'Results' tab and select some to view. </p> |
---|
134 | </div> |
---|
135 | </div> |
---|
136 | <div py:replace="footer()"/> |
---|
137 | </div> |
---|
138 | </body> |
---|
139 | </html> |
---|