]> dev.renevier.net Git - syj.git/blob - application/views/scripts/idx/index.phtml
03355a2a817799b132cbbcc502db1286ff3e7cbb
[syj.git] / application / views / scripts / idx / index.phtml
1 <noscript>
2     <style type="text/css">
3         #map, #message, #data_controls, #login_controls, #user_area, #login_area, #newpwd_area {
4             display: none;
5         }
6     </style>
7
8     <p><?php echo $this->translate('SYJ needs javascript. Please activate scripts in your browser.');?></p>
9 </noscript>
10
11 <div id="map"></div>
12 <div id="map-overlay"></div>
13
14 <?php
15 $message = "";
16 $msgclass = "";
17 if ($this->errorMsg) {
18     $message .= $this->errorMsg;
19     $msgclass = "error";
20 } else if (!$this->path and !$this->loggedUser) {
21     $message .= $this->translate('To create a journey, press <strong>"start a route"</strong> button, then click on the map to add points. To delete a point, hold shift pressed while clicking on it.');
22     $message .= "<br>";
23     $message .= $this->translate('You can zoom and move the map with the controls in the top left corner.');
24     $message .= "<br>";
25     $message .= $this->translate('When you have finished a path, press "create", button.');
26     $msgclass = "info optional";
27 }
28 ?>
29
30 <div id="message" class="message <?php echo $msgclass?>">
31     <?php echo $message ?>
32 </div>
33
34
35 <div id="path-length" class="menu-group">
36     <div id="path-length-title" class="info-title"><?php echo $this->translate('route length')?></div>
37     <div id="path-length-content">
38     </div>
39 </div>
40
41 <div id="menu">
42
43     <?php echo $this->localeSwitcher(); ?>
44
45     <div id="login_controls" class="menu-group">
46         <div>
47             <div class="menu-item">
48             <?php
49                 echo $this->anchor('login', $this->translate('login'), array('id' => 'login_control_anchor'));
50                 $anchortext = sprintf("<span id=\"account-create-anchor\">%s</span><span id=\"account-info\"><br>%s</span>",
51                                       $this->translate('create an account'),
52                                       $this->translate('Whith an account, you can manage and modify your routes'));
53                 ?>
54                </div>
55                <div class="menu-item">
56                <?php
57                 echo $this->anchor('', $anchortext, array('id' => 'user_control_anchor'), false);
58             ?>
59             </div>
60         </div>
61         <div>
62             <?php echo $this->logoutLink(); ?>
63         </div>
64     </div>
65
66     <?php if (isset($this->path)) { ?>
67         <div id="path-infos" class="menu-group">
68             <div class="menu-item">
69                 <div id="path-infos-toggler"><a href="" id="path-infos-anchor"><?php echo $this->translate("route infos")?></a></div>
70              </div>
71                 <div id="path-infos-content" class="menu-item">
72
73                     <div id="path-directlink-title" class="info-title"><?php echo $this->translate("direct link")?></div>
74                     <div id="path-directlink-content"><?php
75                             $serverUrl = rtrim($this->serverUrl(), '/');
76                             $baseUrl = trim($this->baseUrl(), '/');
77                             $fullBaseUrl = $serverUrl . '/' . ($baseUrl ? ($baseUrl . '/'): '');
78                             $urlcomp = urlencode($this->path->urlcomp ?: $this->path->id);
79                             $href = $fullBaseUrl . 'idx/' . $urlcomp . '?format=raw';
80                             printf('<a href="%s" title="%s">%s</a>',
81                                         $href,
82                                         $this->translate('direct link'),
83                                         $this->escape($href));
84                         ?></div>
85
86                     <div id="path-export-title" class="info-title"><?php echo $this->translate("export")?></div>
87                     <div id="path-export-content"><?php
88                        $href = $fullBaseUrl . 'geom/' . rawurlencode($this->path->displayTitle) . '.kml';
89                        printf('<a href="%s" title="%s">%s</a>',
90                                         $href,
91                                         $this->translate('kml export'),
92                                         $this->translate('kml export'));
93
94                         print '<br>';
95                        $href = $fullBaseUrl . 'geom/' . rawurlencode($this->path->displayTitle) . '.gpx';
96                        printf('<a href="%s" title="%s">%s</a>',
97                                         $href,
98                                         $this->translate('gpx export'),
99                                         $this->translate('gpx export'));
100                        ?>
101
102
103                 </div>
104             </div>
105         </div>
106     <?php }?>
107
108     <div id="data_controls">
109         <div id="data_controls_btns">
110
111     <?php if (isset($this->path)) { ?>
112         <input id="clone-btn" name="clone-btn" type="button" value="<?php echo $this->translate('duplicate');?>">
113         <br>
114         <input id="edit-btn" name="edit-btn" type="button" value="<?php echo $this->translate('edit');?>">
115     <?php } else {?>
116
117         <form id="nominatim-form" action="nominatim" method="get">
118             <div><a id="nominatim-label" href=""><?php echo $this->translate('Search a place')?></a></div>
119             <div id="nominatim-message" class="message"></div>
120             <div id="nominatim-controls">
121             <input name="nominatim-search" id="nominatim-search">
122             <input type="submit" id="nominatim-submit" name="nominatim-submit" value="<?php echo $this->translate('Ok')?>">
123             <img id="nominatim-throbber" src="icons/throbber.gif">
124             </div>
125
126         </form>
127
128         <input id="create-btn" name="create-btn" type="button" value="<?php echo $this->translate('start a route');?>">
129     <?php } ?>
130         </div>
131
132     <?php
133         print $this->geomform;
134     ?>
135
136 </div>
137
138 <?php if (!isset($this->path)) {?>
139             <div id="nominatim-suggestions">
140             <div id="nominatim-suggestions-title"><?php echo $this->translate('more results')?></div>
141             <ul id="nominatim-suggestions-list"></ul>
142             </div>
143 <?php }?>
144
145
146 </div>
147
148 <div id="newpwd_area" class="modal">
149     <div id="newpwd_message" class="message"></div>
150     <?php
151         print $this->newpwdform;
152     ?>
153 </div>
154
155 <div id="user_area" class="modal">
156     <div id="user_message" class="message"></div>
157     <?php
158         print $this->userform;
159     ?>
160 </div>
161
162 <div id="login_area" class="modal">
163    <div id="login_message" class="message"></div>
164
165 <?php
166   print $this->loginform;
167 ?>
168
169 <p id="login_area_create"><a id="login_area_create_anchor" href=""><?php echo $this->translate('create an account')?></a></p>
170
171 </div>
172
173 <div id="termsofusearea" class="modal">
174   <iframe id="termsofuseiframe" width="100%" height="100%" frameborder="0"></iframe>
175 </div>