From 8268b6aedca6873c428c4368605ebaf424d6a2d2 Mon Sep 17 00:00:00 2001 From: Lova ANDRIARIMALALA <43842786+Xpirix@users.noreply.github.com> Date: Thu, 18 Apr 2024 14:02:17 +0300 Subject: [PATCH 1/2] Show modified date in the model list and detail --- qgis-app/templates/base/includes/detail_object.html | 4 ++++ qgis-app/templates/base/list.html | 2 ++ qgis-app/templates/base/list_galery.html | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qgis-app/templates/base/includes/detail_object.html b/qgis-app/templates/base/includes/detail_object.html index e1ae3a66..1ad9e4ab 100644 --- a/qgis-app/templates/base/includes/detail_object.html +++ b/qgis-app/templates/base/includes/detail_object.html @@ -7,8 +7,12 @@
{{ object_detail.description|md_to_html }}
Uploaded Date
{{ object_detail.upload_date|date:"d F Y" }}
+{% if object_detail.review_set.last.review_date and object_detail.approved%}
Approved Date
{{ object_detail.review_set.last.review_date|date:"d F Y"}}
+{% endif %} +
Modified Date
+
{{ object_detail.modified_date|date:"d F Y" }}
Creator
{{ object_detail.get_creator_name|title }}
{% if is_qlr %} diff --git a/qgis-app/templates/base/list.html b/qgis-app/templates/base/list.html index 6c5292b1..529ac62d 100644 --- a/qgis-app/templates/base/list.html +++ b/qgis-app/templates/base/list.html @@ -79,6 +79,7 @@

{% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en {% anchor_sort_arrow 'Creator' 'creator' order_by queries %} {% anchor_sort_arrow 'Upload Date' 'upload_date' order_by queries %} + {% anchor_sort_arrow 'Modified Date' 'modified_date' order_by queries %} @@ -105,6 +106,7 @@

{% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en {{ object.download_count }} {{ object.get_creator_name|title }} {{ object.upload_date|date:"d F Y" }} + {{ object.modified_date|date:"d F Y" }} {% if user.is_staff or user == style.creator %}   diff --git a/qgis-app/templates/base/list_galery.html b/qgis-app/templates/base/list_galery.html index 9c2f552f..06b7c26a 100644 --- a/qgis-app/templates/base/list_galery.html +++ b/qgis-app/templates/base/list_galery.html @@ -77,7 +77,7 @@

{% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en @@ -105,7 +105,7 @@

{{ object.name}}

- {{ object.get_creator_name|title }} | {{ object.upload_date|date:"d F Y" }} | {{ object.download_count }} downloads + {{ object.get_creator_name|title }} | {{ object.modified_date|date:"d F Y" }} | {{ object.download_count }} downloads

From 5378d04bfca6070f19b8f2f46f5a020ea557fa1d Mon Sep 17 00:00:00 2001 From: Lova ANDRIARIMALALA <43842786+Xpirix@users.noreply.github.com> Date: Thu, 18 Apr 2024 14:17:54 +0300 Subject: [PATCH 2/2] Show modified date in the gallery --- qgis-app/templates/base/list_galery.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qgis-app/templates/base/list_galery.html b/qgis-app/templates/base/list_galery.html index 06b7c26a..5f230973 100644 --- a/qgis-app/templates/base/list_galery.html +++ b/qgis-app/templates/base/list_galery.html @@ -28,12 +28,12 @@ display: flex; align-items: center; justify-content: center; - height: 420px; + height: 380px; background-color: white; } img.image-demo { height: auto; - max-height: 100%; + max-height: 380px; width: auto; max-width: 100%; } @@ -77,6 +77,7 @@

{% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en