source: extensions/edit_gmaps/admin/admin_edit.tpl @ 4545

Last change on this file since 4545 was 4545, checked in by cljosse, 14 years ago

Edit_gmaps Start creation

File size: 6.8 KB
Line 
1{html_head}
2{if $lat}
3<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$GMAPS_API_KEY}&amp;hl={$lang_info.code}" type="text/javascript"></script>
4
5
6<script src="{$PLUGIN_ROOT_URL}/template/windows_13/javascripts/prototype.js" type="text/javascript"></script>
7<script src="{$PLUGIN_ROOT_URL}/template/windows_13/javascripts/window.js" type="text/javascript" defer="defer"></script>
8<link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/default.css" rel="stylesheet" type="text/css" />
9<link href="{$PLUGIN_ROOT_URL}/template/windows_13/themes/alphacube.css" rel="stylesheet" type="text/css" />
10
11<style type="text/css">{literal}
12
13#map2{   
14left:0px;
15 width:250px
16}
17#mapPicture{
18
19width:100px ;
20 border:outset;
21 height:100px;
22}
23#map{ float:left;
24 top:20px;
25 right:0px;
26  width:500px;
27  height:500px;
28 border:outset;
29}
30
31
32{/literal}
33</style>
34{/if}
35{/html_head}
36
37<fieldset>
38  <legend>{'Display options'|@translate}</legend>
39<form>
40Set:
41<select onchange="document.location = this.options[this.selectedIndex].value;">
42  <optgroup label="Specials">
43    {html_options options=$specials}
44  </optgroup>
45  <optgroup label="{'Categories'|@translate}">
46        {html_options options=$categories selected=$categories_selected}
47  </optgroup>
48  <!-- <optgroup label="{'Tags'|@translate}"></optgroup> -->
49</select>
50</form>
51<table ><td align="left" >{'New_hlp'|@translate}</td> 
52<tr><td align="left" >{'New_hlp2'|@translate}
53</td></tr>
54</table>
55
56  <p>{'elements per page'|@translate}:
57      <a href="{$U_DISPLAY}&amp;display=20">20</a>
58    | <a href="{$U_DISPLAY}&amp;display=50">50</a>
59    | <a href="{$U_DISPLAY}&amp;display=100">100</a>
60    | <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
61  </p>
62</fieldset>
63
64<form action="" method="post" id="Envoie" name="Envoie"   >
65
66<fieldset>
67        <legend>{'Elements'|@translate}</legend>
68
69        <div class="navigationBar">{$NAV_BAR}</div>
70  {if not empty($thumbnails)}
71        <ul class="thumbnails">
72                {foreach from=$thumbnails item=thumbnail}
73                <li><span class="wrap1">
74                        <label>
75                                <span class="wrap2"><span>
76                                        <img src="{$thumbnail.U_TN}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE}" class="thumbnail" />
77                                </span></span>
78                                <input type="checkbox" name="selection[]" value="{$thumbnail.id}" />
79                        </label>
80
81                        <span class="thumbLegend">
82                        {if isset($thumbnail.U_MAP)}
83                        <a href="{$thumbnail.U_MAP}" target="_blank">{$thumbnail.lat},{$thumbnail.lon}</a>
84                        {/if}
85                        </span>
86
87                        </span>
88                </li>
89                {/foreach}
90        </ul>
91        {/if}
92</fieldset>
93
94<!--/===================================================================================-->
95
96<fieldset>
97<legend>{'map'|@translate}</legend>
98<input class="submit" type="submit" name="submit" value="{'selection'|@translate}" />
99<input class="submit" type="submit" name="submit" value="{'reset'|@translate}" /><br />
100<input type="text" size="300px" value="{$match}"  name="match"    />
101<input class="submit" type="submit" name="submit" value="{'search_title'|@translate}" />
102
103{if $lat}
104<div id="map"></div>
105{if not empty($Selectthumbnails)}
106        <ul class="thumbnails">
107                {foreach from=$Selectthumbnails item=thumbnail}
108                 
109                        <li><span class="wrap1">
110                                <label>
111                                        <span class="wrap2"><span>
112                                                <img src="{$thumbnail.U_TN}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE}" class="thumbnail" />
113                                        </span>
114                                       
115                                        </span>
116                                        <br/>
117</label>
118                                <input type="text"  value={$thumbnail.id}  name="selection[]"    />
119                               
120                               
121                               
122                                <span class="thumbLegend">
123                                {if isset($thumbnail.U_MAP)}
124                                        <a href="{$thumbnail.U_MAP}" target="_blank">{$thumbnail.lat},{$thumbnail.lon}</a>
125                                {/if}
126                                {$thumbnail.file} 
127                                </span>
128
129                                </span>
130                        </li>
131                       
132                {/foreach}
133        </ul>
134        {/if}
135
136 <script src="dragzoom.js" type="text/javascript"></script>
137<script type="text/javascript">
138
139{literal}
140 //<![<!--CDATA[
141function onLoad()
142{
143  if (!GBrowserIsCompatible())   return;
144  var mapElement = document.getElementById("map");
145  var map = new GMap2(document.getElementById("map"),{mapTypes: [G_SATELLITE_MAP,G_HYBRID_MAP,G_NORMAL_MAP,G_PHYSICAL_MAP,G_SATELLITE_3D_MAP]});
146 
147  map.addControl(new GLargeMapControl());
148  map.addControl(new GMapTypeControl());
149  map.addControl(new GScaleControl());
150<!--  map.enableScrollWheelZoom();-->
151<!--  map.enableDoubleClickZoom();-->
152{/literal}
153{if isset($lat)}{/if}
154var coord = new GLatLng( {$lat}, {$lon} );
155
156  Ma_position=coord;
157  var echelle=18;
158 
159  map.setCenter( coord, echelle);
160  var marker = new GMarker(coord);
161  map.addOverlay(marker);
162
163{literal}
164  if ( !map.isLoaded() )
165    map.setCenter( new GLatLng(49,3), 14);
166  try {
167    // the overview must be added after setting map center
168    var ovcontrol = new GOverviewMapControl(new GSize(165,165));
169                map.addControl(ovcontrol);
170                var ov_map = ovcontrol.getOverviewMap();
171                GEvent.addListener(map, 'maptypechanged', function(){
172                        ov_map.setMapType(G_NORMAL_MAP);
173                });
174               
175
176GEvent.addListener(map,"click", function(overlay,latlng)
177            {
178 if (overlay) { return; }
179            var myHtml = "<input    type=\"text\" name=\"lat\" value="+latlng.lat()+" /><input   type=\"text\" name=\"lon\" value="+latlng.lng()+" /> ";       
180             map.openInfoWindow(latlng, myHtml);       
181
182                {/literal}
183                                document.Envoie.lat.value=latlng.lat() ;
184                                document.Envoie.lon.value=latlng.lng() ;
185
186                               
187                               
188
189
190                {literal}       
191            }
192                        );
193                         
194                                 
195  }
196  catch(e){ alert( e.message ); }
197 
198
199}
200
201function blowupUrl(theUrl)
202{
203  var win = new Window({
204    title: document.title,
205    url: theUrl,
206    classname: "alphacube",
207    left: 0, top: 0,
208    width:"640", height:"480",
209    minimizable: false,
210    maximizable: false,
211    draggable: false,
212    resizable: false,
213    destroyOnClose: true,
214    hideEffect: Element.hide,
215    showEffectOptions: {duration:1.5}
216  });
217
218  win.setConstraint(true, {top:20, left:20, bottom:30, right:20} );
219  win.maximize();
220  win.showCenter(true, 20, 20);
221 
222  return false;
223}
224
225<!--Event.observe(window, 'load', onLoad );-->
226<!--Event.observe(window, 'unload', GUnload );-->
227//]-->]>
228{/literal}
229onLoad();
230</script>
231
232{/if}
233
234</fieldset>
235
236
237<fieldset>
238  <legend>{'Form'|@translate}</legend>
239
240 
241  <label>Latitude (-90=S to 90=N)
242    <input type="text" size="8" value="{$lat}"  name="lat" />
243  </label>
244  <label>Longitude (-180=E to 180=W)
245    <input type="text" size="9"value="{$lon}"  name="lon"  />
246  </label>
247 
248  <p>
249    {'target'|@translate}
250    <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label>
251    <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label>
252  </p>
253
254  <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$tag_input_enabled} /></p>
255</fieldset>
256
257</form>
Note: See TracBrowser for help on using the repository browser.