From aef94d73afd2a55701aaf8dd0bd044039b5abcd3 Mon Sep 17 00:00:00 2001 From: Chatewgne Date: Fri, 27 Dec 2024 14:29:34 +0100 Subject: [PATCH 01/11] =?UTF-8?q?=E2=9A=A1=20[PERF]=20Delay=20loading=20fi?= =?UTF-8?q?lter=20form=20in=20List=20Views=20(#2967)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/changelog.rst | 5 +++ geotrek/common/static/common/main.js | 5 --- .../common/common_extrabody_fragment.html | 2 - geotrek/common/views.py | 9 +++- geotrek/core/views.py | 16 +++++-- geotrek/diving/views.py | 9 +++- geotrek/feedback/tests/test_views.py | 23 +++++++++- geotrek/feedback/views.py | 9 +++- geotrek/infrastructure/views.py | 8 +++- geotrek/land/views.py | 44 ++++++++++++++++--- .../maintenance/static/maintenance/main.js | 2 +- geotrek/maintenance/views.py | 16 +++++-- geotrek/outdoor/views.py | 16 +++++-- geotrek/sensitivity/views.py | 9 +++- geotrek/signage/views.py | 16 +++++-- geotrek/tourism/static/tourism/main.js | 2 +- geotrek/tourism/tests/test_views.py | 2 +- geotrek/tourism/views.py | 16 +++++-- geotrek/trekking/views.py | 23 ++++++++-- geotrek/zoning/static/zoning/main.js | 4 +- requirements.txt | 2 +- 21 files changed, 188 insertions(+), 50 deletions(-) delete mode 100644 geotrek/common/static/common/main.js delete mode 100644 geotrek/common/templates/common/common_extrabody_fragment.html diff --git a/docs/changelog.rst b/docs/changelog.rst index 87c8183fc6..81dc70d9a0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,12 +5,17 @@ CHANGELOG 2.111.0+dev (XXXX-XX-XX) ---------------------------- +**Performances** + +- Delay loading filter form in List Views (refs #2967) + **Documentation** - Update theme color - Fix typo in documentation - Update and homogenize README.rst + 2.111.0 (2024-12-05) ---------------------------- diff --git a/geotrek/common/static/common/main.js b/geotrek/common/static/common/main.js deleted file mode 100644 index 5028853b65..0000000000 --- a/geotrek/common/static/common/main.js +++ /dev/null @@ -1,5 +0,0 @@ -$(window).on('entity:view:list', function () { - // Move all topology-filters to separate tab - $('#mainfilter .right-filter').parent('p') - .detach().appendTo('#mainfilter > .right'); -}); diff --git a/geotrek/common/templates/common/common_extrabody_fragment.html b/geotrek/common/templates/common/common_extrabody_fragment.html deleted file mode 100644 index ec8c160130..0000000000 --- a/geotrek/common/templates/common/common_extrabody_fragment.html +++ /dev/null @@ -1,2 +0,0 @@ -{% load static %} - diff --git a/geotrek/common/views.py b/geotrek/common/views.py index 2f2aab8edd..70fa21ea03 100644 --- a/geotrek/common/views.py +++ b/geotrek/common/views.py @@ -43,7 +43,7 @@ from mapentity import views as mapentity_views from mapentity.helpers import api_bbox from mapentity.registry import app_settings, registry -from mapentity.views import MapEntityList +from mapentity.views import MapEntityList, MapEntityFilter from paperclip import settings as settings_paperclip from paperclip.views import _handle_attachment_form from rest_framework import mixins, viewsets @@ -292,14 +292,19 @@ def import_update_json(request): class HDViewPointList(MapEntityList): queryset = HDViewPoint.objects.all() - filterform = HDViewPointFilterSet columns = ['id', 'title'] +class HDViewPointFilter(MapEntityFilter): + model = HDViewPoint + filterset_class = HDViewPointFilterSet + + class HDViewPointViewSet(GeotrekMapentityViewSet): model = HDViewPoint serializer_class = HDViewPointSerializer geojson_serializer_class = HDViewPointGeoJSONSerializer + filterset_class = HDViewPointFilterSet mapentity_list_class = HDViewPointList def get_queryset(self): diff --git a/geotrek/core/views.py b/geotrek/core/views.py index 5154f27c85..cc92628638 100644 --- a/geotrek/core/views.py +++ b/geotrek/core/views.py @@ -19,7 +19,7 @@ from django.views.generic.detail import BaseDetailView from mapentity.serializers import GPXSerializer from mapentity.views import (MapEntityList, MapEntityDetail, MapEntityDocument, MapEntityCreate, MapEntityUpdate, - MapEntityDelete, MapEntityFormat, LastModifiedMixin) + MapEntityDelete, MapEntityFormat, LastModifiedMixin, MapEntityFilter) from rest_framework.decorators import action from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer from rest_framework.response import Response @@ -60,14 +60,19 @@ def get_initial(self): class PathList(CustomColumnsMixin, MapEntityList): queryset = Path.objects.all() - filterform = PathFilterSet mandatory_columns = ['id', 'checkbox', 'name', 'length'] default_extra_columns = ['length_2d'] unorderable_columns = ['checkbox'] searchable_columns = ['id', 'name'] +class PathFilter(MapEntityFilter): + model = Path + filterset_class = PathFilterSet + + class PathFormatList(MapEntityFormat, PathList): + filterset_class = PathFilterSet mandatory_columns = ['id'] default_extra_columns = [ 'structure', 'valid', 'visible', 'name', 'comments', 'departure', 'arrival', @@ -343,13 +348,18 @@ class CertificationTrailMixin(FormsetMixin): class TrailList(CustomColumnsMixin, MapEntityList): queryset = Trail.objects.existing() - filterform = TrailFilterSet mandatory_columns = ['id', 'name'] default_extra_columns = ['departure', 'arrival', 'length'] searchable_columns = ['id', 'name', 'departure', 'arrival', ] +class TrailFilter(MapEntityFilter): + model = Trail + filterset_class = TrailFilterSet + + class TrailFormatList(MapEntityFormat, TrailList): + filterset_class = TrailFilterSet mandatory_columns = ['id'] default_extra_columns = [ 'structure', 'name', 'comments', diff --git a/geotrek/diving/views.py b/geotrek/diving/views.py index 9fcb84fa98..ffb9e3ffda 100644 --- a/geotrek/diving/views.py +++ b/geotrek/diving/views.py @@ -1,6 +1,6 @@ from django.conf import settings from django.contrib.gis.db.models.functions import Transform -from mapentity.views import (MapEntityList, MapEntityFormat, MapEntityDetail, MapEntityMapImage, +from mapentity.views import (MapEntityList, MapEntityFormat, MapEntityFilter, MapEntityDetail, MapEntityMapImage, MapEntityDocument, MapEntityCreate, MapEntityUpdate, MapEntityDelete) from geotrek.authent.decorators import same_structure_required @@ -15,7 +15,6 @@ class DiveList(CustomColumnsMixin, FlattenPicturesMixin, MapEntityList): - filterform = DiveFilterSet queryset = Dive.objects.existing() mandatory_columns = ['id', 'name'] default_extra_columns = ['levels', 'thumbnail'] @@ -23,7 +22,13 @@ class DiveList(CustomColumnsMixin, FlattenPicturesMixin, MapEntityList): searchable_columns = ['id', 'name'] +class DiveFilter(MapEntityFilter): + model = Dive + filterset_class = DiveFilterSet + + class DiveFormatList(MapEntityFormat, DiveList): + filterset_class = DiveFilterSet mandatory_columns = ['id'] default_extra_columns = [ 'eid', 'structure', 'name', 'departure', diff --git a/geotrek/feedback/tests/test_views.py b/geotrek/feedback/tests/test_views.py index a5651e77b1..22b1871cba 100644 --- a/geotrek/feedback/tests/test_views.py +++ b/geotrek/feedback/tests/test_views.py @@ -393,9 +393,30 @@ def test_csv_manager_sees_emails(self): column_names = list(dict_from_csv.keys()) self.assertIn("Email", column_names) + @test_for_workflow_mode + def test_filters_manager_sees_emails(self): + '''Test list FilterSet does contain emails for manager''' + self.client.force_login(user=self.workflow_manager_user) + response = self.client.get('/report/filter/') + self.assertContains(response, ' .right'); +$(window).on('entity:view:filter', function () { // Dynamic area filters $('#id_area_type').change(function () { // Parse area data diff --git a/requirements.txt b/requirements.txt index 21840472cc..f1ad915d89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -236,7 +236,7 @@ lxml==4.9.3 # via # mapentity # svglib -mapentity==8.10.0 +mapentity==8.11.0 # via geotrek (setup.py) markdown==3.7 # via geotrek (setup.py) From ac116c7003ca5a3be97b18d0b803fd89022ea5a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:38:43 +0000 Subject: [PATCH 02/11] Bump charset-normalizer from 3.3.2 to 3.4.0 Bumps [charset-normalizer](https://github.com/Ousret/charset_normalizer) from 3.3.2 to 3.4.0. - [Release notes](https://github.com/Ousret/charset_normalizer/releases) - [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md) - [Commits](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) --- updated-dependencies: - dependency-name: charset-normalizer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f1ad915d89..e2320e0ba6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -58,7 +58,7 @@ chardet==5.2.0 # via # geotrek (setup.py) # reportlab -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via requests click==8.1.3 # via From edbda38e759d261da6099fb3c5d4ecd0a24bc567 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:38:47 +0000 Subject: [PATCH 03/11] Bump persistent from 6.0 to 6.1 Bumps [persistent](https://github.com/zopefoundation/persistent) from 6.0 to 6.1. - [Changelog](https://github.com/zopefoundation/persistent/blob/master/CHANGES.rst) - [Commits](https://github.com/zopefoundation/persistent/compare/6.0...6.1) --- updated-dependencies: - dependency-name: persistent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e2320e0ba6..6b5fa5d519 100644 --- a/requirements.txt +++ b/requirements.txt @@ -264,7 +264,7 @@ papersize==1.3.0 # via pdfimpose pdfimpose==1.1.0 # via geotrek (setup.py) -persistent==6.0 +persistent==6.1 # via # btrees # zodb From a9475f92d46f5a18165fd0567c48ca8f2dc419f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:38:56 +0000 Subject: [PATCH 04/11] Bump zodbpickle from 4.0 to 4.1.1 Bumps [zodbpickle](https://github.com/zopefoundation/zodbpickle) from 4.0 to 4.1.1. - [Changelog](https://github.com/zopefoundation/zodbpickle/blob/master/CHANGES.rst) - [Commits](https://github.com/zopefoundation/zodbpickle/compare/4.0...4.1.1) --- updated-dependencies: - dependency-name: zodbpickle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6b5fa5d519..dcbff05ff6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -403,7 +403,7 @@ zipp==3.20.2 # via importlib-metadata zodb==6.0 # via appy -zodbpickle==4.0 +zodbpickle==4.1.1 # via zodb zope-deferredimport==5.0 # via persistent From c439826723bccabe23614022bd76f4e3d818514d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:38:51 +0000 Subject: [PATCH 05/11] Bump redis from 5.2.0 to 5.2.1 Bumps [redis](https://github.com/redis/redis-py) from 5.2.0 to 5.2.1. - [Release notes](https://github.com/redis/redis-py/releases) - [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES) - [Commits](https://github.com/redis/redis-py/compare/v5.2.0...v5.2.1) --- updated-dependencies: - dependency-name: redis dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index dcbff05ff6..01c12dfcbf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -311,7 +311,7 @@ pyvips==2.2.3 # via large-image-source-vips rcssmin==1.1.2 # via django-compressor -redis==5.2.0 +redis==5.2.1 # via geotrek (setup.py) reportlab==4.2.5 # via From 9ce68a43958932a96c46abea2e70e6b1445f1819 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 04:23:42 +0000 Subject: [PATCH 06/11] Bump certifi from 2024.8.30 to 2024.12.14 Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.8.30 to 2024.12.14. - [Commits](https://github.com/certifi/python-certifi/compare/2024.08.30...2024.12.14) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 01c12dfcbf..5fe0cc3520 100644 --- a/requirements.txt +++ b/requirements.txt @@ -43,7 +43,7 @@ celery==5.4.0 # via # django-celery-results # geotrek (setup.py) -certifi==2024.8.30 +certifi==2024.12.14 # via # fiona # requests From a9d904e4b5fba75225425961c3c608c037f65dc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 04:23:02 +0000 Subject: [PATCH 07/11] Bump shapely from 2.0.4 to 2.0.6 Bumps [shapely](https://github.com/shapely/shapely) from 2.0.4 to 2.0.6. - [Release notes](https://github.com/shapely/shapely/releases) - [Changelog](https://github.com/shapely/shapely/blob/main/CHANGES.txt) - [Commits](https://github.com/shapely/shapely/compare/2.0.4...2.0.6) --- updated-dependencies: - dependency-name: shapely dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5fe0cc3520..055f24f1f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -331,7 +331,7 @@ ruamel-yaml-clib==0.2.8 # via ruamel-yaml sentry-sdk==2.14.0 # via geotrek (setup.py) -shapely==2.0.4 +shapely==2.0.6 # via pyopenair simplekml==1.3.6 # via geotrek (setup.py) From 7f52724a79464c66f55e0109ec1fd65b0b69a270 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 04:22:55 +0000 Subject: [PATCH 08/11] Bump transaction from 3.1.0 to 5.0 Bumps [transaction](https://github.com/zopefoundation/transaction) from 3.1.0 to 5.0. - [Changelog](https://github.com/zopefoundation/transaction/blob/master/CHANGES.rst) - [Commits](https://github.com/zopefoundation/transaction/compare/3.1.0...5.0) --- updated-dependencies: - dependency-name: transaction dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 055f24f1f3..6a1c9b514c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -354,7 +354,7 @@ tinycss2==1.4.0 # cssselect2 # svglib # weasyprint -transaction==3.1.0 +transaction==5.0 # via zodb typing-extensions==4.12.2 # via From 62cfb3d55a9291e831ed04cf65029595e4dc0b41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 04:23:06 +0000 Subject: [PATCH 09/11] Bump cffi from 1.16.0 to 1.17.1 Bumps [cffi](https://github.com/python-cffi/cffi) from 1.16.0 to 1.17.1. - [Release notes](https://github.com/python-cffi/cffi/releases) - [Commits](https://github.com/python-cffi/cffi/compare/v1.16.0...v1.17.1) --- updated-dependencies: - dependency-name: cffi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6a1c9b514c..b3fa9f53ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -48,7 +48,7 @@ certifi==2024.12.14 # fiona # requests # sentry-sdk -cffi==1.16.0 +cffi==1.17.1 # via # cairocffi # persistent From 78f0c642d4378314f62172f329990e86d53b18ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:31:49 +0000 Subject: [PATCH 10/11] Bump jinja2 from 3.1.4 to 3.1.5 Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b3fa9f53ab..df984f44b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -220,7 +220,7 @@ inflection==0.5.1 # via drf-yasg itypes==1.2.0 # via coreapi -jinja2==3.1.4 +jinja2==3.1.5 # via coreschema kombu==5.4.2 # via celery From 595363c54fb2fbfaad3906265056ed93af4df2ec Mon Sep 17 00:00:00 2001 From: Justine Fricou Date: Tue, 7 Jan 2025 11:22:18 +0100 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=92=84=20[UI/UX]=20Restructure=20de?= =?UTF-8?q?tail=20page=20(#2967)=20-=20Move=20an=20object's=20related=20ob?= =?UTF-8?q?jects=20from=20the=20properties=20tab=20into=20their=20own=20ta?= =?UTF-8?q?b=20-=20Move=20accessibility=20pictures=20into=20the=20attached?= =?UTF-8?q?=20files=20tab=20-=20Remove=20the=20display=20of=20the=20struct?= =?UTF-8?q?ure=20in=20the=20properties=20tab=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cypress/integration/nav_tabs.js | 6 +-- docs/changelog.rst | 6 +++ .../authent_propertiestab_fragment.html | 4 -- .../cirkwi/locale/de/LC_MESSAGES/django.po | 6 +-- .../cirkwi/locale/en/LC_MESSAGES/django.po | 6 +-- .../cirkwi/locale/es/LC_MESSAGES/django.po | 6 +-- .../cirkwi/locale/fr/LC_MESSAGES/django.po | 6 +-- .../cirkwi/locale/it/LC_MESSAGES/django.po | 6 +-- .../cirkwi/locale/nl/LC_MESSAGES/django.po | 6 +-- geotrek/common/forms.py | 4 +- .../common/locale/de/LC_MESSAGES/django.po | 12 +++++- .../common/locale/en/LC_MESSAGES/django.po | 12 +++++- .../common/locale/es/LC_MESSAGES/django.po | 12 +++++- .../common/locale/fr/LC_MESSAGES/django.po | 16 +++++++- .../common/locale/it/LC_MESSAGES/django.po | 12 +++++- .../common/locale/nl/LC_MESSAGES/django.po | 12 +++++- .../templates/common/hdviewpoint_detail.html | 1 - geotrek/common/tests/test_attachments.py | 26 ++++++------- geotrek/common/views.py | 2 +- .../core/path_detail_attributes.html | 1 - geotrek/core/templates/core/trail_detail.html | 2 +- .../core/trail_detail_attributes.html | 1 - .../diving/dive_detail_attributes.html | 1 - .../feedback/locale/de/LC_MESSAGES/django.po | 14 +++---- .../feedback/locale/en/LC_MESSAGES/django.po | 14 +++---- .../feedback/locale/es/LC_MESSAGES/django.po | 14 +++---- .../feedback/locale/fr/LC_MESSAGES/django.po | 36 +++++++++--------- .../feedback/locale/it/LC_MESSAGES/django.po | 14 +++---- .../feedback/locale/nl/LC_MESSAGES/django.po | 14 +++---- .../templates/feedback/report_detail.html | 37 ++++++++++++++++++- .../feedback/report_detail_attributes.html | 31 ---------------- .../infrastructure_detail_attributes.html | 1 - .../outdoor/course_detail_attributes.html | 3 +- .../outdoor/site_detail_attributes.html | 3 +- .../sensitivearea_detail_attributes.html | 1 - .../touristiccontent_detail_attributes.html | 1 - .../touristicevent_detail_attributes.html | 1 - .../trekking/locale/de/LC_MESSAGES/django.po | 15 +------- .../trekking/locale/en/LC_MESSAGES/django.po | 15 +------- .../trekking/locale/es/LC_MESSAGES/django.po | 15 +------- .../trekking/locale/fr/LC_MESSAGES/django.po | 19 +--------- .../trekking/locale/it/LC_MESSAGES/django.po | 15 +------- .../trekking/locale/nl/LC_MESSAGES/django.po | 15 +------- .../trekking/poi_detail_attributes.html | 1 - .../trekking/service_detail_attributes.html | 1 - .../templates/trekking/trek_detail.html | 29 ++++----------- .../trekking/trek_detail_attributes.html | 4 +- 47 files changed, 208 insertions(+), 271 deletions(-) delete mode 100644 geotrek/authent/templates/authent/authent_propertiestab_fragment.html 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/docs/changelog.rst b/docs/changelog.rst index 81dc70d9a0..19b737c071 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -9,6 +9,12 @@ CHANGELOG - 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 diff --git a/geotrek/authent/templates/authent/authent_propertiestab_fragment.html b/geotrek/authent/templates/authent/authent_propertiestab_fragment.html deleted file mode 100644 index 9bf0c109e6..0000000000 --- a/geotrek/authent/templates/authent/authent_propertiestab_fragment.html +++ /dev/null @@ -1,4 +0,0 @@ -{% load i18n %} -{% if object.structure %} - {{ object.structure }} -{% endif %} \ No newline at end of file diff --git a/geotrek/cirkwi/locale/de/LC_MESSAGES/django.po b/geotrek/cirkwi/locale/de/LC_MESSAGES/django.po index 437d36b743..edaee0eb4f 100644 --- a/geotrek/cirkwi/locale/de/LC_MESSAGES/django.po +++ b/geotrek/cirkwi/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 12:48+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,10 +45,6 @@ msgstr "" msgid "Cirkwi POI categories" msgstr "" -#, python-brace-format -msgid "Failed to download {url}. HTTP status code {status_code}" -msgstr "" - #, python-brace-format msgid "" "{model} '{val}' did not exist in Geotrek-Admin and was automatically created" diff --git a/geotrek/cirkwi/locale/en/LC_MESSAGES/django.po b/geotrek/cirkwi/locale/en/LC_MESSAGES/django.po index 437d36b743..edaee0eb4f 100644 --- a/geotrek/cirkwi/locale/en/LC_MESSAGES/django.po +++ b/geotrek/cirkwi/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 12:48+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,10 +45,6 @@ msgstr "" msgid "Cirkwi POI categories" msgstr "" -#, python-brace-format -msgid "Failed to download {url}. HTTP status code {status_code}" -msgstr "" - #, python-brace-format msgid "" "{model} '{val}' did not exist in Geotrek-Admin and was automatically created" diff --git a/geotrek/cirkwi/locale/es/LC_MESSAGES/django.po b/geotrek/cirkwi/locale/es/LC_MESSAGES/django.po index 437d36b743..edaee0eb4f 100644 --- a/geotrek/cirkwi/locale/es/LC_MESSAGES/django.po +++ b/geotrek/cirkwi/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 12:48+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,10 +45,6 @@ msgstr "" msgid "Cirkwi POI categories" msgstr "" -#, python-brace-format -msgid "Failed to download {url}. HTTP status code {status_code}" -msgstr "" - #, python-brace-format msgid "" "{model} '{val}' did not exist in Geotrek-Admin and was automatically created" diff --git a/geotrek/cirkwi/locale/fr/LC_MESSAGES/django.po b/geotrek/cirkwi/locale/fr/LC_MESSAGES/django.po index 065a22ce90..224ed19959 100644 --- a/geotrek/cirkwi/locale/fr/LC_MESSAGES/django.po +++ b/geotrek/cirkwi/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 12:30+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -44,10 +44,6 @@ msgstr "Catégorie de POI Cirkwi" msgid "Cirkwi POI categories" msgstr "Catégories de POI Cirkwi" -#, python-brace-format -msgid "Failed to download {url}. HTTP status code {status_code}" -msgstr "Téléchargement impossible de {url}. Code d'erreur HTTP {status_code}" - #, python-brace-format msgid "" "{model} '{val}' did not exist in Geotrek-Admin and was automatically created" diff --git a/geotrek/cirkwi/locale/it/LC_MESSAGES/django.po b/geotrek/cirkwi/locale/it/LC_MESSAGES/django.po index 437d36b743..edaee0eb4f 100644 --- a/geotrek/cirkwi/locale/it/LC_MESSAGES/django.po +++ b/geotrek/cirkwi/locale/it/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 12:48+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,10 +45,6 @@ msgstr "" msgid "Cirkwi POI categories" msgstr "" -#, python-brace-format -msgid "Failed to download {url}. HTTP status code {status_code}" -msgstr "" - #, python-brace-format msgid "" "{model} '{val}' did not exist in Geotrek-Admin and was automatically created" diff --git a/geotrek/cirkwi/locale/nl/LC_MESSAGES/django.po b/geotrek/cirkwi/locale/nl/LC_MESSAGES/django.po index 437d36b743..edaee0eb4f 100644 --- a/geotrek/cirkwi/locale/nl/LC_MESSAGES/django.po +++ b/geotrek/cirkwi/locale/nl/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 12:48+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,10 +45,6 @@ msgstr "" msgid "Cirkwi POI categories" msgstr "" -#, python-brace-format -msgid "Failed to download {url}. HTTP status code {status_code}" -msgstr "" - #, python-brace-format msgid "" "{model} '{val}' did not exist in Geotrek-Admin and was automatically created" diff --git a/geotrek/common/forms.py b/geotrek/common/forms.py index c163145f98..6ed0860623 100644 --- a/geotrek/common/forms.py +++ b/geotrek/common/forms.py @@ -388,7 +388,7 @@ def __init__(self, request, *args, **kwargs): self.helper.form_style = "default" self.helper.label_class = 'col-md-3' self.helper.field_class = 'col-md-9' - self.fields['next'].initial = f"{self._object.get_detail_url()}?tab=attachments-accessibility" + self.fields['next'].initial = f"{self._object.get_detail_url()}?tab=attachments" if not self.instance.pk: form_actions = [ @@ -423,7 +423,7 @@ class Meta: def success_url(self): obj = self._object - return f"{obj.get_detail_url()}?tab=attachments-accessibility" + return f"{obj.get_detail_url()}?tab=attachments" def clean_attachment_accessibility_file(self): uploaded_image = self.cleaned_data.get("attachment_accessibility_file", False) diff --git a/geotrek/common/locale/de/LC_MESSAGES/django.po b/geotrek/common/locale/de/LC_MESSAGES/django.po index 242d48b728..5993469057 100644 --- a/geotrek/common/locale/de/LC_MESSAGES/django.po +++ b/geotrek/common/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-06 08:26+0000\n" +"POT-Creation-Date: 2025-01-07 14:35+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -695,6 +695,16 @@ msgctxt "West" msgid "W" msgstr "" +msgid "" +"Feature geometry cannot be converted to a single continuous LineString " +"feature" +msgstr "" + +msgid "" +"Geometries from various features cannot be converted to a single continuous " +"LineString feature" +msgstr "" + msgid "Reports" msgstr "" diff --git a/geotrek/common/locale/en/LC_MESSAGES/django.po b/geotrek/common/locale/en/LC_MESSAGES/django.po index 242d48b728..5993469057 100644 --- a/geotrek/common/locale/en/LC_MESSAGES/django.po +++ b/geotrek/common/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-06 08:26+0000\n" +"POT-Creation-Date: 2025-01-07 14:35+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -695,6 +695,16 @@ msgctxt "West" msgid "W" msgstr "" +msgid "" +"Feature geometry cannot be converted to a single continuous LineString " +"feature" +msgstr "" + +msgid "" +"Geometries from various features cannot be converted to a single continuous " +"LineString feature" +msgstr "" + msgid "Reports" msgstr "" diff --git a/geotrek/common/locale/es/LC_MESSAGES/django.po b/geotrek/common/locale/es/LC_MESSAGES/django.po index cfdf07737a..bbbe3118bb 100644 --- a/geotrek/common/locale/es/LC_MESSAGES/django.po +++ b/geotrek/common/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-06 08:26+0000\n" +"POT-Creation-Date: 2025-01-07 14:35+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Olivia Duval \n" "Language-Team: LANGUAGE \n" @@ -695,6 +695,16 @@ msgctxt "West" msgid "W" msgstr "" +msgid "" +"Feature geometry cannot be converted to a single continuous LineString " +"feature" +msgstr "" + +msgid "" +"Geometries from various features cannot be converted to a single continuous " +"LineString feature" +msgstr "" + msgid "Reports" msgstr "" diff --git a/geotrek/common/locale/fr/LC_MESSAGES/django.po b/geotrek/common/locale/fr/LC_MESSAGES/django.po index b3f66c1095..4bbb275daa 100644 --- a/geotrek/common/locale/fr/LC_MESSAGES/django.po +++ b/geotrek/common/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-06 08:26+0000\n" +"POT-Creation-Date: 2025-01-07 14:35+0000\n" "PO-Revision-Date: 2020-09-23 07:10+0000\n" "Last-Translator: Emmanuelle Helly \n" "Language-Team: French \n" "Language-Team: LANGUAGE \n" @@ -695,6 +695,16 @@ msgctxt "West" msgid "W" msgstr "" +msgid "" +"Feature geometry cannot be converted to a single continuous LineString " +"feature" +msgstr "" + +msgid "" +"Geometries from various features cannot be converted to a single continuous " +"LineString feature" +msgstr "" + msgid "Reports" msgstr "" diff --git a/geotrek/common/locale/nl/LC_MESSAGES/django.po b/geotrek/common/locale/nl/LC_MESSAGES/django.po index 242d48b728..5993469057 100644 --- a/geotrek/common/locale/nl/LC_MESSAGES/django.po +++ b/geotrek/common/locale/nl/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-06 08:26+0000\n" +"POT-Creation-Date: 2025-01-07 14:35+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -695,6 +695,16 @@ msgctxt "West" msgid "W" msgstr "" +msgid "" +"Feature geometry cannot be converted to a single continuous LineString " +"feature" +msgstr "" + +msgid "" +"Geometries from various features cannot be converted to a single continuous " +"LineString feature" +msgstr "" + msgid "Reports" msgstr "" diff --git a/geotrek/common/templates/common/hdviewpoint_detail.html b/geotrek/common/templates/common/hdviewpoint_detail.html index 7f7a02b2ad..bdeebbd334 100644 --- a/geotrek/common/templates/common/hdviewpoint_detail.html +++ b/geotrek/common/templates/common/hdviewpoint_detail.html @@ -42,7 +42,6 @@

{{ object }}

{% block detailspanel %} -

{% trans "Attributes" %}

diff --git a/geotrek/common/tests/test_attachments.py b/geotrek/common/tests/test_attachments.py index db17c15482..7878a8091c 100644 --- a/geotrek/common/tests/test_attachments.py +++ b/geotrek/common/tests/test_attachments.py @@ -230,7 +230,7 @@ def attachmentPostData(self): 'legend': "A legend", 'attachment_accessibility_file': get_dummy_uploaded_image(name='face.png'), 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" } return data @@ -238,7 +238,7 @@ def test_upload_redirects_to_trek_detail_url(self): response = self.client.post(add_url_for_obj(self.object), data=self.attachmentPostData()) self.assertEqual(response.status_code, 302) - self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments-accessibility") + self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments") self.assertEqual(3, AccessibilityAttachment.objects.count()) self.client.force_login(user=self.user) @@ -278,7 +278,7 @@ def attachmentPostData(self): 'legend': "A legend", 'attachment_accessibility_file': get_dummy_uploaded_image(name='face.png'), 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" } return data @@ -300,7 +300,7 @@ def test_post_update_url(self): data=self.attachmentPostData(), ) self.assertEqual(response.status_code, 302) - self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments-accessibility") + self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments") self.attachment.refresh_from_db() self.assertEqual(self.attachment.legend, "A legend") self.client.force_login(user=self.user) @@ -318,7 +318,7 @@ def test_get_delete_with_perms_url(self): self.client.force_login(user=self.superuser) response = self.client.get(delete_url_for_obj(self.attachment)) self.assertEqual(response.status_code, 302) - self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments-accessibility") + self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments") self.assertEqual(1, AccessibilityAttachment.objects.count()) self.client.force_login(user=self.user) @@ -334,7 +334,7 @@ def user_perms(p, obj=None): self.client.force_login(user=self.user) response = self.client.get(delete_url_for_obj(self.attachment)) self.assertEqual(response.status_code, 302) - self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments-accessibility") + self.assertEqual(response['location'], f"{self.object.get_detail_url()}?tab=attachments") self.assertEqual(2, AccessibilityAttachment.objects.count()) response = self.client.get(delete_url_for_obj(self.attachment), follow=True) self.assertIn(b'You are not allowed to delete this attachment.', response.content) @@ -446,7 +446,7 @@ def test_attachment_is_larger_max_size(self): 'attachment_accessibility_file': SimpleUploadedFile(file.name, file.read(), content_type='image/png'), 'author': "newauthor", 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" } ) self.assertEqual(response.status_code, 302) @@ -462,7 +462,7 @@ def test_attachment_is_larger_max_size(self): 'attachment_accessibility_file': big_image, 'author': "newauthor", 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" }, follow=True ) @@ -488,7 +488,7 @@ def test_attachment_is_not_wide_enough(self): 'author': "newauthor", 'legend': "A legend", 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" } ) self.assertEqual(response.status_code, 302) @@ -508,7 +508,7 @@ def test_attachment_is_not_wide_enough(self): 'attachment_accessibility_file': SimpleUploadedFile(small_file.name, small_file.read(), content_type='image/png'), 'author': "newauthor", 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" }, follow=True ) @@ -535,7 +535,7 @@ def test_attachment_is_not_tall_enough(self): 'attachment_accessibility_file': SimpleUploadedFile(file.name, file.read(), content_type='image/png'), 'author': "newauthor", 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" } ) self.assertEqual(response.status_code, 302) @@ -555,7 +555,7 @@ def test_attachment_is_not_tall_enough(self): 'author': "newauthor", 'legend': "A legend", 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" }, follow=True ) @@ -577,7 +577,7 @@ def test_attachment_deleted(self): 'author': "newauthor", 'legend': "A legend", 'info_accessibility': 'slope', - 'next': f"{self.object.get_detail_url()}?tab=attachments-accessibility" + 'next': f"{self.object.get_detail_url()}?tab=attachments" } ) self.assertEqual(response.status_code, 302) diff --git a/geotrek/common/views.py b/geotrek/common/views.py index 70fa21ea03..76824e0b9b 100644 --- a/geotrek/common/views.py +++ b/geotrek/common/views.py @@ -487,7 +487,7 @@ def delete_attachment_accessibility(request, attachment_pk): else: error_msg = _('You are not allowed to delete this attachment.') messages.error(request, error_msg) - return HttpResponseRedirect(f"{obj.get_detail_url()}?tab=attachments-accessibility") + return HttpResponseRedirect(f"{obj.get_detail_url()}?tab=attachments") home = last_list diff --git a/geotrek/core/templates/core/path_detail_attributes.html b/geotrek/core/templates/core/path_detail_attributes.html index 6736e81e65..eecf9b27a6 100644 --- a/geotrek/core/templates/core/path_detail_attributes.html +++ b/geotrek/core/templates/core/path_detail_attributes.html @@ -3,7 +3,6 @@ {% block attributes %} -

{% trans "Attributes" %}

{{ object|verbose:"title" }}
diff --git a/geotrek/core/templates/core/trail_detail.html b/geotrek/core/templates/core/trail_detail.html index 4892505243..11d1fc3827 100644 --- a/geotrek/core/templates/core/trail_detail.html +++ b/geotrek/core/templates/core/trail_detail.html @@ -8,4 +8,4 @@
{% trans "GPX" %} {% trans "KML" %} -{% endblock download %} \ No newline at end of file +{% endblock download %} diff --git a/geotrek/core/templates/core/trail_detail_attributes.html b/geotrek/core/templates/core/trail_detail_attributes.html index 2b05d58d28..c5e9037ede 100644 --- a/geotrek/core/templates/core/trail_detail_attributes.html +++ b/geotrek/core/templates/core/trail_detail_attributes.html @@ -3,7 +3,6 @@ {% block attributes %} -

{% trans "Attributes" %}

{{ object|verbose:"name" }}
diff --git a/geotrek/diving/templates/diving/dive_detail_attributes.html b/geotrek/diving/templates/diving/dive_detail_attributes.html index b9b3218f4d..cd61aff019 100644 --- a/geotrek/diving/templates/diving/dive_detail_attributes.html +++ b/geotrek/diving/templates/diving/dive_detail_attributes.html @@ -2,7 +2,6 @@ {% load i18n mapentity_tags %} {% block attributes %} -

{% trans "Attributes" %}

{{ trail|verbose:"structure" }}
diff --git a/geotrek/feedback/locale/de/LC_MESSAGES/django.po b/geotrek/feedback/locale/de/LC_MESSAGES/django.po index a65044cb84..f5d7486e88 100644 --- a/geotrek/feedback/locale/de/LC_MESSAGES/django.po +++ b/geotrek/feedback/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-04 15:20+0000\n" +"POT-Creation-Date: 2025-01-06 15:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -266,6 +266,12 @@ msgid "" "Some data could not be forwarded to Suricate yet - Please come back later" msgstr "" +msgid "Intervention" +msgstr "" + +msgid "Add a new intervention" +msgstr "" + msgid "Attributes" msgstr "" @@ -296,12 +302,6 @@ msgstr "" msgid "No" msgstr "" -msgid "Intervention" -msgstr "" - -msgid "Add a new intervention" -msgstr "" - msgid "Map" msgstr "" diff --git a/geotrek/feedback/locale/en/LC_MESSAGES/django.po b/geotrek/feedback/locale/en/LC_MESSAGES/django.po index a65044cb84..f5d7486e88 100644 --- a/geotrek/feedback/locale/en/LC_MESSAGES/django.po +++ b/geotrek/feedback/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-04 15:20+0000\n" +"POT-Creation-Date: 2025-01-06 15:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -266,6 +266,12 @@ msgid "" "Some data could not be forwarded to Suricate yet - Please come back later" msgstr "" +msgid "Intervention" +msgstr "" + +msgid "Add a new intervention" +msgstr "" + msgid "Attributes" msgstr "" @@ -296,12 +302,6 @@ msgstr "" msgid "No" msgstr "" -msgid "Intervention" -msgstr "" - -msgid "Add a new intervention" -msgstr "" - msgid "Map" msgstr "" diff --git a/geotrek/feedback/locale/es/LC_MESSAGES/django.po b/geotrek/feedback/locale/es/LC_MESSAGES/django.po index a65044cb84..f5d7486e88 100644 --- a/geotrek/feedback/locale/es/LC_MESSAGES/django.po +++ b/geotrek/feedback/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-04 15:20+0000\n" +"POT-Creation-Date: 2025-01-06 15:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -266,6 +266,12 @@ msgid "" "Some data could not be forwarded to Suricate yet - Please come back later" msgstr "" +msgid "Intervention" +msgstr "" + +msgid "Add a new intervention" +msgstr "" + msgid "Attributes" msgstr "" @@ -296,12 +302,6 @@ msgstr "" msgid "No" msgstr "" -msgid "Intervention" -msgstr "" - -msgid "Add a new intervention" -msgstr "" - msgid "Map" msgstr "" diff --git a/geotrek/feedback/locale/fr/LC_MESSAGES/django.po b/geotrek/feedback/locale/fr/LC_MESSAGES/django.po index 815161a0ff..0d1940c847 100644 --- a/geotrek/feedback/locale/fr/LC_MESSAGES/django.po +++ b/geotrek/feedback/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-04 15:20+0000\n" +"POT-Creation-Date: 2025-01-06 15:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -136,7 +136,7 @@ msgid "to" msgstr "à" msgid "Follow-up message generated by Geotrek" -msgstr "" +msgstr "Message de suivi généré par Geotrek" msgid "New report to process" msgstr "Nouveau Signalement à traiter" @@ -148,19 +148,19 @@ msgid "Tag" msgstr "Clé" msgid "Label" -msgstr "" +msgstr "Label" msgid "Paths" -msgstr "" +msgstr "Tronçons" msgid "Treks" msgstr "Itinéraires" msgid "POIs" -msgstr "" +msgstr "POIs" msgid "Services" -msgstr "" +msgstr "Services" msgid "Interventions" msgstr "Interventions" @@ -178,7 +178,7 @@ msgid "Identifiant" msgstr "Identifiant" msgid "Color" -msgstr "" +msgstr "Couleur" msgid "Display in legend" msgstr "Afficher dans la légende" @@ -199,7 +199,7 @@ msgstr "" "comptes à rebours. La valeur 0 désactive les alertes" msgid "Suricate label" -msgstr "" +msgstr "Label Suricate" msgid "Problem magnitudes" msgstr "Amplitudes des problèmes" @@ -278,11 +278,17 @@ msgstr "" "Des informations n'ont pas encore pu être transmises à Suricate - Merci de " "vérifier plus tard" +msgid "Intervention" +msgstr "Intervention" + +msgid "Add a new intervention" +msgstr "Ajouter une nouvelle intervention" + msgid "Attributes" msgstr "Informations" msgid "None" -msgstr "" +msgstr "Aucun(e)" msgid "Districts" msgstr "Secteurs" @@ -303,19 +309,13 @@ msgid "Date" msgstr "Date" msgid "Yes" -msgstr "" +msgstr "Oui" msgid "No" -msgstr "" - -msgid "Intervention" -msgstr "Intervention" - -msgid "Add a new intervention" -msgstr "Ajouter une nouvelle intervention" +msgstr "Non" msgid "Map" -msgstr "" +msgstr "Carte" #, python-format msgid "%(email)s has sent a feedback." diff --git a/geotrek/feedback/locale/it/LC_MESSAGES/django.po b/geotrek/feedback/locale/it/LC_MESSAGES/django.po index a65044cb84..f5d7486e88 100644 --- a/geotrek/feedback/locale/it/LC_MESSAGES/django.po +++ b/geotrek/feedback/locale/it/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-04 15:20+0000\n" +"POT-Creation-Date: 2025-01-06 15:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -266,6 +266,12 @@ msgid "" "Some data could not be forwarded to Suricate yet - Please come back later" msgstr "" +msgid "Intervention" +msgstr "" + +msgid "Add a new intervention" +msgstr "" + msgid "Attributes" msgstr "" @@ -296,12 +302,6 @@ msgstr "" msgid "No" msgstr "" -msgid "Intervention" -msgstr "" - -msgid "Add a new intervention" -msgstr "" - msgid "Map" msgstr "" diff --git a/geotrek/feedback/locale/nl/LC_MESSAGES/django.po b/geotrek/feedback/locale/nl/LC_MESSAGES/django.po index a65044cb84..f5d7486e88 100644 --- a/geotrek/feedback/locale/nl/LC_MESSAGES/django.po +++ b/geotrek/feedback/locale/nl/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-04 15:20+0000\n" +"POT-Creation-Date: 2025-01-06 15:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -266,6 +266,12 @@ msgid "" "Some data could not be forwarded to Suricate yet - Please come back later" msgstr "" +msgid "Intervention" +msgstr "" + +msgid "Add a new intervention" +msgstr "" + msgid "Attributes" msgstr "" @@ -296,12 +302,6 @@ msgstr "" msgid "No" msgstr "" -msgid "Intervention" -msgstr "" - -msgid "Add a new intervention" -msgstr "" - msgid "Map" msgstr "" diff --git a/geotrek/feedback/templates/feedback/report_detail.html b/geotrek/feedback/templates/feedback/report_detail.html index c2f9e9391c..0596f704b1 100644 --- a/geotrek/feedback/templates/feedback/report_detail.html +++ b/geotrek/feedback/templates/feedback/report_detail.html @@ -1,5 +1,5 @@ {% extends "common/common_detail.html" %} -{% load feedback_tags i18n %} +{% load feedback_tags i18n mapentity_tags %} {% block detailspanel %} @@ -19,3 +19,38 @@ {{ block.super }} {% endblock detailspanel %} + +{% block related_objects_tab_content %} + {% suricate_workflow_enabled as suricate_workflow_enabled %} +
{{ object|verbose:"structure" }}
+ + + {% endif %} + +
+ {% if perms.maintenance.add_intervention %} +

{% trans "Intervention" %}

+ {% with columns="name,status,stake,total_cost,begin_date,end_date" %} + {% valuetable report.interventions.all columns=columns %} + {% endwith %} + {% if not suricate_workflow_enabled %} +

+

+ + {% trans "Add a new intervention" %} +

+ {% elif suricate_workflow_enabled and report.interventions.all|length == 0 %} + {% if report.status.identifier == 'late_intervention' or report.status.identifier == 'waiting' %} +

+

+ + {% trans "Add a new intervention" %} +

+ {% endif %} + {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/geotrek/feedback/templates/feedback/report_detail_attributes.html b/geotrek/feedback/templates/feedback/report_detail_attributes.html index 7f46fa455f..b5cc2a68ea 100644 --- a/geotrek/feedback/templates/feedback/report_detail_attributes.html +++ b/geotrek/feedback/templates/feedback/report_detail_attributes.html @@ -5,7 +5,6 @@ {% block attributes %} {% suricate_workflow_enabled as suricate_workflow_enabled %} {% workflow_manager as workflow_manager %} -

{% trans "Attributes" %}

{% if not suricate_workflow_enabled or request.user.pk == workflow_manager or request.user.is_superuser%} @@ -125,35 +124,5 @@

{% trans "Attributes" %}

{% endif %} {% include "mapentity/trackinfo_fragment.html" %}
- - - - - {% endif %} - -
- {% if perms.maintenance.add_intervention %} -

{% trans "Intervention" %}

- {% with columns="name,status,stake,total_cost,begin_date,end_date" %} - {% valuetable report.interventions.all columns=columns %} - {% endwith %} - {% if not suricate_workflow_enabled %} -

-

- - {% trans "Add a new intervention" %} -

- {% elif suricate_workflow_enabled and report.interventions.all|length == 0 %} - {% if report.status.identifier == 'late_intervention' or report.status.identifier == 'waiting' %} -

-

- - {% trans "Add a new intervention" %} -

- {% endif %} - {% endif %} -
{% endblock attributes %} diff --git a/geotrek/infrastructure/templates/infrastructure/infrastructure_detail_attributes.html b/geotrek/infrastructure/templates/infrastructure/infrastructure_detail_attributes.html index 7fd4c13287..c9269d0a02 100644 --- a/geotrek/infrastructure/templates/infrastructure/infrastructure_detail_attributes.html +++ b/geotrek/infrastructure/templates/infrastructure/infrastructure_detail_attributes.html @@ -3,7 +3,6 @@ {% block attributes %} -

{% trans "Attributes" %}

diff --git a/geotrek/outdoor/templates/outdoor/course_detail_attributes.html b/geotrek/outdoor/templates/outdoor/course_detail_attributes.html index 092f126711..2fda024c8f 100644 --- a/geotrek/outdoor/templates/outdoor/course_detail_attributes.html +++ b/geotrek/outdoor/templates/outdoor/course_detail_attributes.html @@ -2,9 +2,8 @@ {% load i18n geotrek_tags mapentity_tags outdoor_tags %} {% block attributes %}

{% trans "Tree view" %}

- {% include "outdoor/recursive_courses_tree.html" with sites_at_level=course.all_hierarchy_roots original_course=object %} + {% include "outdoor/recursive_courses_tree.html" with sites_at_level=course.all_hierarchy_roots original_course=object %} -

{% trans "Attributes" %}

{{ object|verbose:"structure" }}
diff --git a/geotrek/outdoor/templates/outdoor/site_detail_attributes.html b/geotrek/outdoor/templates/outdoor/site_detail_attributes.html index 809bdecb0e..4132111c88 100644 --- a/geotrek/outdoor/templates/outdoor/site_detail_attributes.html +++ b/geotrek/outdoor/templates/outdoor/site_detail_attributes.html @@ -5,7 +5,6 @@

{% trans "Tree view" %}

{% site_as_list site.get_root as root_as_list %} {% include "outdoor/recursive_sites_tree.html" with sites_at_level=root_as_list original_site=object %} -

{% trans "Attributes" %}

{{ object|verbose:"structure" }}
@@ -114,7 +113,7 @@

{% trans "Attributes" %}

{{ object|verbose:"structure" }} {% for label in object.labels.all %} {% if label.published %} - + {% endif %} {{ label.name }}
{% endfor %} diff --git a/geotrek/sensitivity/templates/sensitivity/sensitivearea_detail_attributes.html b/geotrek/sensitivity/templates/sensitivity/sensitivearea_detail_attributes.html index bbaaa39ab0..426e9a47a6 100644 --- a/geotrek/sensitivity/templates/sensitivity/sensitivearea_detail_attributes.html +++ b/geotrek/sensitivity/templates/sensitivity/sensitivearea_detail_attributes.html @@ -10,7 +10,6 @@ padding: 2px; } -

{% trans "Attributes" %}

diff --git a/geotrek/tourism/templates/tourism/touristiccontent_detail_attributes.html b/geotrek/tourism/templates/tourism/touristiccontent_detail_attributes.html index 48b510e9de..deaf0a42e7 100644 --- a/geotrek/tourism/templates/tourism/touristiccontent_detail_attributes.html +++ b/geotrek/tourism/templates/tourism/touristiccontent_detail_attributes.html @@ -2,7 +2,6 @@ {% load i18n mapentity_tags %} {% block attributes %} -

{% trans "Attributes" %}

{{ sensitivearea|verbose:"structure" }}
diff --git a/geotrek/tourism/templates/tourism/touristicevent_detail_attributes.html b/geotrek/tourism/templates/tourism/touristicevent_detail_attributes.html index abbbbb8985..9ac7920c8d 100644 --- a/geotrek/tourism/templates/tourism/touristicevent_detail_attributes.html +++ b/geotrek/tourism/templates/tourism/touristicevent_detail_attributes.html @@ -2,7 +2,6 @@ {% load i18n mapentity_tags %} {% block attributes %} -

{% trans "Attributes" %}

{{ object|verbose:"structure" }}
diff --git a/geotrek/trekking/locale/de/LC_MESSAGES/django.po b/geotrek/trekking/locale/de/LC_MESSAGES/django.po index ed5d526102..bd964fb551 100644 --- a/geotrek/trekking/locale/de/LC_MESSAGES/django.po +++ b/geotrek/trekking/locale/de/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-08 16:23+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: 2015-10-21 11:16+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -484,16 +484,6 @@ msgstr "" msgid "APIDAE Trek #%(eid_val)s at line %(line)s" msgstr "" -msgid "" -"Feature geometry cannot be converted to a single continuous LineString " -"feature" -msgstr "" - -msgid "" -"Geometries from various features cannot be converted to a single continuous " -"LineString feature" -msgstr "" - msgid "Trek geometry is None" msgstr "" @@ -559,9 +549,6 @@ msgstr "" msgid "Print booklet" msgstr "" -msgid "Photos accessibility" -msgstr "" - msgid "Itinerancy" msgstr "Roaming" diff --git a/geotrek/trekking/locale/en/LC_MESSAGES/django.po b/geotrek/trekking/locale/en/LC_MESSAGES/django.po index 65b7dbe881..f4eeb7af72 100644 --- a/geotrek/trekking/locale/en/LC_MESSAGES/django.po +++ b/geotrek/trekking/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-08 16:23+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -469,16 +469,6 @@ msgstr "" msgid "APIDAE Trek #%(eid_val)s at line %(line)s" msgstr "" -msgid "" -"Feature geometry cannot be converted to a single continuous LineString " -"feature" -msgstr "" - -msgid "" -"Geometries from various features cannot be converted to a single continuous " -"LineString feature" -msgstr "" - msgid "Trek geometry is None" msgstr "" @@ -542,9 +532,6 @@ msgstr "" msgid "Print booklet" msgstr "" -msgid "Photos accessibility" -msgstr "" - msgid "Itinerancy" msgstr "" diff --git a/geotrek/trekking/locale/es/LC_MESSAGES/django.po b/geotrek/trekking/locale/es/LC_MESSAGES/django.po index 5f1ddf2b0d..cda5340c44 100644 --- a/geotrek/trekking/locale/es/LC_MESSAGES/django.po +++ b/geotrek/trekking/locale/es/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-08 16:23+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: 2015-10-21 11:16+0200\n" "Last-Translator: jean-etienne.castagnede@makina-corpus.com\n" "Language-Team: \n" @@ -469,16 +469,6 @@ msgstr "" msgid "APIDAE Trek #%(eid_val)s at line %(line)s" msgstr "" -msgid "" -"Feature geometry cannot be converted to a single continuous LineString " -"feature" -msgstr "" - -msgid "" -"Geometries from various features cannot be converted to a single continuous " -"LineString feature" -msgstr "" - msgid "Trek geometry is None" msgstr "" @@ -542,9 +532,6 @@ msgstr "" msgid "Print booklet" msgstr "" -msgid "Photos accessibility" -msgstr "" - msgid "Itinerancy" msgstr "" diff --git a/geotrek/trekking/locale/fr/LC_MESSAGES/django.po b/geotrek/trekking/locale/fr/LC_MESSAGES/django.po index d96b44ad64..dac6d0f958 100644 --- a/geotrek/trekking/locale/fr/LC_MESSAGES/django.po +++ b/geotrek/trekking/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-08 16:23+0000\n" +"POT-Creation-Date: 2025-01-06 15:41+0000\n" "PO-Revision-Date: 2020-09-22 15:57+0000\n" "Last-Translator: Emmanuelle Helly \n" "Language-Team: French {% trans "Attributes" %}
{{ object|verbose:"structure" }}
diff --git a/geotrek/trekking/templates/trekking/service_detail_attributes.html b/geotrek/trekking/templates/trekking/service_detail_attributes.html index fb0a448f12..a02e9fa7aa 100644 --- a/geotrek/trekking/templates/trekking/service_detail_attributes.html +++ b/geotrek/trekking/templates/trekking/service_detail_attributes.html @@ -2,7 +2,6 @@ {% load i18n mapentity_tags %} {% block attributes %} -

{% trans "Attributes" %}

diff --git a/geotrek/trekking/templates/trekking/trek_detail.html b/geotrek/trekking/templates/trekking/trek_detail.html index f61389344e..42af1762d2 100644 --- a/geotrek/trekking/templates/trekking/trek_detail.html +++ b/geotrek/trekking/templates/trekking/trek_detail.html @@ -12,19 +12,8 @@ {% trans "Print booklet" %} {% endblock download %} -{% block after_attachments_extra_tab_nav %} - {% is_photos_accessibilities_enabled as enabled %} - {% if enabled %} - - {% endif %} -{% endblock %} - - {% block attachments_extra_tab_nav %} - {% with attachments_count=object.attachments.count|add:object.view_points.count %} + {% with attachments_count=object.attachments.count|add:object.attachments_accessibility.count|add:object.view_points.count %}
@@ -38,7 +37,7 @@

{% trans "Attributes" %}

{{ trek|verbose:"structure" }} {% for label in trek.labels.all %} {% if label.published %} - + {% endif %} {{ label.name }}
{% endfor %} @@ -260,5 +259,6 @@

{% trans "Attributes" %}

+ {{ block.super }} {% endblock attributes %}