From bdb174866b7b8738ed70e530a992767ae863be3e Mon Sep 17 00:00:00 2001 From: Joaquim Nallar Date: Thu, 19 Dec 2024 23:00:23 +0100 Subject: [PATCH] feat: change 'commune' to 'area' to have different 'geometry' page (#545) --- atlas/atlasAPI.py | 24 ++--- atlas/atlasRoutes.py | 41 +++++---- atlas/configuration/config.py.example | 4 +- atlas/configuration/settings.ini.sample | 17 ++-- atlas/messages.pot | 2 +- atlas/modeles/entities/tCommunes.py | 2 +- atlas/modeles/entities/t_zoning.py | 27 ++++++ atlas/modeles/entities/vmCommunes.py | 23 ----- .../repositories/tCommunesRepository.py | 6 +- .../modeles/repositories/tZonesRepository.py | 83 ++++++++++++++++++ .../repositories/vmCommunesRepository.py | 80 ----------------- .../vmObservationsMaillesRepository.py | 20 ++--- .../repositories/vmObservationsRepository.py | 26 +++--- .../repositories/vmTaxonsRepository.py | 13 +-- atlas/static/css/index.css | 2 +- atlas/static/custom/maps-custom.js.sample | 4 +- .../custom/templates/navbar.html.sample | 10 +-- .../templates/presentation.html.example | 12 +-- atlas/static/main.js | 16 ++-- atlas/static/mapAreas.js | 16 ++-- atlas/static/mapGenerator.js | 30 +++---- atlas/templates/areaSheet/_main.html | 27 +----- atlas/templates/core/listTaxons.html | 2 +- atlas/templates/home/globalStats.html | 10 +-- atlas/templates/speciesSheet/map.html | 4 +- .../speciesSheet/otherInformations.html | 16 ++-- atlas/translations/en/LC_MESSAGES/messages.mo | Bin 5802 -> 5794 bytes atlas/translations/en/LC_MESSAGES/messages.po | 4 +- atlas/translations/fr/LC_MESSAGES/messages.mo | Bin 6199 -> 6196 bytes atlas/translations/fr/LC_MESSAGES/messages.po | 14 +-- atlas/translations/it/LC_MESSAGES/messages.mo | Bin 6054 -> 6052 bytes atlas/translations/it/LC_MESSAGES/messages.po | 4 +- data/atlas/11.vm_cor_area_synthese.sql | 45 ++++++++++ data/atlas/12.atlas.t_mailles_territoire.sql | 2 +- data/atlas/14.grant.sql | 2 +- data/atlas/2.atlas.vm_observations.sql | 4 +- data/atlas/7.atlas.vm_communes.sql | 12 --- data/atlas/7.atlas.zoning.sql | 33 +++++++ data/atlas/8.atlas.vm_medias.sql | 3 +- data/atlas/without_geonature.sql | 10 +-- data/atlas_with_extended_areas.sql | 2 +- data/gn2/atlas_ref_geo.sql | 12 +-- data/gn2/atlas_synthese.sql | 2 +- docker_install_atlas_schema.sh | 4 +- docs/changelog.rst | 1 + docs/installation.rst | 6 +- docs/vues_materialisees_maj.rst | 2 +- install_db.sh | 4 +- 48 files changed, 367 insertions(+), 316 deletions(-) create mode 100644 atlas/modeles/entities/t_zoning.py delete mode 100644 atlas/modeles/entities/vmCommunes.py create mode 100644 atlas/modeles/repositories/tZonesRepository.py delete mode 100644 atlas/modeles/repositories/vmCommunesRepository.py create mode 100644 data/atlas/11.vm_cor_area_synthese.sql delete mode 100644 data/atlas/7.atlas.vm_communes.sql create mode 100644 data/atlas/7.atlas.zoning.sql diff --git a/atlas/atlasAPI.py b/atlas/atlasAPI.py index b239c3381..fb8e1ce66 100644 --- a/atlas/atlasAPI.py +++ b/atlas/atlasAPI.py @@ -8,7 +8,7 @@ vmObservationsRepository, vmObservationsMaillesRepository, vmMedias, - vmCommunesRepository, + tZonesRepository, ) from atlas.env import cache, db @@ -25,12 +25,12 @@ def searchTaxonAPI(): return jsonify(results) -@api.route("/searchCommune", methods=["GET"]) -def searchCommuneAPI(): +@api.route("/searchZone", methods=["GET"]) +def searchZoneAPI(): session = db.session search = request.args.get("search", "") limit = request.args.get("limit", 50) - results = vmCommunesRepository.searchMunicipalities(session, search, limit) + results = tZonesRepository.searchMunicipalities(session, search, limit) session.close() return jsonify(results) @@ -110,21 +110,21 @@ def getObservationsGenericApi(cd_ref: int): if not current_app.config["AFFICHAGE_MAILLE"]: - @api.route("/observations//", methods=["GET"]) - def getObservationsCommuneTaxonAPI(insee, cd_ref): + @api.route("/observations//", methods=["GET"]) + def getObservationsZoneTaxonAPI(id_zone, cd_ref): connection = db.engine.connect() - observations = vmObservationsRepository.getObservationTaxonCommune( - connection, insee, cd_ref + observations = vmObservationsRepository.getObservationTaxonZone( + connection, id_zone, cd_ref ) connection.close() return jsonify(observations) -@api.route("/observationsMaille//", methods=["GET"]) -def getObservationsCommuneTaxonMailleAPI(insee, cd_ref): +@api.route("/observationsMaille//", methods=["GET"]) +def getObservationsZoneTaxonMailleAPI(id_zone, cd_ref): connection = db.engine.connect() - observations = vmObservationsMaillesRepository.getObservationsTaxonCommuneMaille( - connection, insee, cd_ref + observations = vmObservationsMaillesRepository.getObservationsTaxonZoneMaille( + connection, id_zone, cd_ref ) connection.close() return jsonify(observations) diff --git a/atlas/atlasRoutes.py b/atlas/atlasRoutes.py index 21b95163d..deb283abd 100644 --- a/atlas/atlasRoutes.py +++ b/atlas/atlasRoutes.py @@ -18,7 +18,7 @@ from atlas.env import db from atlas import utils -from atlas.modeles.entities import vmTaxons, vmCommunes +from atlas.modeles.entities import vmTaxons, t_zoning from atlas.modeles.repositories import ( vmOrganismsRepository, vmTaxonsRepository, @@ -26,7 +26,7 @@ vmAltitudesRepository, vmMoisRepository, vmTaxrefRepository, - vmCommunesRepository, + tZonesRepository, vmObservationsMaillesRepository, vmMedias, vmCorTaxonAttribut, @@ -125,9 +125,9 @@ def ficheOrganism(id_organism): @main.route( - "/commune/" + current_app.config["REMOTE_MEDIAS_PATH"] + "", methods=["GET", "POST"] + "/zone/" + current_app.config["REMOTE_MEDIAS_PATH"] + "", methods=["GET", "POST"] ) -def communeMedias(image): +def zoneMedias(image): return redirect( current_app.config["REMOTE_MEDIAS_URL"] + current_app.config["REMOTE_MEDIAS_PATH"] + image ) @@ -227,13 +227,12 @@ def ficheEspece(cd_nom): # Redirect to cd_ref if cd_nom is a synonym. Redirection is better for SEO. if cd_ref != cd_nom: return redirect(url_for(request.endpoint, cd_nom=cd_ref)) - # Get data to render template taxon = vmTaxrefRepository.searchEspece(connection, cd_ref) altitudes = vmAltitudesRepository.getAltitudesChilds(connection, cd_ref) months = vmMoisRepository.getMonthlyObservationsChilds(connection, cd_ref) synonyme = vmTaxrefRepository.getSynonymy(connection, cd_ref) - communes = vmCommunesRepository.getCommunesObservationsChilds(connection, cd_ref) + zone = tZonesRepository.getZonesObservationsChilds(connection, cd_ref) taxonomyHierarchy = vmTaxrefRepository.getAllTaxonomy(db_session, cd_ref) firstPhoto = vmMedias.getFirstPhoto(connection, cd_ref, current_app.config["ATTR_MAIN_PHOTO"]) photoCarousel = vmMedias.getPhotoCarousel( @@ -275,7 +274,7 @@ def ficheEspece(cd_nom): altitudes=altitudes, months=months, synonyme=synonyme, - communes=communes, + zone=zone, taxonomyHierarchy=taxonomyHierarchy, firstPhoto=firstPhoto, photoCarousel=photoCarousel, @@ -287,39 +286,39 @@ def ficheEspece(cd_nom): ) -@main.route("/commune/", methods=["GET", "POST"]) -def ficheCommune(insee): +@main.route("/zone/", methods=["GET", "POST"]) +def ficheZone(id_zone): session = db.session connection = db.engine.connect() - listTaxons = vmTaxonsRepository.getTaxonsCommunes(connection, insee) - commune = vmCommunesRepository.getCommuneFromInsee(connection, insee) + listTaxons = vmTaxonsRepository.getTaxonsZones(connection, id_zone) + + zone = tZonesRepository.getZoneFromIdZone(connection, id_zone) if current_app.config["AFFICHAGE_MAILLE"]: - observations = vmObservationsMaillesRepository.lastObservationsCommuneMaille( - connection, current_app.config["NB_LAST_OBS"], str(insee) + observations = vmObservationsMaillesRepository.lastObservationsZoneMaille( + connection, current_app.config["NB_LAST_OBS"], str(id_zone) ) else: - observations = vmObservationsRepository.lastObservationsCommune( - connection, current_app.config["NB_LAST_OBS"], insee + observations = vmObservationsRepository.lastObservationsZone( + connection, current_app.config["NB_LAST_OBS"], id_zone ) surroundingAreas = [] - observers = vmObservationsRepository.getObserversCommunes(connection, insee) + observers = vmObservationsRepository.getObserversZone(connection, id_zone) session.close() connection.close() return render_template( "templates/areaSheet/_main.html", - sheetType="commune", surroundingAreas=surroundingAreas, listTaxons=listTaxons, - areaInfos=commune, + areaInfos=zone, observations=observations, observers=observers, DISPLAY_EYE_ON_LIST=True, - insee=insee, + id_zone=id_zone, ) @@ -420,10 +419,10 @@ def sitemap(): pages.append([url, modified_time]) municipalities = ( - session.query(vmCommunes.VmCommunes).order_by(vmCommunes.VmCommunes.insee).all() + session.query(vmZones.t_zoning).order_by(vmZones.t_zoning.id_code).all() ) for municipalitie in municipalities: - url = url_root + url_for("main.ficheCommune", insee=municipalitie.insee) + url = url_root + url_for("main.ficheZone", id_code=municipalitie.id_code) modified_time = ten_days_ago pages.append([url, modified_time]) diff --git a/atlas/configuration/config.py.example b/atlas/configuration/config.py.example index bd7da925e..25429c635 100644 --- a/atlas/configuration/config.py.example +++ b/atlas/configuration/config.py.example @@ -142,7 +142,7 @@ NB_DAY_LAST_OBS = '7' # Texte à afficher pour décrire la cartographie des 'dernières observations' TEXT_LAST_OBS = 'Les observations des agents ces 7 derniers jours |' -# Carte de la fiche commune : nombre des 'x' dernières observations affichées +# Carte de la fiche "zone" : nombre des 'x' dernières observations affichées NB_LAST_OBS=100 ########################### @@ -237,7 +237,7 @@ ATTR_VIMEO = 9 SPLIT_NOM_VERN = True ############################################ -#### FICHE COMMUNE ET RANG TAXONOMIQUE ##### +#### FICHE "ZONE" ET RANG TAXONOMIQUE ##### ############################################ # Permet d'afficher ou non les colonnes Protection et/ou Patrimonialité/Enjeux dans les listes de taxons diff --git a/atlas/configuration/settings.ini.sample b/atlas/configuration/settings.ini.sample index f8eddf134..8333d4d93 100644 --- a/atlas/configuration/settings.ini.sample +++ b/atlas/configuration/settings.ini.sample @@ -82,18 +82,19 @@ type_territoire="'PEC'" ########### Si ref_geo = False ############# -#### COMMUNES #### +#### ZONE #### -# Creer la table des communes à partir d'un shapefile ? -# Si false, modifiez la creation de 'atlas.vm_communes' dans data/atlas/atlas.vm_communes.sql +# Creer la table des zones à partir d'un shapefile ? +# Si false, modifiez la creation de 'atlas.zoning' dans data/atlas/7.atlas.zoning.sql # PARAMETRE OBSOLETE OBLIGATOIRE SI PAS DE REF_GEO -# import_commune_shp=true +# +import_commune_shp=true -# Chemin et nom des colonnes du SHP des communes du territoire. Laisser tel quel (en modifiant uniquement MYUSERLINUX) -# pour utiliser les communes du PnEcrins par défaut -communes_shp=/home/`whoami`/atlas/data/ref/communes.shp +# Chemin et nom des colonnes du SHP des zones du territoire. Laisser tel quel (en modifiant uniquement MYUSERLINUX) +# pour utiliser les zones du PnEcrins par défaut +zones_shp=/home/`whoami`/atlas/data/ref/zones.shp colonne_insee=insee -colonne_nom_commune=nom_com +colonne_nom_zone=nom_com #### TERRITOIRE #### diff --git a/atlas/messages.pot b/atlas/messages.pot index c36bb800d..791e62a94 100644 --- a/atlas/messages.pot +++ b/atlas/messages.pot @@ -112,7 +112,7 @@ msgstr "" #: static/custom/templates/navbar.html:47 #: static/custom/templates/navbar.html.sample:47 #: templates/home/globalStats.html:55 -msgid "search.city" +msgid "search.zone" msgstr "" #: static/custom/templates/presentation.html:4 diff --git a/atlas/modeles/entities/tCommunes.py b/atlas/modeles/entities/tCommunes.py index db2acb11a..8cbd371fb 100644 --- a/atlas/modeles/entities/tCommunes.py +++ b/atlas/modeles/entities/tCommunes.py @@ -12,6 +12,6 @@ class LCommune(Base): __table_args__ = {"schema": "layers"} insee = Column(String(5), primary_key=True) - commune_maj = Column(String(50)) + area_name = Column(String(50)) commune_min = Column(String(50)) the_geom = Column(Geometry) diff --git a/atlas/modeles/entities/t_zoning.py b/atlas/modeles/entities/t_zoning.py new file mode 100644 index 000000000..3bd0fafeb --- /dev/null +++ b/atlas/modeles/entities/t_zoning.py @@ -0,0 +1,27 @@ +# coding: utf-8 +from geoalchemy2.types import Geometry +from sqlalchemy import Column, MetaData, String, Table, Sequence, Integer, Text +from sqlalchemy.ext.declarative import declarative_base + +from atlas.env import db + +metadata = MetaData() +Base = declarative_base() + + +class t_zoning(Base): + __table__ = Table( + "zoning", + metadata, + Column("id", Sequence('zoning_id_seq'), primary_key=True, unique=True), + Column("id_zone", Integer()), + Column("area_name", String(50)), + Column("the_geom", Geometry("MULTIPOLYGON"), index=True), + Column("zone_geojson", Text), + Column("id_zoning_type", Integer()), + Column("id_parent", Integer()), + schema="atlas", + autoload=True, + autoload_with=db.engine, + ) +# id = Column(Integer, Sequence('user_id_seq'), primary_key=True) diff --git a/atlas/modeles/entities/vmCommunes.py b/atlas/modeles/entities/vmCommunes.py deleted file mode 100644 index 46684589c..000000000 --- a/atlas/modeles/entities/vmCommunes.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 -from geoalchemy2.types import Geometry -from sqlalchemy import Column, MetaData, String, Table -from sqlalchemy.ext.declarative import declarative_base - -from atlas.env import db - -metadata = MetaData() -Base = declarative_base() - - -class VmCommunes(Base): - __table__ = Table( - "vm_communes", - metadata, - Column("insee", String(5), primary_key=True, unique=True), - Column("commune_maj", String(50)), - # Column('commune_min', String(50)), - Column("the_geom", Geometry("MULTIPOLYGON"), index=True), - schema="atlas", - autoload=True, - autoload_with=db.engine, - ) diff --git a/atlas/modeles/repositories/tCommunesRepository.py b/atlas/modeles/repositories/tCommunesRepository.py index bbdd8e6ce..b72eb390e 100644 --- a/atlas/modeles/repositories/tCommunesRepository.py +++ b/atlas/modeles/repositories/tCommunesRepository.py @@ -4,15 +4,15 @@ from sqlalchemy.sql import text -def getCommunesObservationsChilds(connection, cd_ref): +def getZonesObservationsChilds(connection, cd_ref): sql = """ - SELECT DISTINCT(com.insee) AS insee, com.commune_maj + SELECT DISTINCT(com.insee) AS insee, com.area_name FROM layers.l_communes com JOIN atlas.vm_observations obs ON obs.insee = com.insee WHERE obs.cd_ref IN ( SELECT * FROM atlas.find_all_taxons_childs(:thiscdref) ) OR obs.cd_ref = :thiscdref - GROUP BY com.commune_maj, com.insee + GROUP BY com.area_name, com.insee """.encode( "UTF-8" ) diff --git a/atlas/modeles/repositories/tZonesRepository.py b/atlas/modeles/repositories/tZonesRepository.py new file mode 100644 index 000000000..f0ed0a126 --- /dev/null +++ b/atlas/modeles/repositories/tZonesRepository.py @@ -0,0 +1,83 @@ +# -*- coding:utf-8 -*- + +import ast + +from sqlalchemy import distinct +from sqlalchemy.sql import text +from sqlalchemy.sql.expression import func + +from atlas.modeles.entities.t_zoning import t_zoning + + +def getAllZones(session): + req = session.query(distinct(t_zoning.area_name), t_zoning.id_zone).all() + zoneList = list() + for r in req: + temp = {"label": r[0], "value": r[1]} + zoneList.append(temp) + return zoneList + + +def searchMunicipalities(session, search, limit=50): + like_search = "%" + search.replace(" ", "%") + "%" + + query = ( + session.query( + distinct(t_zoning.area_name), + t_zoning.id_zone, + func.length(t_zoning.area_name), + ) + .filter(func.unaccent(t_zoning.area_name).ilike(func.unaccent(like_search))) + .order_by(t_zoning.area_name) + .limit(limit) + ) + results = query.all() + + return [{"label": r[0], "value": r[1]} for r in results] + + +def getZoneFromIdZone(connection, id_zone): + sql = """ + SELECT c.area_name, + c.id_zone, + c.zone_geojson, + bib.type_name + FROM atlas.zoning c + JOIN ref_geo.bib_areas_types bib ON bib.id_type = c.id_zoning_type + WHERE c.id_zone = :thisIdZone + """ + req = connection.execute(text(sql), thisIdZone=id_zone) + zone_obj = dict() + for r in req: + zone_obj = { + "areaName": r.area_name, + "areaCode": str(r.id_zone), + "areaGeoJson": ast.literal_eval(r.zone_geojson), + "typeName": r.type_name + } + return zone_obj + + +def getZonesObservationsChilds(connection, cd_ref): + sql = "SELECT * FROM atlas.find_all_taxons_childs(:thiscdref) AS taxon_childs(cd_nom)" + results = connection.execute(text(sql), thiscdref=cd_ref) + taxons = [cd_ref] + for r in results: + taxons.append(r.cd_nom) + + sql = """ + SELECT DISTINCT + zone.area_name, + zone.id_zone + FROM atlas.vm_observations AS obs + JOIN atlas.zoning AS zone + ON st_intersects(obs.the_geom_point, zone.the_geom_4326) + WHERE obs.cd_ref = ANY(:taxonsList) + ORDER BY zone.area_name ASC + """ + results = connection.execute(text(sql), taxonsList=taxons) + municipalities = list() + for r in results: + municipality = {"id_zone": r.id_zone, "area_name": r.area_name} + municipalities.append(municipality) + return municipalities diff --git a/atlas/modeles/repositories/vmCommunesRepository.py b/atlas/modeles/repositories/vmCommunesRepository.py deleted file mode 100644 index 4c9252489..000000000 --- a/atlas/modeles/repositories/vmCommunesRepository.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding:utf-8 -*- - -import ast - -from sqlalchemy import distinct -from sqlalchemy.sql import text -from sqlalchemy.sql.expression import func - -from atlas.modeles.entities.vmCommunes import VmCommunes - - -def getAllCommunes(session): - req = session.query(distinct(VmCommunes.commune_maj), VmCommunes.insee).all() - communeList = list() - for r in req: - temp = {"label": r[0], "value": r[1]} - communeList.append(temp) - return communeList - - -def searchMunicipalities(session, search, limit=50): - like_search = "%" + search.replace(" ", "%") + "%" - - query = ( - session.query( - distinct(VmCommunes.commune_maj), - VmCommunes.insee, - func.length(VmCommunes.commune_maj), - ) - .filter(func.unaccent(VmCommunes.commune_maj).ilike(func.unaccent(like_search))) - .order_by(VmCommunes.commune_maj) - .limit(limit) - ) - results = query.all() - - return [{"label": r[0], "value": r[1]} for r in results] - - -def getCommuneFromInsee(connection, insee): - sql = """ - SELECT c.commune_maj, - c.insee, - c.commune_geojson - FROM atlas.vm_communes c - WHERE c.insee = :thisInsee - """ - req = connection.execute(text(sql), thisInsee=insee) - communeObj = dict() - for r in req: - communeObj = { - "areaName": r.commune_maj, - "areaCode": str(r.insee), - "areaGeoJson": ast.literal_eval(r.commune_geojson), - } - return communeObj - - -def getCommunesObservationsChilds(connection, cd_ref): - sql = "SELECT * FROM atlas.find_all_taxons_childs(:thiscdref) AS taxon_childs(cd_nom)" - results = connection.execute(text(sql), thiscdref=cd_ref) - taxons = [cd_ref] - for r in results: - taxons.append(r.cd_nom) - - sql = """ - SELECT DISTINCT - com.commune_maj, - com.insee - FROM atlas.vm_observations AS obs - JOIN atlas.vm_communes AS com - ON obs.insee = com.insee - WHERE obs.cd_ref = ANY(:taxonsList) - ORDER BY com.commune_maj ASC - """ - results = connection.execute(text(sql), taxonsList=taxons) - municipalities = list() - for r in results: - municipality = {"insee": r.insee, "commune_maj": r.commune_maj} - municipalities.append(municipality) - return municipalities diff --git a/atlas/modeles/repositories/vmObservationsMaillesRepository.py b/atlas/modeles/repositories/vmObservationsMaillesRepository.py index 3628ed93e..0460dda43 100644 --- a/atlas/modeles/repositories/vmObservationsMaillesRepository.py +++ b/atlas/modeles/repositories/vmObservationsMaillesRepository.py @@ -95,7 +95,7 @@ def lastObservationsMailles(connection, mylimit, idPhoto): return obsList -def lastObservationsCommuneMaille(connection, obs_limit, insee_code): +def lastObservationsZoneMaille(connection, obs_limit, id_zone): sql = """ WITH last_obs AS ( SELECT @@ -103,11 +103,11 @@ def lastObservationsCommuneMaille(connection, obs_limit, insee_code): COALESCE(t.nom_vern || ' | ', '') || t.lb_nom AS display_name, obs.the_geom_point AS l_geom FROM atlas.vm_observations AS obs - JOIN atlas.vm_communes AS c - ON ST_Intersects(obs.the_geom_point, c.the_geom) + JOIN atlas.zoning AS zone + ON ST_Intersects(obs.the_geom_point, zone.the_geom_4326) JOIN atlas.vm_taxons AS t ON obs.cd_ref = t.cd_ref - WHERE c.insee = :inseeCode + WHERE zone.id_zone = :idZoneCode ORDER BY obs.dateobs DESC LIMIT :obsLimit ) @@ -119,7 +119,7 @@ def lastObservationsCommuneMaille(connection, obs_limit, insee_code): GROUP BY l.id_observation, l.cd_ref, l.display_name, m.id_maille, m.geojson_maille ORDER BY l.display_name """ - results = connection.execute(text(sql), inseeCode=insee_code, obsLimit=obs_limit) + results = connection.execute(text(sql), idZoneCode=id_zone, obsLimit=obs_limit) observations = list() for r in results: # taxon = (r.nom_vern + " | " + r.lb_nom) if r.nom_vern else r.lb_nom @@ -135,7 +135,7 @@ def lastObservationsCommuneMaille(connection, obs_limit, insee_code): # Use for API -def getObservationsTaxonCommuneMaille(connection, insee, cd_ref): +def getObservationsTaxonZoneMaille(connection, id_zone, cd_ref): sql = """ SELECT o.cd_ref, @@ -143,15 +143,15 @@ def getObservationsTaxonCommuneMaille(connection, insee, cd_ref): t.geojson_maille, extract(YEAR FROM o.dateobs)::INT AS annee FROM atlas.vm_observations AS o - JOIN atlas.vm_communes AS c - ON ST_INTERSECTS(o.the_geom_point, c.the_geom) + JOIN atlas.zoning AS c + ON ST_INTERSECTS(o.the_geom_point, c.the_geom_4326) JOIN atlas.t_mailles_territoire AS t ON ST_INTERSECTS(t.the_geom, o.the_geom_point) WHERE o.cd_ref = :thiscdref - AND c.insee = :thisInsee + AND c.id_zone = :thisIdZone ORDER BY id_maille """ - observations = connection.execute(text(sql), thisInsee=insee, thiscdref=cd_ref) + observations = connection.execute(text(sql), thisIdZone=id_zone, thiscdref=cd_ref) tabObs = list() for o in observations: temp = { diff --git a/atlas/modeles/repositories/vmObservationsRepository.py b/atlas/modeles/repositories/vmObservationsRepository.py index cf17c55ce..c488cfdb9 100644 --- a/atlas/modeles/repositories/vmObservationsRepository.py +++ b/atlas/modeles/repositories/vmObservationsRepository.py @@ -102,7 +102,7 @@ def lastObservations(connection, mylimit, idPhoto): return obsList -def lastObservationsCommune(connection, mylimit, insee): +def lastObservationsZone(connection, mylimit, id_code): sql = """SELECT o.*, CONCAT( split_part(tax.nom_vern, ',', 1) || ' | ', @@ -111,12 +111,12 @@ def lastObservationsCommune(connection, mylimit, insee): '' ) AS taxon FROM atlas.vm_observations o - JOIN atlas.vm_communes c ON ST_Intersects(o.the_geom_point, c.the_geom) + JOIN atlas.zoning c ON ST_Intersects(o.the_geom_point, c.the_geom_4326) JOIN atlas.vm_taxons tax ON o.cd_ref = tax.cd_ref - WHERE c.insee = :thisInsee + WHERE c.id_code = :thisIdZone ORDER BY o.dateobs DESC LIMIT 100""" - observations = connection.execute(text(sql), thisInsee=insee) + observations = connection.execute(text(sql), thisIdZone=id_code) obsList = list() for o in observations: temp = dict(o) @@ -127,7 +127,7 @@ def lastObservationsCommune(connection, mylimit, insee): return obsList -def getObservationTaxonCommune(connection, insee, cd_ref): +def getObservationTaxonZone(connection, id_zone, cd_ref): sql = """ SELECT o.*, COALESCE(split_part(tax.nom_vern, ',', 1) || ' | ', '') @@ -135,7 +135,7 @@ def getObservationTaxonCommune(connection, insee, cd_ref): o.observateurs FROM ( SELECT * FROM atlas.vm_observations o - WHERE o.insee = :thisInsee AND o.cd_ref = :thiscdref + WHERE o.id_zone = :thisIdZone AND o.cd_ref = :thiscdref ) o JOIN ( SELECT nom_vern, lb_nom, cd_ref @@ -144,7 +144,7 @@ def getObservationTaxonCommune(connection, insee, cd_ref): ) tax ON tax.cd_ref = tax.cd_ref """ - observations = connection.execute(text(sql), thiscdref=cd_ref, thisInsee=insee) + observations = connection.execute(text(sql), thiscdref=cd_ref, thisIdZone=id_zone) obsList = list() for o in observations: temp = dict(o) @@ -207,13 +207,15 @@ def getGroupeObservers(connection, groupe): return observersParser(req) -def getObserversCommunes(connection, insee): +def getObserversZone(connection, id_zone): sql = """ SELECT DISTINCT observateurs - FROM atlas.vm_observations - WHERE insee = :thisInsee + FROM atlas.vm_observations AS obs + JOIN atlas.zoning AS zone + ON ST_Intersects(obs.the_geom_point, zone.the_geom_4326) + WHERE zone.id_zone = :thisIdZone """ - req = connection.execute(text(sql), thisInsee=insee) + req = connection.execute(text(sql), thisIdZone=id_zone) return observersParser(req) @@ -229,7 +231,7 @@ def statIndex(connection): sql = """ SELECT COUNT(*) AS count - FROM atlas.vm_communes + FROM atlas.zoning """ req = connection.execute(text(sql)) for r in req: diff --git a/atlas/modeles/repositories/vmTaxonsRepository.py b/atlas/modeles/repositories/vmTaxonsRepository.py index 664d88f19..912145161 100644 --- a/atlas/modeles/repositories/vmTaxonsRepository.py +++ b/atlas/modeles/repositories/vmTaxonsRepository.py @@ -7,7 +7,7 @@ # With distinct the result in a array not an object, 0: lb_nom, 1: nom_vern -def getTaxonsCommunes(connection, insee): +def getTaxonsZones(connection, id_zone): sql = """ SELECT DISTINCT o.cd_ref, max(date_part('year'::text, o.dateobs)) as last_obs, @@ -16,16 +16,17 @@ def getTaxonsCommunes(connection, insee): m.url, m.chemin, m.id_media FROM atlas.vm_observations o JOIN atlas.vm_taxons t ON t.cd_ref=o.cd_ref + JOIN atlas.zoning zone ON st_intersects(o.the_geom_point, zone.the_geom_4326) LEFT JOIN atlas.vm_medias m ON m.cd_ref=o.cd_ref AND m.id_type={} - WHERE o.insee = :thisInsee + WHERE zone.id_zone = :thisIdZone GROUP BY o.cd_ref, t.nom_vern, t.nom_complet_html, t.group2_inpn, t.patrimonial, t.protection_stricte, m.url, m.chemin, m.id_media ORDER BY nb_obs DESC """.format( current_app.config["ATTR_MAIN_PHOTO"] ) - req = connection.execute(text(sql), thisInsee=insee) - taxonCommunesList = list() + req = connection.execute(text(sql), thisIdZone=id_zone) + taxonZonesList = list() nbObsTotal = 0 for r in req: temp = { @@ -40,9 +41,9 @@ def getTaxonsCommunes(connection, insee): "path": utils.findPath(r), "id_media": r.id_media, } - taxonCommunesList.append(temp) + taxonZonesList.append(temp) nbObsTotal = nbObsTotal + r.nb_obs - return {"taxons": taxonCommunesList, "nbObsTotal": nbObsTotal} + return {"taxons": taxonZonesList, "nbObsTotal": nbObsTotal} def getTaxonsChildsList(connection, cd_ref): diff --git a/atlas/static/css/index.css b/atlas/static/css/index.css index c16a570e1..a93c6e547 100644 --- a/atlas/static/css/index.css +++ b/atlas/static/css/index.css @@ -145,7 +145,7 @@ h3.title-spaced { } #searchTaxonsStat, -#searchCommunesStat { +#searchZonesStat { background-position: right center; background-repeat: no-repeat; background-size: 25px 25px; diff --git a/atlas/static/custom/maps-custom.js.sample b/atlas/static/custom/maps-custom.js.sample index 64e89d5e2..153df10ea 100644 --- a/atlas/static/custom/maps-custom.js.sample +++ b/atlas/static/custom/maps-custom.js.sample @@ -1,6 +1,6 @@ // Fonction style d'affichage des points dans la fiche espèce // Voir documentation leaflet pour customiser davantage l'affichage des points: http://leafletjs.com/reference-1.3.0.html#circlemarker-option -var pointDisplayOptionsFicheEspece = (pointDisplayOptionsFicheCommuneHome = function( +var pointDisplayOptionsFicheEspece = (pointDisplayOptionsFicheZoneHome = function( feature ) { return { @@ -9,7 +9,7 @@ var pointDisplayOptionsFicheEspece = (pointDisplayOptionsFicheCommuneHome = func }); // Légende des points dans la fiche espèce -var divLegendeFicheEspece = (divLegendeFicheCommuneHome = +var divLegendeFicheEspece = (divLegendeFicheZoneHome = '\

\ Dégradées\ diff --git a/atlas/static/custom/templates/navbar.html.sample b/atlas/static/custom/templates/navbar.html.sample index 52f81b9c6..cf2d8945b 100644 --- a/atlas/static/custom/templates/navbar.html.sample +++ b/atlas/static/custom/templates/navbar.html.sample @@ -38,15 +38,15 @@ {% if configuration.MULTILINGUAL %} @@ -79,4 +79,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/atlas/static/custom/templates/presentation.html.example b/atlas/static/custom/templates/presentation.html.example index d96258e19..b7a10cfb5 100644 --- a/atlas/static/custom/templates/presentation.html.example +++ b/atlas/static/custom/templates/presentation.html.example @@ -146,9 +146,9 @@
Generic placeholder image -

Fiches communes

-

Découvrez les espèces observées sur chaque commune du parc national et affichez leurs observations sur la carte de la commune.

-

Exemple »

+

Fiches zones

+

Découvrez les espèces observées sur chaque zone du parc national et affichez leurs observations sur la carte de la zone.

+

Exemple »

Generic placeholder image @@ -241,8 +241,8 @@ Bref, un savoir dynamique à consulter sans modération !

- Fiches par commune
- Pour chacune des 53 communes de l'aire d'adhésion du Parc national, découvrez les espèces observées et affichez leurs localisations, leurs statuts et toutes les informations contenues dans les fiches espèces. + Fiches par zone
+ Pour chacune des 53 zones de l'aire d'adhésion du Parc national, découvrez les espèces observées et affichez leurs localisations, leurs statuts et toutes les informations contenues dans les fiches espèces.

Et aussi
@@ -381,7 +381,7 @@

Silene, plate-forme SINP (Système d'information sur la nature et les paysages), est le portail de données de la région Provence-Alpes-Côte d'Azur.
- Sur ce site qui permet de saisir et de consulter une masse de données très importante, des synthèses des patrimoines flore et faune de la région par commune et par maille sont disponibles. + Sur ce site qui permet de saisir et de consulter une masse de données très importante, des synthèses des patrimoines flore et faune de la région par zone et par maille sont disponibles.

Voir aussi l'homologue pour la région Rhône-Alpes: Le pôle d'information flore et habitats (PIFH). diff --git a/atlas/static/main.js b/atlas/static/main.js index 92fb2f89f..ad21b2bdd 100644 --- a/atlas/static/main.js +++ b/atlas/static/main.js @@ -29,8 +29,8 @@ autocompleteSearch = function(inputID, urlDestination, nbProposal) { var searchUrl; if (urlDestination == "espece") { searchUrl = "/api/searchTaxon"; - } else if (urlDestination == "commune") { - searchUrl = "/api/searchCommune"; + } else if (urlDestination == "zone") { + searchUrl = "/api/searchZone"; } else { searchUrl = "/api/searchArea/"+urlDestination; @@ -62,8 +62,8 @@ autocompleteSearch = function(inputID, urlDestination, nbProposal) { var url = ui.item.value; if (urlDestination == "espece") { location.href = configuration.URL_APPLICATION + language + "/espece/" + url; - } else if (urlDestination == "commune") { - location.href = configuration.URL_APPLICATION + language + "/commune/" + url; + } else if (urlDestination == "zone") { + location.href = configuration.URL_APPLICATION + language + "/zone/" + url; } else { location.href = configuration.URL_APPLICATION + language + "/area/" + urlDestination +"/"+ url; } @@ -88,11 +88,11 @@ $("#searchTaxonsStat").focus(function() { autocompleteSearch("#searchTaxonsStat", "espece", 10); }); -$("#searchCommunes").focus(function() { - autocompleteSearch("#searchCommunes", "commune", 20); +$("#searchZones").focus(function() { + autocompleteSearch("#searchZones", "zone", 20); }); -$("#searchCommunesStat").focus(function() { - autocompleteSearch("#searchCommunesStat", "commune", 10); +$("#searchZonesStat").focus(function() { + autocompleteSearch("#searchZonesStat", "zone", 10); }); diff --git a/atlas/static/mapAreas.js b/atlas/static/mapAreas.js index 1baeb8a15..0dc3532c0 100644 --- a/atlas/static/mapAreas.js +++ b/atlas/static/mapAreas.js @@ -65,7 +65,7 @@ htmlLegend = configuration.AFFICHAGE_MAILLE generateLegende(htmlLegend); function displayObsPreciseBaseUrl() { - if (sheetType === 'commune') { + if (window.location.pathname === `/zone/${areaInfos.areaCode}`) { return configuration.URL_APPLICATION + "/api/observations/" + areaInfos.areaCode } else { return configuration.URL_APPLICATION + "/api/observations/area/" + areaInfos.id_area @@ -96,13 +96,13 @@ function displayObsPreciseBaseUrl(areaCode, cd_ref) { if (configuration.AFFICHAGE_MAILLE) { displayMailleLayerLastObs(observations); } else { - displayMarkerLayerPointCommune(observations); + displayMarkerLayerPointZone(observations); } }); } function displayObsGridBaseUrl() { - if (sheetType === 'commune') { + if (window.location.pathname === `/zone/${areaInfos.areaCode}`) { return configuration.URL_APPLICATION + "/api/observationsMaille/" } else { return configuration.URL_APPLICATION + "/api/observationsMaille/area/" @@ -110,12 +110,12 @@ function displayObsGridBaseUrl() { } // display observation on click -function displayObsTaxon(insee, cd_ref) { +function displayObsTaxon(id_zone, cd_ref) { $.ajax({ url: configuration.URL_APPLICATION + "/api/observations/" + - insee + + id_zone + "/" + cd_ref, dataType: "json", @@ -132,7 +132,7 @@ function displayObsTaxon(insee, cd_ref) { if (configuration.AFFICHAGE_MAILLE) { displayMailleLayerLastObs(observations); } else { - displayMarkerLayerPointCommune(observations); + displayMarkerLayerPointZone(observations); } }); } @@ -164,9 +164,9 @@ function refreshObsArea() { .removeClass("current"); $(this).addClass("current"); if (configuration.AFFICHAGE_MAILLE) { - displayObsTaxonMaille($(this).attr("area-code"), $(this).attr("cdRef")); + displayObsTaxonMaille(this.getAttribute("area-code"), this.getAttribute("cdref")); } else { - displayObsTaxon($(this).attr("area-code"), $(this).attr("cdRef")); + displayObsTaxon(this.getAttribute("area-code"), this.getAttribute("cdref")); } var name = $(this) .find("#name") diff --git a/atlas/static/mapGenerator.js b/atlas/static/mapGenerator.js index c1df79768..445f6b6c7 100644 --- a/atlas/static/mapGenerator.js +++ b/atlas/static/mapGenerator.js @@ -32,7 +32,7 @@ function generateObservationPopup(feature, linkSpecies = false) { /* Génération popup des observations linkSpecies : indique s'il faut ou non rajouter un lien vers la fiche espèce - (cas des fiches communes ; home page) + (cas des fiches zoning ; home page) */ date = new Date(feature.properties.dateobs); popupContent = ` @@ -443,7 +443,7 @@ function displayMarkerLayerFicheEspece( } } -// ***************Fonction lastObservations: mapHome et mapCommune***************** +// ***************Fonction lastObservations: mapHome et mapZone***************** /* *** Point ****/ @@ -452,7 +452,7 @@ function onEachFeaturePointLastObs(feature, layer) { layer.bindPopup(popupContent); } -function onEachFeaturePointCommune(feature, layer) { +function onEachFeaturePointZone(feature, layer) { popupContent = generateObservationPopup(feature, true); layer.bindPopup(popupContent); } @@ -476,8 +476,8 @@ function generateGeojsonPointLastObs(observationsPoint) { function displayMarkerLayerPointLastObs(observationsPoint) { myGeoJson = generateGeojsonPointLastObs(observationsPoint); - if (typeof pointDisplayOptionsFicheCommuneHome == "undefined") { - pointDisplayOptionsFicheCommuneHome = function (feature) { + if (typeof pointDisplayOptionsFicheZoneHome == "undefined") { + pointDisplayOptionsFicheZoneHome = function (feature) { return {}; }; } @@ -487,45 +487,45 @@ function displayMarkerLayerPointLastObs(observationsPoint) { pointToLayer: function (feature, latlng) { return L.circleMarker( latlng, - pointDisplayOptionsFicheCommuneHome(feature) + pointDisplayOptionsFicheZoneHome(feature) ); }, }); map.addLayer(currentLayer); - if (typeof divLegendeFicheCommuneHome !== "undefined") { + if (typeof divLegendeFicheZoneHome !== "undefined") { legend.onAdd = function (map) { var div = L.DomUtil.create("div", "info legend"); - div.innerHTML = divLegendeFicheCommuneHome; + div.innerHTML = divLegendeFicheZoneHome; return div; }; legend.addTo(map); } } -function displayMarkerLayerPointCommune(observationsPoint) { +function displayMarkerLayerPointZone(observationsPoint) { myGeoJson = generateGeojsonPointLastObs(observationsPoint); - if (typeof pointDisplayOptionsFicheCommuneHome == "undefined") { - pointDisplayOptionsFicheCommuneHome = function (feature) { + if (typeof pointDisplayOptionsFicheZoneHome == "undefined") { + pointDisplayOptionsFicheZoneHome = function (feature) { return {}; }; } currentLayer = L.geoJson(myGeoJson, { - onEachFeature: onEachFeaturePointCommune, + onEachFeature: onEachFeaturePointZone, pointToLayer: function (feature, latlng) { return L.circleMarker( latlng, - pointDisplayOptionsFicheCommuneHome(feature) + pointDisplayOptionsFicheZoneHome(feature) ); }, }); map.addLayer(currentLayer); - if (typeof divLegendeFicheCommuneHome !== "undefined") { + if (typeof divLegendeFicheZoneHome !== "undefined") { legend.onAdd = function (map) { var div = L.DomUtil.create("div", "info legend"); - div.innerHTML = divLegendeFicheCommuneHome; + div.innerHTML = divLegendeFicheZoneHome; return div; }; legend.addTo(map); diff --git a/atlas/templates/areaSheet/_main.html b/atlas/templates/areaSheet/_main.html index 128f9b5e2..3106b4d8b 100644 --- a/atlas/templates/areaSheet/_main.html +++ b/atlas/templates/areaSheet/_main.html @@ -2,11 +2,7 @@ {% block title %} {# Personnalisez ici le titre de la page (celui qui est affiché dans l'onglet du navigateur) #} - {% if sheetType =='commune' %} - {{ _('municipality.of') }} {{ areaInfos.areaName }} - {% else %} - {{ areaInfos.typeName }} - {{ areaInfos.areaName }} - {% endif %} + {{ areaInfos.typeName }} - {{ areaInfos.areaName }} {% endblock %} {% block metaTags %} @@ -32,12 +28,6 @@ var configuration = {{configuration|tojson}}; var observations = {{observations|tojson}}; var areaInfos = {{ areaInfos | tojson }}; - var sheetType = {{ sheetType|tojson }}; - var communeArea = false; - if (sheetType === 'commune') { - var communeArea = true; - } - ; var url_limit_territory = "{{url_for('static', filename='custom/territoire.json') }}"; @@ -55,24 +45,15 @@ {% if configuration.EXTENDED_AREAS %} {% include 'templates/areaSheet/surrounding_areas.html' %} {% endif %} - {% if sheetType =='commune' %} -

{{ _('municipality.of') }} {{ areaInfos.areaName }}

- {% else %} -

{{ areaInfos.typeName }} - {{ areaInfos.areaName }}

- {% endif %} +

{{ areaInfos.typeName }} - {{ areaInfos.areaName }}

{% include 'templates/core/statHierarchy.html' %}
{% include 'templates/core/listTaxons.html' %}
- {% if sheetType =='commune' %} -
{{ configuration.NB_LAST_OBS }} {{ _('last.obs.municipality') }} - {{ areaInfos.areaName }}
- {% else %} -
{{ configuration.NB_LAST_OBS }} {{ _('last.obs.zone') }} - {{ areaInfos.areaName }}
- {% endif %} +
{{ configuration.NB_LAST_OBS }} {{ _('last.obs.zone') }} + {{ areaInfos.areaName }}
diff --git a/atlas/templates/core/listTaxons.html b/atlas/templates/core/listTaxons.html index 4e953cb09..814558d51 100644 --- a/atlas/templates/core/listTaxons.html +++ b/atlas/templates/core/listTaxons.html @@ -18,7 +18,7 @@
    {% for taxon in listTaxons.taxons %} -
  • {{ taxon.group2_inpn }} diff --git a/atlas/templates/home/globalStats.html b/atlas/templates/home/globalStats.html index 43dc616ec..8a561957f 100644 --- a/atlas/templates/home/globalStats.html +++ b/atlas/templates/home/globalStats.html @@ -45,16 +45,16 @@

    {{ _('municipalities') }}

    -
diff --git a/atlas/templates/speciesSheet/map.html b/atlas/templates/speciesSheet/map.html index 515621189..4dbe83779 100644 --- a/atlas/templates/speciesSheet/map.html +++ b/atlas/templates/speciesSheet/map.html @@ -16,8 +16,8 @@

  • - {{ communes|length|pretty }}
    - {{ _('municipalities')|lower if communes|length > 1 else _('municipality')|lower }} + {{ zone|length|pretty }}
    + {{ _('municipalities')|lower if zone|length > 1 else _('municipality')|lower }}

  • diff --git a/atlas/templates/speciesSheet/otherInformations.html b/atlas/templates/speciesSheet/otherInformations.html index ef6a9e1bf..481afd843 100644 --- a/atlas/templates/speciesSheet/otherInformations.html +++ b/atlas/templates/speciesSheet/otherInformations.html @@ -6,12 +6,12 @@
  • - {% else %} - {% endif %} @@ -80,13 +80,13 @@
    {% endif %} {% if articles | length != 0 %} -
    +
    {% else %} -
    +
    {% endif %}

    - {% for com in communes %} - {{ com.commune_maj }} + {% for com in zone %} + {{ com.area_name }} {% if not loop.last %} - {% endif %} diff --git a/atlas/translations/en/LC_MESSAGES/messages.mo b/atlas/translations/en/LC_MESSAGES/messages.mo index 39dcdca50ea2f3751f1ae1fef0f49eb0c396cf71..39f7a4e3cc6f07fd20bd2d638731f138844ef1f2 100644 GIT binary patch delta 210 zcmZ3byGVD#7A8?~1_p+wTnr3+K>9C`<_6L{n@=)vGuI0OnLeTrsW>1l0_5icX;vWJ z1fY%^IV|KL*MOe{*y(5uSNOWiEat;#hySX7BGI29zQkW{IV NSd^N$xkS{A5dhl@BSioJ delta 206 zcmZ3ayGnP%7A8?{1_p+wTnr52K>8z)<^$54n@=)vGuMj&nLeTn41z#98Ayu&=~5ug z3Z%P$G&_)<0HtRD=`bLF0gzS!(%*qJFOZf28X^p&wSY7SkhTNTia^>ONQ2DD1kymI z4EaDBq^}i7GlU#onR9sM=3us&EG)^HC6$w(aA|Fp;#T6~PpVYNEzQeJ&MZjG0ZEvM LYHiLHHDv?1B diff --git a/atlas/translations/en/LC_MESSAGES/messages.po b/atlas/translations/en/LC_MESSAGES/messages.po index 8b6ec8e66..ffd151b70 100644 --- a/atlas/translations/en/LC_MESSAGES/messages.po +++ b/atlas/translations/en/LC_MESSAGES/messages.po @@ -119,8 +119,8 @@ msgstr "Search by species" #: static/custom/templates/navbar.html:47 #: static/custom/templates/navbar.html.sample:47 #: templates/home/globalStats.html:55 -msgid "search.city" -msgstr "Search by municipality" +msgid "search.zone" +msgstr "Search by area" #: static/custom/templates/presentation.html:4 #: static/custom/templates/presentation.html.sample:4 diff --git a/atlas/translations/fr/LC_MESSAGES/messages.mo b/atlas/translations/fr/LC_MESSAGES/messages.mo index 388a3706a2b9576a41a8702854a7fbdb5f4e583c..ec33eb3e4e1ce256a658f464d02bfc4faf92dc3e 100644 GIT binary patch delta 213 zcmWm6KMMhI9LMo5huj^?pSzdDuLIOIIvMmxV=n0G3-VN@n#_N_hYV9s>hb zqeXd}UY|an`W*bdzuTuRM?@ZmND04aVnLnLnl^6{7q*Cn8?4|Ft9ZdI-Z76atl=9Y z%<|j72^MjQOtL~96?%BW|IZDZ_(UJIx~Oh$ok>21rw4I=(3y>*P&ww*OtyBr+zb1I QkUDh7LF}@rt36Ep0IT*V0RR91 delta 198 zcmWm6yAHu{9L4dUwyKw~(7MFJXzJ=2JVqm8Xe}-=32z`>Y~l?h|Axe5HAuXJ8rZ}O z_;&i7larh@I0wg6^IQ>mIU;rZVg+q=({z315jVa_2X~nF3s&)gMa_$ diff --git a/atlas/translations/fr/LC_MESSAGES/messages.po b/atlas/translations/fr/LC_MESSAGES/messages.po index 0c0ede54e..56e393e4b 100644 --- a/atlas/translations/fr/LC_MESSAGES/messages.po +++ b/atlas/translations/fr/LC_MESSAGES/messages.po @@ -121,22 +121,14 @@ msgstr "Recherche par espèce" #: static/custom/templates/navbar.html:47 #: static/custom/templates/navbar.html.sample:47 #: templates/home/globalStats.html:55 -msgid "search.city" -msgstr "Recherche par commune" +msgid "search.zone" +msgstr "Recherche par zone" #: static/custom/templates/presentation.html:4 #: static/custom/templates/presentation.html.sample:4 msgid "atlas.presentation" msgstr "Présentation de l'atlas" -#: templates/areaSheet/_main.html:6 templates/areaSheet/_main.html:59 -msgid "municipality.of" -msgstr "Commune de" - -#: templates/areaSheet/_main.html:70 -msgid "last.obs.municipality" -msgstr "dernières observations dans la commune de" - #: templates/areaSheet/_main.html:73 msgid "last.obs.zone" msgstr "Dernière observations : " @@ -299,7 +291,7 @@ msgstr "Fiche" #: templates/core/tabTaxons.html:82 msgid "display.city.infos" -msgstr "Afficher les informations de la commune" +msgstr "Afficher les informations de la zone" #: templates/home/globalStats.html:4 msgid "home.insomefigures" diff --git a/atlas/translations/it/LC_MESSAGES/messages.mo b/atlas/translations/it/LC_MESSAGES/messages.mo index f23daef27f3210b4d76976c80ac1e55081563a52..6f40e281f464c6ba6b19c353c2d20990b05cb3cc 100644 GIT binary patch delta 212 zcmZ3czeIn-7A8?~1_p+wTnr3+K>9C`<_6L{n@=(^GuO)infzi541z#f2S^J5X*(dz z3#9#lG#ikP1=1WqIt55e0qI;I?GL0ofV3Qtz5%2`>c0bNAt22Pv=5|S0!V8BX+d$TQMnf!xGi8HY%IYX~1KQDE&IQI{($x34S0zsL{sYS_& R3I(Y}3P72}%>iOzi~tvLAr}Au delta 208 zcmZ3Yzf6C_7A8?{1_p+wTnr52K>8z)<^$54n@=(^GuI0Nnfzi53^G7k2}lb9X?q~e z3#0>qG#ikP2htosIt@rm0qJ}o?GL28fV3Qtz6GQ~>VE=hka_GtdqC=?fV2jXRtC}_ zb9{ibB9IOS(gr}fRGeY6H`_uMmgLNm%E?c-v^Gm|f8`Pk%1llzN={TLNG(!G&d)8) Oo6IX_xY=JUlo0@r1s{