<commit_before>## -*- coding: utf-8 -*-


## Etalage -- Open Data POIs portal
## By: <NAME> <<EMAIL>>
##     <NAME> <<EMAIL>>
##
## Copyright (C) 2011 Easter-eggs
## http://gitorious.org/infos-pratiques/etalage
##
## This file is part of Etalage.
##
## Etalage is free software; you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public License as
## published by the Free Software Foundation, either version 3 of the
## License, or (at your option) any later version.
##
## Etalage is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Affero General Public License for more details.
##
## You should have received a copy of the GNU Affero General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.


<%!
from etalage import conf
%>


<%inherit file="/index.mako"/>


<%def name="css()" filter="trim">
    <%parent:css/>
    <link rel="stylesheet" href="${conf['leaflet.css']}">
<!--[if lte IE 8]>
    <link rel="stylesheet" href="${conf['leaflet.ie.css']}">
<![endif]-->
</%def>


<%def name="results()" filter="trim">
    % if errors is None:
        % if pager.item_count == 0:
        <div>
            <em>Aucun organisme trouvé.</em>
        </div>
        % else:
        <div>
            Organismes ${pager.first_item_number} à ${pager.last_item_number} sur ${pager.item_count}
        </div>
        % endif
        <%self:pagination/>
    % endif
    <div id="map" style="height: 400px;"></div>
    % if errors is None:
        <%self:pagination/>
    % endif
</%def>


<%def name="scripts()" filter="trim">
    <%parent:scripts/>
    <script src="${conf['leaflet.js']}"></script>
<!--[if lt IE 10]>
    <script src="${conf['pie.js']}"></script>
<![endif]-->
    <script src="/js/map.js"></script>
    <script>
    % if territory is not None and territory.geo is not None:
etalage.map.center = new L.LatLng(${territory.geo[0] | n, js}, ${territory.geo[1] | n, js});
    % endif
etalage.map.geojsonParams = ${dict(
    (name, value)
    for name, value in params.iteritems()
    if name not in ('bbox', 'context', 'jsonp') and value is not None
    )| n, js};
etalage.map.geojsonUrl = '/api/v1/annuaire/geojson';
etalage.map.markersUrl = ${conf['markers_url'].rstrip('/') | n, js};<commit_msg>Reset page number when moving map.<commit_after>## -*- coding: utf-8 -*-


## Etalage -- Open Data POIs portal
## By: <NAME> <<EMAIL>>
##     <NAME> <<EMAIL>>
##
## Copyright (C) 2011 Easter-eggs
## http://gitorious.org/infos-pratiques/etalage
##
## This file is part of Etalage.
##
## Etalage is free software; you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public License as
## published by the Free Software Foundation, either version 3 of the
## License, or (at your option) any later version.
##
## Etalage is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Affero General Public License for more details.
##
## You should have received a copy of the GNU Affero General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.


<%!
from etalage import conf
%>


<%inherit file="/index.mako"/>


<%def name="css()" filter="trim">
    <%parent:css/>
    <link rel="stylesheet" href="${conf['leaflet.css']}">
<!--[if lte IE 8]>
    <link rel="stylesheet" href="${conf['leaflet.ie.css']}">
<![endif]-->
</%def>


<%def name="results()" filter="trim">
    % if errors is None:
        % if pager.item_count == 0:
        <div>
            <em>Aucun organisme trouvé.</em>
        </div>
        % else:
        <div>
            Organismes ${pager.first_item_number} à ${pager.last_item_number} sur ${pager.item_count}
        </div>
        % endif
        <%self:pagination/>
    % endif
    <div id="map" style="height: 400px;"></div>
    % if errors is None:
        <%self:pagination/>
    % endif
</%def>


<%def name="scripts()" filter="trim">
    <%parent:scripts/>
    <script src="${conf['leaflet.js']}"></script>
<!--[if lt IE 10]>
    <script src="${conf['pie.js']}"></script>
<![endif]-->
    <script src="/js/map.js"></script>
    <script>
    % if territory is not None and territory.geo is not None:
etalage.map.center = new L.LatLng(${territory.geo[0] | n, js}, ${territory.geo[1] | n, js});
    % endif
etalage.map.geojsonParams = ${dict(
    (name, value)
    for name, value in params.iteritems()
    if name not in ('bbox', 'context', 'page', 'jsonp') and value is not None
    )| n, js};
etalage.map.geojsonUrl = '/api/v1/annuaire/geojson';
etalage.map.markersUrl = ${conf['markers_url'].rstrip('/') | n, js};
{'fraction_non_alphanumeric': 0.17604617604617603, 'fraction_numerical': 0.006596578025149453, 'mean_word_length': 3.2711267605633805, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6313433', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1566, 'n_words': 501}