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

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

[Edit_gmaps] Fix Bug display in admin

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