Commit 8b502bb8 authored by Valéry Febvre's avatar Valéry Febvre

Move Maps stuffs in a specific view

parent 814da1a7
......@@ -84,10 +84,10 @@ def main(global_config, **settings):
config.add_route('data', '/data')
config.add_route('help', '/help')
config.add_route('map_sim', '/map/sim')
config.add_route('map_reg', '/map/reg')
config.add_route('map_dep', '/map/dep')
config.add_route('map_offers', '/map/offers')
config.add_route('maps.sim', '/maps/sim')
config.add_route('maps.reg', '/maps/reg')
config.add_route('maps.dep', '/maps/dep')
config.add_route('maps.offers', '/maps/offers')
config.add_route('feed', '/feed') #rss last updates
......
#map {
height: 700px;
margin-bottom: 20px;
}
body {
/*padding-top: 60px;*/
}
.footer {
padding: 35px 0 36px;
border-top: 1px solid #e5e5e5;
}
.footer p {
margin-bottom: 0;
color: #555;
}
.jumbotron img {
float: left;
margin-right: 8px;
}
#map {
height: 700px;
margin-bottom: 20px;
}
......@@ -7,43 +7,42 @@ import markdown
${parent.head()}
<link rel="stylesheet" href="http://cdn.comarquage.fr/leaflet/latest/leaflet.css">
<link rel="stylesheet" href="${request.static_path('passim:static/css/site.css')}">
<link rel="stylesheet" href="${request.static_path('passim:static/css/maps.css')}">
</%def>
${parent.page_header()}
<div class="container">
<p class="lead">${_(u"PASSIM : Indicators by département")}</p>
<p>
${_("This map is produced with data updated every day on")}
<br>
<a href="${request.host_url}/acces_donnees">${request.host_url}/acces_donnees</a>
</p>
<p>
${_(u"Click on a département to display the indicators :")}
<ul>
<li>${_("Name")}: ex. NIEVRE</li>
<li>nboffres: nombre d'offres de transport référencées dans Passim pour ce département</li>
<li>ntcu: ${_(" number of urban transport agencies")}</li>
<li>nsi: ${_("number of info services")}</li>
<li>nweb: ${_("number of web sites")}</li>
<li>nmob: ${_("number of mobile apps")}</li>
<li>ngui: ${_("number of info booth")}</li>
<li>noda: ${_("number of Open Data portals")}</li>
<li>nsim: ${_("number of Multimodal Information Systems")}"</li>
</ul>
</p>
<p class="lead">${_(u"PASSIM : Indicators by département")}</p>
<p>
${_("This map is produced with data updated every day on")}
<br>
<a href="${request.host_url}/acces_donnees">${request.host_url}/acces_donnees</a>
</p>
<p>
${_(u"Click on a département to display the indicators :")}
<ul>
<li>${_("Name")}: ex. NIEVRE</li>
<li>nboffres: nombre d'offres de transport référencées dans Passim pour ce département</li>
<li>ntcu: ${_(" number of urban transport agencies")}</li>
<li>nsi: ${_("number of info services")}</li>
<li>nweb: ${_("number of web sites")}</li>
<li>nmob: ${_("number of mobile apps")}</li>
<li>ngui: ${_("number of info booth")}</li>
<li>noda: ${_("number of Open Data portals")}</li>
<li>nsim: ${_("number of Multimodal Information Systems")}"</li>
</ul>
</p>
<div id="map"></div>
<div id="map"></div>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
$(function () {
// Configuration de la carte
var map = new L.Map('map');
......@@ -67,4 +66,4 @@ $(function () {
informationServiceByDepartmentLayer.addKML("${request.host_url}/donnees/kml/tabdep.kml");
map.addLayer(informationServiceByDepartmentLayer);
});
</script>
</script>
......@@ -6,34 +6,32 @@ import markdown
<%def name="head()">
${parent.head()}
<link rel="stylesheet" href="http://cdn.comarquage.fr/leaflet/latest/leaflet.css">
<link rel="stylesheet" href="${request.static_path('passim:static/css/site.css')}">
<link rel="stylesheet" href="${request.static_path('passim:static/css/maps.css')}">
</%def>
${parent.page_header()}
<div class="container">
<p class="lead">${_("A Map of transport services in France")}</p>
<p>
${_("Click on the white square in upper right corner and choose the transport type (urban, departmental, regional public transit, flexible on-demand transport, para-transit , school transport, bicycle services, car-sharing, ride-sharing, parking airports, ports...) and see the corresponding offers on the map.")}
<br>
${_("This map is produced with data updated every day on")}
<a href="/acces_donnees">${request.host_url}/acces_donnees</a>.
</p>
<p>
${_("Initial data loading may be a little slow...")}<br>
</p>
<p class="lead">${_("A Map of transport services in France")}</p>
<p>
${_("Click on the white square in upper right corner and choose the transport type (urban, departmental, regional public transit, flexible on-demand transport, para-transit , school transport, bicycle services, car-sharing, ride-sharing, parking airports, ports...) and see the corresponding offers on the map.")}
<br>
${_("This map is produced with data updated every day on")}
<a href="/acces_donnees">${request.host_url}/acces_donnees</a>.
</p>
<p>
${_("Initial data loading may be a little slow...")}<br>
</p>
<div id="map"></div>
</div>
<div id="map"></div>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
$(function () {
// Configuration de la carte
var map = new L.Map('map');
......@@ -88,4 +86,4 @@ $(function () {
map.addControl(layerControl);
});
</script>
</script>
......@@ -7,44 +7,42 @@ import markdown
${parent.head()}
<link rel="stylesheet" href="http://cdn.comarquage.fr/leaflet/latest/leaflet.css">
<link rel="stylesheet" href="${request.static_path('passim:static/css/site.css')}">
<link rel="stylesheet" href="${request.static_path('passim:static/css/maps.css')}">
</%def>
${parent.page_header()}
<div class="container">
<p class="lead">${_("PASSIM : Indicators by region")}</p>
<p>
${_("This map is produced with data updated every day on")}
<br>
<a href="/acces_donnees">${request.host_url}/acces_donnees</a>
</p>
<p>
${_(u"Click on a région to display the indicators :")}
<ul>
<li>${_(u"Nom de la région")}: ex. BRETAGNE</li>
<li>nboffres: ${_("number of transit agencies")}</li>
<li>ntcu: ${_("number of urban transport agencies")}</li>
<li>nsi: ${_(" number of info services")}</li>
<li>nweb: ${_("number of web sites")}</li>
<li>nmob: ${_("number of mobile apps")}</li>
<li>ngui: ${_("number of info booth")}</li>
<li>noda: ${_("number of Open Data portals")}</li>
<li>nsim: ${_("number of Multimodal Information Systems")}"</li>
</ul>
</p>
<p class="lead">${_("PASSIM : Indicators by region")}</p>
<p>
${_("This map is produced with data updated every day on")}
<br>
<a href="/acces_donnees">${request.host_url}/acces_donnees</a>
</p>
<p>
${_(u"Click on a région to display the indicators :")}
<ul>
<li>${_(u"Nom de la région")}: ex. BRETAGNE</li>
<li>nboffres: ${_("number of transit agencies")}</li>
<li>ntcu: ${_("number of urban transport agencies")}</li>
<li>nsi: ${_(" number of info services")}</li>
<li>nweb: ${_("number of web sites")}</li>
<li>nmob: ${_("number of mobile apps")}</li>
<li>ngui: ${_("number of info booth")}</li>
<li>noda: ${_("number of Open Data portals")}</li>
<li>nsim: ${_("number of Multimodal Information Systems")}"</li>
</ul>
</p>
<div id="map"></div>
</div>
<div id="map"></div>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
$(function () {
// Configuration de la carte
var map = new L.Map('map');
......@@ -69,4 +67,4 @@ $(function () {
map.addLayer(informationServiceByRegionLayer);
map.addLayer(osmLayer);
});
</script>
</script>
......@@ -6,32 +6,30 @@ import markdown
<%def name="head()">
${parent.head()}
<link rel="stylesheet" href="http://cdn.comarquage.fr/leaflet/latest/leaflet.css">
<link rel="stylesheet" href="${request.static_path('passim:static/css/site.css')}">
<link rel="stylesheet" href="${request.static_path('passim:static/css/maps.css')}">
</%def>
${parent.page_header()}
<div class="container">
<p class="lead">${_(u'PASSIM : a map of multimodale info systems (MIS) in France')}</p>
<p>
${_("A MIS is an information service which includes at least the complete (multi-agency) public transport offer over a territory and a route planner.")}
<br>
${_("This map is produced with data updated every day on")}
<br>
<a href="${request.host_url}/acces_donnees">${request.host_url}/acces_donnees</a>.
</p>
<div id="map"></div>
</div>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
<p class="lead">${_(u'PASSIM : a map of multimodale info systems (MIS) in France')}</p>
<p>
${_("A MIS is an information service which includes at least the complete (multi-agency) public transport offer over a territory and a route planner.")}
<br>
${_("This map is produced with data updated every day on")}
<br>
<a href="${request.host_url}/acces_donnees">${request.host_url}/acces_donnees</a>.
</p>
<div id="map"></div>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.js"></script>
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://cdn.comarquage.fr/leaflet/latest/leaflet.ie.js"></script>
<![endif]-->
<script src="${request.static_path('passim:static/js/map.js')}"></script>
<script type='text/javascript'>
$(function () {
// Configuration de la carte
var map = new L.Map('map');
......@@ -56,4 +54,4 @@ $(function () {
map.addLayer(simLayer);
map.addLayer(osmLayer);
});
</script>
</script>
......@@ -93,16 +93,24 @@ from passim.resources import UsersResource
<li class="${u'active' if route_name == 'help' else u''}">
<a href="${request.route_path('help')}">${_('Help')}</a>
</li>
<li class="dropdown">
<li class="dropdown${u' active' if route_name.startswith('maps') else u''}">
<a href="#" class="dropdown-toggle" id="maps-menu" data-toggle="dropdown">
${_('Maps')} <span class="caret"></span>
</a>
<ul class="dropdown-menu" aria-labelledby="maps-menu">
<li><a href="${request.route_path('map_sim')}">${_('Multimodal Information Services')}</a></li>
<li><a href="${request.route_path('map_reg')}">${_('Indicators by Regions')}</a></li>
<li><a href="${request.route_path('map_dep')}">${_('Indicators by Departments')}</a></li>
<li class="${u'active' if route_name == 'maps.sim' else u''}">
<a href="${request.route_path('maps.sim')}">${_('Multimodal Information Services')}</a>
</li>
<li class="${u'active' if route_name == 'maps.reg' else u''}">
<a href="${request.route_path('maps.reg')}">${_('Indicators by Regions')}</a>
</li>
<li class="${u'active' if route_name == 'maps.dep' else u''}">
<a href="${request.route_path('maps.dep')}">${_('Indicators by Departments')}</a>
</li>
<li class="divider"></li>
<li><a href="${request.route_path('map_offers')}">${_('Transport Offers')}</a></li>
<li class="${u'active' if route_name == 'maps.offers' else u''}">
<a href="${request.route_path('maps.offers')}">${_('Transport Offers')}</a>
</li>
</ul>
</li>
</ul>
......
......@@ -224,26 +224,6 @@ def index(request):
return HTTPFound(location=request.route_path('accueil'))
@view_config(route_name='map_dep', renderer='/map_dep.mako')
def map_dep(request):
return dict()
@view_config(route_name='map_offers', renderer='/map_offers.mako')
def map_offers(request):
return dict()
@view_config(route_name='map_reg', renderer='/map_reg.mako')
def map_reg(request):
return dict()
@view_config(route_name='map_sim', renderer='/map_sim.mako')
def map_sim(request):
return dict()
@view_config(route_name='organismes', renderer='/organismes.mako')
def organismes(request):
_ = request.translate
......
# -*- coding: utf-8 -*-
# Passim -- Annuaire de services d'information transport en France
# By: Pierre Arnaud <parnaud@easter-eggs.com>
# Valéry Febvre <vfebvre@easter-eggs.com>
#
# Copyright (C) 2015 Easter-eggs
# @app_url@
#
# This file is part of Passim.
#
# Passim 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.
#
# Passim 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/>.
import logging
from pyramid.view import view_config
log = logging.getLogger(__name__)
@view_config(route_name='maps.dep', renderer='/maps/dep.mako')
def dep(request):
return dict()
@view_config(route_name='maps.offers', renderer='/maps/offers.mako')
def offers(request):
return dict()
@view_config(route_name='maps.reg', renderer='/maps/reg.mako')
def reg(request):
return dict()
@view_config(route_name='maps.sim', renderer='/maps/sim.mako')
def sim(request):
return dict()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment