diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 3fbe11e265..f7dfe99190 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -22,7 +22,7 @@ jobs: python-version: ['3.8'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: ./.github/actions/python-cache-requirements diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index baec5da3ff..7e3b17604b 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -21,7 +21,7 @@ jobs: name: Doc structure runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/python-cache-requirements with: requirements: docs/requirements.txt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 758254c7f1..327c4f9311 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: name: Checking SRID in migrations files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | test $(ls geotrek/*/migrations/*.py | xargs grep -l srid | xargs grep -L SRID | wc -l) -eq 0 @@ -24,7 +24,7 @@ jobs: name: Checking Flake8 rules runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/python-cache-requirements with: requirements: dev-requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1af6712e6..507089e266 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ on: push: branches: - master + paths-ignore: - 'docs/**' release: @@ -42,10 +43,13 @@ jobs: name: Python Unittests runs-on: ubuntu-latest container: makinacorpus/geodjango:${{ matrix.os }} + + permissions: + packages: write # required to publish docker image strategy: matrix: - os: ['bionic-3.8', 'focal-3.8', 'jammy-3.10'] + os: ['focal-3.8', 'jammy-3.10'] tests-env: ['tests', 'tests_nds'] env: @@ -72,8 +76,8 @@ jobs: - 6379:6379 steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: | ./venv @@ -114,13 +118,7 @@ jobs: libvips apt-get install -y --no-install-recommends postgis - - name: Install python venv for bionic - if: ${{ matrix.os == 'bionic-3.8'}} - run: | - python3.8 -m venv ./venv - - name: Install python venv - if: ${{ matrix.os != 'bionic-3.8'}} run: | python3 -m venv ./venv @@ -158,7 +156,6 @@ jobs: ./venv/bin/coverage xml -o coverage.xml - name: Save coverage - if: ${{ matrix.os != 'bionic-3.8'}} uses: actions/upload-artifact@v4 with: name: coverage_${{ matrix.os }}_${{ matrix.tests-env }} @@ -184,7 +181,7 @@ jobs: name: coverage_${{ matrix.os }}_${{ matrix.tests-env }} path: . - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: files: ./coverage.xml env_vars: OS,ENV @@ -426,16 +423,18 @@ jobs: name: Publish (on release only) runs-on: ubuntu-latest needs: [ test, e2e_docker_image, build_deb, e2e_deb_20_04 ] - if: ${{ github.event_name == 'release' && github.event.action == 'created' }} + if: ${{ github.event_name != 'pull_request' }} steps: - uses: actions/checkout@v4 - name: Download 18.04 debian artifact uses: actions/download-artifact@v4 + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} with: name: bionic - name: Download 20.04 debian artifact uses: actions/download-artifact@v4 + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} with: name: focal @@ -450,25 +449,44 @@ jobs: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Publish Docker image (v2 and latest) - run: | - if [[ "${{ github.ref }}" == *"dev"* ]]; then - export DOCKER_TAG=dev - else - docker tag geotrek:latest geotrekce/admin:$(cat VERSION) - docker push geotrekce/admin:$(cat VERSION) - export DOCKER_TAG=latest - fi - docker tag geotrek:latest geotrekce/admin:$DOCKER_TAG - docker push geotrekce/admin:$DOCKER_TAG + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + geotrekce/admin + ghcr.io/geotrekce/geotrek-admin + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + push: true + provenance: mode=max + sbom: true + builder: ${{ steps.buildx.outputs.name }} + tags: ${{ steps.meta.outputs.tags }} + file: ./docker/Dockerfile - name: Install SSH key uses: shimataro/ssh-key-action@v2 + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} with: key: ${{ secrets.SSH_PRIVATE_KEY }} known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} - name: Publish debian packages + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} run: | if [[ "${{ github.ref }}" == *"dev"* ]]; then export DEB_COMPONENT=dev @@ -486,11 +504,13 @@ jobs: fi - name: Download 22.04 debian artifact + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} uses: actions/download-artifact@v4 with: name: jammy - name: Attach debian packages as release binaries + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} uses: skx/github-action-publish-binaries@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index 20d48f0d10..76d1f214dd 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,10 @@ COLOR_DEBUG = \033[36m COLOR_RESET = \033[0m build: - docker build -t geotrek . --build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) + docker build -t geotrek -f docker/Dockerfile . --build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) -build-no-cache: - docker build -t geotrek --no-cache . +build_no_cache: + docker build -t geotrek -f docker/Dockerfile --no-cache . build_deb: docker pull $(DISTRO) diff --git a/README.md b/README.md new file mode 100644 index 0000000000..c72875251c --- /dev/null +++ b/README.md @@ -0,0 +1,111 @@ +

Geotrek-admin

+ +

geotrek admin image

+ +

+Documentation +Geotrek Admin demo +Chat Matrix +Forum Google Group +

+

+CI Status +Coverage +End to End +Documentation +

+ +

+ Admin • + Features • + User manual • + Installation and configuration • +

+

+ Support • + Contribution • + Contributors • + License • +

+ +[![Alt text](http://geotrek.fr/assets/img/screen-1.png "Interface de Geotrek-admin")](http://geotrek.fr) + +## Admin + +**Geotrek-admin** is a web application designed to manage, centralize, and structure geographical and touristic information for your territory. It is the back-office application of the Geotrek ecosystem. + +With Geotrek-admin, you can: +- Manage treks, touristic information, and related content (media, descriptions, etc.). +- Organize your data with maps, layers, and metadata. +- Export content to various public interfaces, such as Geotrek-rando or printed topoguides. + +You can explore Geotrek-admin in action through the demonstration website: +- [https://demo-admin.geotrek.fr/](https://demo-admin.geotrek.fr/) (demo / demo) : + +Geotrek-admin is built on Django and leverages a PostGIS database for handling geographical data. It serves as the data source for Geotrek-rando, Geotrek-widget and other tools of the Geotrek ecosystem. + +Learn more about Geotrek-admin in the [general documentation (French)](https://geotrek.readthedocs.io/fr/latest/about/geotrek.html). + +## Features + +Geotrek-Admin is a powerful web mapping application designed for managing trekking, outdoor and tourism data with ease. Tailored to support GIS features and extensive customization, it empowers organizations to manage, maintain, and publish their outdoor assets seamlessly: + +- **Management tool**: manage paths, interventions, signage, treks, POIs, touristic events, and much more. +- **Maintenance tracking**: track the maintenance of equipment and infrastructures with precision. +- **Advanced GIS capabilities**: control objects by district, protected areas, physical and legal status of paths, and compute 3D attributes using DEM draping. +- **Data synchronization**: interconnect with external platforms like Suricate, Apidae, and Tourinsoft for real-time data updates. +- **Publishing tools**: + - create public websites with [Geotrek-rando](https://github.com/GeotrekCE/Geotrek-rando-v3) (e.g., [Destination Écrins](https://rando.ecrins-parcnational.fr), [Alpes Rando](https://alpesrando.net/)). + - embed trek information into existing websites with [Geotrek-widget](https://github.com/GeotrekCE/Geotrek-rando-widget) for flexible and lightweight integration (e.g., [Sidobre Vallée Tourisme](https://sidobre-vallees-tourisme.com/type_activite/balades-et-randonnees-sidobre-vallees/), [la Toscane Occitane](https://www.la-toscane-occitane.com/a-voir-a-faire/balades-randonnees)).. + - deploy mobile applications with [Geotrek-mobile](https://github.com/GeotrekCE/Geotrek-mobile) (e.g., [Grand Carcasssonne](https://play.google.com/store/apps/details?id=io.geotrek.grandcarcassonne), [Jura outdoor](https://apps.apple.com/app/jura-outdoor/id6446137384)). +- **Customizable outputs**: export data in various formats (PDF, GPX, KML) for offline use and tailored user experiences. +- **Interactive mapping**: enable users to visualize and explore data-rich maps with detailed elevation profiles. +- **Documentation and support**: access comprehensive documentation, best practices and community support for all your needs in the ([official documentation](https://geotrek.readthedocs.io/en/2.111.0/usage/overview.html)). + +Learn more on the [Geotrek product website](http://geotrek.fr). + +## User manual (french) + +- [Presentation](https://geotrek.readthedocs.io/fr/latest/usage/overview.html) +- [Management modules](https://geotrek.readthedocs.io/fr/latest/usage/management-modules.html) +- [Touristic modules](https://geotrek.readthedocs.io/fr/latest/usage/touristic-modules.html) + +## Installation and configuration + +- [Installation](https://geotrek.readthedocs.io/fr/latest/install/installation.html) +- [Configuration](https://geotrek.readthedocs.io/fr/latest/install/configuration.html) +- [Advanced configuration](https://geotrek.readthedocs.io/fr/latest/install/advanced-configuration.html) + +## Support + +- To report bugs or suggest features, please [submit a ticket](https://github.com/GeotrekCE/Geotrek-admin/issues). +- Join our community to stay updated and share your experience! Connect on [Matrix](https://matrix.to/#/%23geotrek:matrix.org) for real-time discussions, or connect through the [Google Group](https://groups.google.com/g/geotrek-fr) to exchange ideas and insights. + +## Contribution + +Interested in contributing? See our [Contributing Guide](https://geotrek.readthedocs.io/en/latest/contribute/contributing.html +). You can help in many ways, the ability to code is not necessary. + +## Thanks to all contributors ❤ + + + + + +Made with [contrib.rocks](https://contrib.rocks). + +## License + +This project is under the BSD License. See the [LICENSE](Geotrek-admin/blob/main/LICENSE) for details. + +- OpenSource - BSD +- Copyright (c) 2012-2024 - Makina Corpus Territoires / Parc national des Ecrins - Parc National du Mercantour - Parco delle Alpi Marittime + +Logo de Makina Corpus Territoires +[![Alt text](https://geotrek.fr/assets/img/logo_autonomens-h120m.png "Logo Autonomens")](https://datatheca.com/) + +---- + +[![Alt text](http://geotrek.fr/assets/img/parc_ecrins.png "Logo du Parc national des Ecrins")](http://www.ecrins-parcnational.fr) +[![Alt text](http://geotrek.fr/assets/img/parc_mercantour.png "Logo du Parc national du Mercantour")](http://www.mercantour.eu) +[![Alt text](http://geotrek.fr/assets/img/alpi_maritime.png "Logo du Parc naturel des Alpes maritimes")](http://www.parcoalpimarittime.it) diff --git a/README.rst b/README.rst deleted file mode 100644 index 71279fa2b7..0000000000 --- a/README.rst +++ /dev/null @@ -1,112 +0,0 @@ -**Geotrek**, *paths* management for *National Parks* and *Tourism organizations*. - -.. image:: http://geotrek.fr/assets/img/logo.svg - -:master: |master-status| |master-coverage| |master-e2e| |master-rtd| - -.. |master-status| image:: - https://github.com/GeotrekCE/Geotrek-admin/actions/workflows/test.yml/badge.svg - :alt: CI Status - :target: https://github.com/GeotrekCE/Geotrek-admin/actions/workflows/test.yml - -.. |master-coverage| image:: - https://codecov.io/gh/GeotrekCE/Geotrek-admin/branch/master/graph/badge.svg - :alt: Coverage - :target: https://codecov.io/gh/GeotrekCE/Geotrek-admin - -.. |master-e2e| image:: - https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/ktpy7v/master&style=flat&logo=cypress - :alt: End to End - :target: https://dashboard.cypress.io/projects/ktpy7v/runs - -.. |master-rtd| image:: - https://readthedocs.org/projects/geotrek/badge/?version=latest&style=flat - :alt: Documentation - :target: https://geotrek.readthedocs.io - - -In brief --------- - -* Web mapping application offering GIS features -* Manage paths, interventions, signage, treks, POIs, touristic events and so much more -* Track maintenance of equipments and infrastructures -* Control objets by district, protected areas, physical and legal status of paths -* Compute 3D attributes using DEM draping -* Allow to interconnect with multiple applications to synchronize data (Suricate, Apidae, Tourinsoft, etc.) -* Publish a public website with `Geotrek-rando `_ (e.g. `PNE `_, `PNM-PNAM `_) -* Publish a public mobile application with `Geotrek-mobile `_ (e.g. `OTGC `_, `CD39 `_) - -.. image:: http://geotrek.fr/assets/img/screen-1.png - -More information on product website http://geotrek.fr - -Documentation -------------- - -* `User manual (in french) `_ -* `Installation and configuration instructions `_ -* Help us translate `on Weblate `_ - - -Contribution ------------- - -* `Contributing guide `_ -* `Development documentation `_ - - -License -------- - -* OpenSource - BSD -* Copyright (c) 2012-2023 - Makina Corpus / Parc national des Ecrins - Parc National du Mercantour - Parco delle Alpi Marittime - -.. image:: https://geotrek.fr/assets/img/logo_makina.svg - :target: https://territoires.makina-corpus.com/ - :width: 170 - -.. image:: https://geotrek.fr/assets/img/logo_autonomens-h120m.png - :target: https://datatheca.com - ----- - -.. image:: http://geotrek.fr/assets/img/parc_ecrins.png - :target: http://www.ecrins-parcnational.fr - - -.. image:: http://geotrek.fr/assets/img/parc_mercantour.png - :target: http://www.mercantour.eu - - -.. image:: http://geotrek.fr/assets/img/alpi_maritime.png - :target: http://www.parcoalpimarittime.it - - -Status of sub-projects ----------------------- - -* |django-mapentity| `django-mapentity `_ -* |django-leaflet| `django-leaflet `_ -* |convertit| `ConvertIt `_ -* |Leaflet.GeometryUtil| `Leaflet.GeometryUtil `_ -* |Leaflet.FileLayer| `Leaflet.FileLayer `_ -* |Leaflet.AlmostOver| `Leaflet.AlmostOver `_ - -.. |django-mapentity| image:: https://github.com/makinacorpus/django-mapentity/actions/workflows/python-ci.yml/badge.svg - :target: https://github.com/makinacorpus/django-mapentity/actions/workflows/python-ci.yml - -.. |django-leaflet| image:: https://github.com/makinacorpus/django-leaflet/actions/workflows/python-app.yml/badge.svg - :target: https://github.com/makinacorpus/django-leaflet/actions/workflows/python-app.yml - -.. |convertit| image:: https://circleci.com/gh/makinacorpus/convertit.svg?style=shield - :target: https://circleci.com/gh/makinacorpus/convertit - -.. |Leaflet.GeometryUtil| image:: https://travis-ci.org/makinacorpus/Leaflet.GeometryUtil.png?branch=master - :target: https://travis-ci.org/makinacorpus/Leaflet.GeometryUtil?branch=master - -.. |Leaflet.FileLayer| image:: https://travis-ci.org/makinacorpus/Leaflet.FileLayer.png?branch=master - :target: https://travis-ci.org/makinacorpus/Leaflet.FileLayer?branch=master - -.. |Leaflet.AlmostOver| image:: https://travis-ci.org/makinacorpus/Leaflet.GeometryUtil.png?branch=master - :target: https://travis-ci.org/makinacorpus/Leaflet.AlmostOver?branch=master diff --git a/VERSION b/VERSION index 15e9bd1664..41ddfd50ac 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.110.0+dev +2.111.0+dev diff --git a/cypress/integration/nav_tabs.js b/cypress/integration/nav_tabs.js index 26c0014233..34e48c58f5 100644 --- a/cypress/integration/nav_tabs.js +++ b/cypress/integration/nav_tabs.js @@ -22,9 +22,9 @@ describe('Nav tabs properties/attachments', () => { cy.visit(href); }); cy.get("a#tab-properties").should('have.class', 'active'); - cy.get("a#tab-attachments-accessibility").should('not.have.class', 'active'); - cy.get("a#tab-attachments-accessibility").click(); - cy.get("a#tab-attachments-accessibility").should('have.class', 'active'); + cy.get("a#tab-related-objects").should('not.have.class', 'active'); + cy.get("a#tab-related-objects").click(); + cy.get("a#tab-related-objects").should('have.class', 'active'); cy.get("a#tab-properties").should('not.have.class', 'active'); }); }); diff --git a/cypress/package-lock.json b/cypress/package-lock.json index 66abd3b86c..c65edd1d41 100644 --- a/cypress/package-lock.json +++ b/cypress/package-lock.json @@ -475,9 +475,9 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2117,9 +2117,9 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", diff --git a/debian/changelog b/debian/changelog index 2682ce2014..c5d83430d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ -geotrek-admin (2.110.0+dev) UNRELEASED; urgency=medium +geotrek-admin (2.111.0+dev) UNRELEASED; urgency=medium - * + * - -- Justine Fricou Wed, 13 Nov 2024 11:09:31 +0100 + -- Célia Prat Thu, 05 Dec 2024 14:29:50 +0100 + +geotrek-admin (2.111.0) RELEASED; urgency=medium + + * New package release + + -- Célia Prat Thu, 05 Dec 2024 14:26:01 +0100 geotrek-admin (2.110.0) RELEASED; urgency=medium diff --git a/dev-requirements.txt b/dev-requirements.txt index c8a5720596..57bab4db87 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -20,7 +20,7 @@ click==8.1.3 # pip-tools coverage==7.6.1 # via -r dev-requirements.in -django==4.2.16 +django==4.2.17 # via # -c requirements.txt # django-debug-toolbar @@ -29,15 +29,15 @@ django-debug-toolbar==4.3.0 # via -r dev-requirements.in django-extensions==3.2.3 # via -r dev-requirements.in -factory-boy==3.3.0 +factory-boy==3.3.1 # via -r dev-requirements.in faker==19.3.1 # via factory-boy -flake8==7.1.0 +flake8==7.1.1 # via -r dev-requirements.in freezegun==1.5.1 # via -r dev-requirements.in -importlib-metadata==6.8.0 +importlib-metadata==8.5.0 # via # -c requirements.txt # build @@ -66,11 +66,11 @@ python-dateutil==2.9.0.post0 # -c requirements.txt # faker # freezegun -six==1.16.0 +six==1.17.0 # via # -c requirements.txt # python-dateutil -sqlparse==0.5.1 +sqlparse==0.5.3 # via # -c requirements.txt # django diff --git a/docker/Dockerfile b/docker/Dockerfile index 8620518639..a54e197eed 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,6 +2,17 @@ ARG BASE_IMAGE=jammy FROM ubuntu:${BASE_IMAGE} AS base +# add labels +LABEL org.opencontainers.image.authors="Makina Corpus" +LABEL org.opencontainers.image.source="https://github.com/GeotrekCE/Geotrek-admin/" +LABEL org.opencontainers.image.documentation="https://geotrek.readthedocs.io/" +LABEL org.opencontainers.image.vendor="Makina Corpus" +LABEL org.opencontainers.image.licenses="BSD-2-Clause" +LABEL org.opencontainers.image.url="https://geotrek.fr" +LABEL org.opencontainers.image.title="Geotrek-admin" +LABEL org.opencontainers.image.description="Manage and promote your trails and tourist content and activities." + + ENV PYTHONBUFFERED=1 ENV DEBIAN_FRONTEND=noninteractive ENV ENV=prod diff --git a/docs/_static/geotrek-admin.png b/docs/_static/geotrek-admin.png new file mode 100644 index 0000000000..58dfa890f8 Binary files /dev/null and b/docs/_static/geotrek-admin.png differ diff --git a/docs/changelog.rst b/docs/changelog.rst index 7276ee370f..1d650a65c3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,9 +2,48 @@ CHANGELOG ========= -2.110.0+dev (XXXX-XX-XX) +2.111.0+dev (XXXX-XX-XX) ---------------------------- +**Performances** + +- Delay loading filter form in List Views (refs #2967) + +**UI/UX** + +- Move the related objects from the properties tab into their own tab, on objects details pages (refs #2967) +- Move Treks' accessibility pictures into the attached files tab (refs #2967) +- Removes the display of an object's structure in its properties tab title + +**Documentation** + +- Update theme color +- Fix typo in documentation +- Update and homogenize README.rst + + +2.111.0 (2024-12-05) +---------------------------- + +**Features** + +- Add `CirkwiParser` to retrieve Treks and Touristic Contents from Cirkwi (refs #3947) + +**Improvements** + +- Remove overriding of SchemaRandonneeParser's filetype_name attribute (#4022) +- Improve sync mobile and import views with current bootstrap style. +- Docker image is now mirrored on github registry + +**Bug fixes** + +- Fix missing Dockerfile path on make build scripts +- Fix SchemaRandonneeParser url update when description is null or was not updated (#4022) + +**Documentation** + +- Update documentation for release and update obsolete example +- Add note about certbot ssl configuration in nginx 2.110.0 (2024-11-13) @@ -937,7 +976,7 @@ In preparation for HD Views developments (PR #3298) !!!! Clear cache after update. You can do this by going to admin panel, "clearcache" section, then delete default / fat and api_v2 !!!! -**Improvements** +**Improvments** - Cache API v2 Detail endpoints and themes list endpoint - Sensitive areas are now computed with buffered geometries with settings SENSITIVE_AREA_INTERSECTION_MARGIN. Use ST_INTERSECTS on it is faster. diff --git a/docs/conf.py b/docs/conf.py index 25f52dce5f..a662cfdb75 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,8 +57,8 @@ { "media": "(prefers-color-scheme: light)", "scheme": "default", - "primary": "green", - "accent": "light green", + "primary": "red", + "accent": "deep-orange", "toggle": { "icon": "material/weather-night", "name": "Switch to dark mode", @@ -67,8 +67,8 @@ { "media": "(prefers-color-scheme: dark)", "scheme": "slate", - "primary": "green", - "accent": "light green", + "primary": "red", + "accent": "deep-orange", "toggle": { "icon": "material/weather-sunny", "name": "Switch to light mode", diff --git a/docs/contribute/contributing.rst b/docs/contribute/contributing.rst index 5b19cec4d3..5e228dd845 100644 --- a/docs/contribute/contributing.rst +++ b/docs/contribute/contributing.rst @@ -105,14 +105,14 @@ On master branch: * Update files *VERSION* and *docs/changelog.rst* to remove ``+dev`` suffix and increment version (please use semver rules) * Run ``dch -r -D RELEASED``, update version in the same way and save -* Commit with message 'Release x.y.z' and push to ``master`` -* Create new release on Github, with tag X.Y.Z, click on "Generate release notes" +* Commit with message 'Release X.Y.Z' and push to ``master`` +* Create new release with name 'Geotrek-admin X.Y.Z' on Github, with tag X.Y.Z, click on "Generate release notes" * Wait for release to be published through CI * Update files *VERSION* and *docs/changelog.rst* to add ``+dev`` suffix * Run ``dch -v +dev --no-force-save-on-release`` and save * Commit with message 'Back to development' and push to ```master`` -* When creating a new release 'x.y.z' on github, Github actions will generate the .deb package file, and publish it on https://packages.geotrek.fr (see ``.github/workflows/test.yml`` file for details) +* When creating a new release 'X.Y.Z' on github, Github actions will generate the .deb package file, and publish it on https://packages.geotrek.fr (see ``.github/workflows/test.yml`` file for details) Other ways to contribute ------------------------- diff --git a/docs/install/configuration.rst b/docs/install/configuration.rst index f5cd365e75..099239becb 100644 --- a/docs/install/configuration.rst +++ b/docs/install/configuration.rst @@ -71,11 +71,13 @@ After this, edit ``nginx.conf.in`` to add your certificate. If you generate it with letsencrypt : You can use certbot to add the certificate in your configuration. -But you will have to move the configuration automatically added into ``nginx.conf``, to the file ``nginx.conf.in`` -in ``/opt/geotrek-admin/var/conf/`` directory +But you will have to move the configuration automatically added into ``nginx.conf``, to the file ``nginx.conf.in`` in ``/opt/geotrek-admin/var/conf/`` directory. -You have to move the configuration to the file ``nginx.conf.in`` because ``nginx.conf`` is automatically -changed during command ``dpkg-reconfigure geotrek-admin``. +You have to move the configuration to the file ``nginx.conf.in`` because ``nginx.conf`` is automatically changed during command ``dpkg-reconfigure geotrek-admin``. + +.. note:: + + You need to replace the ``$`` from Certbot with ``${DOLLAR}`` everywhere in the ``nginx.conf.in`` file, then run the command ``sudo dpkg-reconfigure geotrek-admin`` to regenerate the file. Mandatory settings diff --git a/docs/install/maintenance.rst b/docs/install/maintenance.rst index 990c2073c0..471560069c 100644 --- a/docs/install/maintenance.rst +++ b/docs/install/maintenance.rst @@ -34,11 +34,9 @@ Restore If you restore Geotrek-admin on a new server, you will have to install PostgreSQL and PostGIS and create a database user first. Otherwise go directly to the database creation step. -Example for Ubuntu: - .. code-block:: bash - sudo apt install postgis + sudo apt install postgresql-14 postgresql-14-postgis-3 sudo -u postgres psql -c "CREATE USER geotrek WITH ENCRYPTED PASSWORD 'geotrek';" diff --git a/docs/requirements.txt b/docs/requirements.txt index 2630f0cf0c..4b63ae0b3c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -30,7 +30,7 @@ imagesize==1.4.1 # via sphinx importlib-metadata==6.8.0 # via sphinx -jinja2==3.1.4 +jinja2==3.1.5 # via sphinx livereload==2.7.0 # via sphinx-autobuild @@ -50,7 +50,7 @@ pydantic-extra-types==2.10.0 # via sphinx-immaterial pygments==2.18.0 # via sphinx -pytz==2023.3.post1 +pytz==2024.2 # via babel requests==2.32.3 # via @@ -82,7 +82,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -tornado==6.4.1 +tornado==6.4.2 # via livereload typing-extensions==4.12.2 # via diff --git a/docs/usage/apis.rst b/docs/usage/apis.rst index 00c8bff79b..1159d3628f 100644 --- a/docs/usage/apis.rst +++ b/docs/usage/apis.rst @@ -27,7 +27,7 @@ APIs externes Geotrek et IGNrando' -------------------- -Geotrek-admin est capable de produire un flux des itinéraires et POIs présents dans sa BDD au format Cirkwi pour pouvoir les importer directement dans IGNrando' (https://makina-corpus.com/sig-webmapping/geotrek-et-lign-ca-fonctionne). +Geotrek-admin est capable de produire un flux des itinéraires et POIs présents dans sa BDD au format Cirkwi pour pouvoir les importer directement dans IGNrando' `(voir cet article) `_. Exemple des randonnées et POIs du Parc national des Ecrins publiées sur IGNrando' depuis Geotrek-admin : https://ignrando.fr/fr/communautes/parc-national-des-ecrins diff --git a/docs/usage/configuration-ttw.rst b/docs/usage/configuration-ttw.rst index 48ec32a766..b1ba1315aa 100644 --- a/docs/usage/configuration-ttw.rst +++ b/docs/usage/configuration-ttw.rst @@ -53,10 +53,12 @@ Exemple : ajouter une étiquette ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Les étiquettes sont des encarts "pré-configurés" pouvant être réutilisés sur de multiples itinéraires. Elles présentent plusieurs avantages : + - ne pas avoir à saisir à chaque itinéraire les même informations - permet de filtrer les itinéraires dans la vue liste (catégorie "Autres") sur Geotrek-Rando. Pour les configurer, vous devez : + - vous rendre dans le module de configuration - dans la section Étiquettes du groupe **COMMUN** cliquer sur :guilabel:`+ Ajouter` @@ -285,7 +287,7 @@ Geotrek permet de configurer un ou plusieurs portails. Ce terme est utilisé pou Ainsi, il est possible d'avoir plusieurs Geotrek-Rando branchés sur un seul Geotrek-Admin. Grâce à leur distinction sous forme de portail, il sera alors aisé de choisir sur quel Geotrek-Rando on souhaite faire apparaitre une information. -Avec le widget Geotrek (https://github.com/GeotrekCE/geotrek-rando-widget) il est également possible d'utiliser cette fonctionnalité pour distinguer les contenus à afficher dans un widget ou dans un autre (https://makina-corpus.com/logiciel-libre/developpement-geotrek-widget-finance-parc-naturel-regional-haut-jura). +Avec `Geotrek-widget `_ il est également possible d'utiliser cette fonctionnalité pour distinguer les contenus à afficher dans un widget ou dans un autre `(voir cet article) `_. Pour configurer un ou plusieurs portails, il faut se rendre dans le module de configuration sur la section "Portails cibles". @@ -314,9 +316,9 @@ Intégration des fonds de cartes Il est possible d'intégrer dans Geotrek différents fonds de carte comme : -* OpenStreetMap : https://www.openstreetmap.org/#map=6/46.449/2.210 -* OpenTopoMap : https://opentopomap.org/#map=6.49.000/10.000 -* ou les données IGN : https://geoservices.ign.fr/services-geoplateforme-diffusion +* `OpenStreetMap `_ +* `OpenTopoMap  `_ +* `ou les données IGN  `_ Pour configurer l'ajout de fonds de plan, référez vous à cette section :ref:`Map settings ` @@ -345,16 +347,16 @@ Afin de s'intégrer au mieux dans le design standard, les couleurs suivantes son Voici quelques ressources en ligne proposant des pictogrammes (sous licence libre) : -- `https://pictogrammers.com/library/mdi/ `_ -- `https://thenounproject.com/ `_ -- `http://map-icons.com/ `_ -- `https://www.opensymbols.org/ `_ -- `https://www.svgrepo.com/ `_ -- `http://www.entypo.com/ `_ -- `https://icons.getbootstrap.com/ `_ -- `https://icongr.am/ `_ -- `https://cocomaterial.com/ `_ -- `https://icofont.com/ `_ -- `https://fontello.com/ `_ -- `https://iconmonstr.com/ `_ -- `https://fontawesome.com/icons `_ +- `Pictogrammers `_ +- `The Noun Project `_ +- `Map icons `_ +- `Opensymbols `_ +- `SVG repo `_ +- `Entypo `_ +- `Icons Getbootstrap `_ +- `Icongr `_ +- `Cocomaterial `_ +- `Icofont `_ +- `Fontello `_ +- `Iconmonstr `_ +- `Fontawesome `_ diff --git a/geotrek/api/templates/mobile/sync_mobile.html b/geotrek/api/templates/mobile/sync_mobile.html index f689781660..9b6425e0dd 100644 --- a/geotrek/api/templates/mobile/sync_mobile.html +++ b/geotrek/api/templates/mobile/sync_mobile.html @@ -32,29 +32,29 @@ has_progress = true; disable_sync_button(false); - $('#progress-value').show(); - $("#progress-value").removeClass('bar-danger'); - $("#progress-value").parent().addClass("active"); + $("#progress-bar").removeClass('bg-danger'); + $("#progress-bar").parent().addClass("active"); if (this.result.current) { - $("#progress-value").css("width", this.result.current+'%'); + $("#progress-bar").css("width", this.result.current + '%'); - if (this.result.current == 100){ - $("#progress-value").parent().removeClass("active"); - $("#progress-value").addClass('bar-success'); - } + if (this.result.current == 100) { + $("#progress-bar").parent().removeClass("active"); + $("#progress-bar").addClass('bg-success'); + } } if (this.result.infos) { - $("#progress-text").text(this.result.infos); - } + $("#progress-bar").text(this.result.infos); + } } else { if (this.status == 'FAILURE'){ // case of exception in task - $("#progress-text").text("{% trans 'An error occured' %}"); - $('#exception-message').text(this.result.exc_type + ' : ' + this.result.exc_message) - $("#progress-value").addClass('bar-danger'); - $("#progress-value").parent().removeClass("active"); + $("#progress-bar").text("{% trans 'An error occured' %}"); + $('#exception-message').text(this.result.exc_type + ' : ' + this.result.exc_message) + $('#exception-message').show(); + $("#progress-bar").addClass('bg-danger'); + $("#progress-value").parent().removeClass("active"); } } }); @@ -70,11 +70,12 @@ get_sync_infos(); $('#btn-confirm')[0].addEventListener('click', function(evt) { - $("#progress-value").css("width", '0%'); - $("#progress-text").text(''); - $("#progress-value").parent().addClass("active"); - $("#progress-value").removeClass('bar-success'); - $("#progress-value").removeClass('bar-danger'); + $('#exception-message').hide(); + $("#progress-bar").css("width", '0%'); + $("#progress-bar").text(''); + $("#progress-bar").parent().addClass("active"); + $("#progress-bar").removeClass('bg-success'); + $("#progress-bar").removeClass('bg-danger'); $.post( $('#form-sync').attr('action'), @@ -87,10 +88,10 @@ window.setInterval(function(){ get_sync_infos(); - }, 500); + }, 1000); }); - + {% endblock extrahead %} {% block toolbar %} @@ -98,22 +99,31 @@ {% block mainpanel %} -
-

{% trans "Mobile sync" %}

-
-
- -
- {% block mainform %} - {% crispy form form.helper %} - {% endblock mainform %} +
+
+
+

{% trans "Mobile sync" %}

+
+ +
+
+
+
+ +
+ +