Skip to content

Commit

Permalink
💄 [UI/UX] Restructure detail page (#2967)
Browse files Browse the repository at this point in the history
- Move an object's related objects from the properties tab into their own tab
- Move accessibility pictures into the attached files tab
- Remove the display of the structure in the properties tab title
  • Loading branch information
justinefricou committed Jan 8, 2025
1 parent 4dba2fb commit a094287
Show file tree
Hide file tree
Showing 49 changed files with 211 additions and 273 deletions.
6 changes: 3 additions & 3 deletions cypress/integration/nav_tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ CHANGELOG
2.111.0+dev (XXXX-XX-XX)
----------------------------

**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
Expand Down

This file was deleted.

6 changes: 1 addition & 5 deletions geotrek/cirkwi/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions geotrek/cirkwi/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions geotrek/cirkwi/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions geotrek/cirkwi/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions geotrek/cirkwi/locale/it/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions geotrek/cirkwi/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions geotrek/common/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 11 additions & 1 deletion geotrek/common/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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 ""

Expand Down
12 changes: 11 additions & 1 deletion geotrek/common/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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 ""

Expand Down
12 changes: 11 additions & 1 deletion geotrek/common/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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 ""

Expand Down
16 changes: 15 additions & 1 deletion geotrek/common/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\n"
"Language-Team: French <https://weblate.makina-corpus.net/projects/geotrek-"
Expand Down Expand Up @@ -727,6 +727,20 @@ msgctxt "West"
msgid "W"
msgstr "O"

msgid ""
"Feature geometry cannot be converted to a single continuous LineString "
"feature"
msgstr ""
"La géométrie de l'objet ne peut être convertie en une unique LineString "
"continue"

msgid ""
"Geometries from various features cannot be converted to a single continuous "
"LineString feature"
msgstr ""
"Les géométries de plusieurs objets ne peuvent être converties en une unique "
"LineString continue"

msgid "Reports"
msgstr "Signalements"

Expand Down
12 changes: 11 additions & 1 deletion geotrek/common/locale/it/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2013-01-25 15:02+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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 ""

Expand Down
12 changes: 11 additions & 1 deletion geotrek/common/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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 ""

Expand Down
1 change: 0 additions & 1 deletion geotrek/common/templates/common/hdviewpoint_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ <h1 class="details-title">{{ object }}</h1>
<div id="properties" class="tab-pane active show">
{% block detailspanel %}

<h3>{% trans "Attributes" %}</h3>
<table class="table-striped table-bordered table">
<tr>
<th>{{ object|verbose:"title" }}</th>
Expand Down
Loading

0 comments on commit a094287

Please sign in to comment.