Separate table page and map page
[infos-pratiques:etalage.git] / poiscasse / templates / map.mako
1 ## -*- coding: utf-8 -*-
2
3
4 ## PoisCasse -- Open Data POIs portal
5 ## By: Emmanuel Raviart <eraviart@easter-eggs.com>
6 ##     Romain Soufflet <rsoufflet@easter-eggs.com>
7 ##
8 ## Copyright (C) 2011 Easter-eggs
9 ## http://gitorious.org/infos-pratiques/poiscasse
10 ##
11 ## This file is part of PoisCasse.
12 ##
13 ## PoisCasse is free software; you can redistribute it and/or modify
14 ## it under the terms of the GNU Affero General Public License as
15 ## published by the Free Software Foundation, either version 3 of the
16 ## License, or (at your option) any later version.
17 ##
18 ## PoisCasse is distributed in the hope that it will be useful,
19 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 ## GNU Affero General Public License for more details.
22 ##
23 ## You should have received a copy of the GNU Affero General Public License
24 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
25
26
27 <%inherit file="/site.mako"/>
28
29
30 <fieldset>
31     <form action="/" method="get">
32         <label for="category">Catégorie</label>
33         <input id="category" name="category" type="text" value="${category if category else ''}">
34
35         <br>
36
37         <label for="term">Text libre</label>
38         <input id="term" name="term" type="text" value="${term if term else ''}">
39
40         <br>
41
42 <%
43     postal_distribution = u'{pd[0]} {pd[1]}'.format(pd = ctx.postal_distribution) if ctx.postal_distribution else u''
44 %>
45         <label for="territory">Territoire</label>
46         <input id="territory" name="territory" type="text" value="${postal_distribution}">
47
48         <br>
49
50         <input id="submit" name="submit" type="submit" value"Rechercher">
51     </form>
52 </fieldset>
53
54 <div>
55     Résultat de ${((page_number - 1) * page_size) + 1} à ${page_number * page_size} <br>
56     Nombre de résultat par page : ${page_size}
57     % if page_number > 1:
58     <a href='/map?page=${page_number - 1}'>Précédent</a>
59     % endif
60     % if page_number < pois_count / page_size:
61     <a href='/map?page=${page_number + 1}'>Suivant</a>
62     % endif
63     <a href='/list?page=${page_number}'>Voir dans une liste</a>
64 </div>
65
66 <div id="map" style="height: 400px;">
67 </div>
68