@@ -146,6 +149,10 @@ Versions
{% endfor %}
+ Version Stats
+
+ {% include 'sharing_portal/includes/stats.html' with artifact=artifact version=version sidebar=True %}
+
{% endblock %}
diff --git a/sharing_portal/templates/sharing_portal/includes/stats.html b/sharing_portal/templates/sharing_portal/includes/stats.html
index c6bf848f..eebaff04 100644
--- a/sharing_portal/templates/sharing_portal/includes/stats.html
+++ b/sharing_portal/templates/sharing_portal/includes/stats.html
@@ -33,17 +33,19 @@
{% load trovi_filters %}
{{ artifact.updated_at | trovi_date_format }}
-
+ {% endif %}
From 0e35eef5360194a09264fc1fa182771a46183108 Mon Sep 17 00:00:00 2001
From: Anish Reddy Ravula <2anishreddy@gmail.com>
Date: Mon, 2 Oct 2023 15:00:45 -0500
Subject: [PATCH 2/3] Do not show last updated and version count for version
stats
---
sharing_portal/templates/sharing_portal/includes/stats.html | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sharing_portal/templates/sharing_portal/includes/stats.html b/sharing_portal/templates/sharing_portal/includes/stats.html
index eebaff04..ae96b129 100644
--- a/sharing_portal/templates/sharing_portal/includes/stats.html
+++ b/sharing_portal/templates/sharing_portal/includes/stats.html
@@ -29,9 +29,11 @@
-
{% endif %}
- {{ artifact.versions | length }}
{% load trovi_filters %}
- {{ artifact.updated_at | trovi_date_format }}
+ {% if not version %}
+ {{ artifact.versions | length }}
+ {{ artifact.updated_at | trovi_date_format }}
+ {% endif %}
{% if not sidebar %}
From f626311d8f27478aa1cb908e9c97239da0dae026 Mon Sep 17 00:00:00 2001
From: Anish Reddy Ravula <2anishreddy@gmail.com>
Date: Mon, 2 Oct 2023 15:14:24 -0500
Subject: [PATCH 3/3] remove artifact stats section header as users expect the
stats to be for the artifact
---
sharing_portal/templates/sharing_portal/detail.html | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sharing_portal/templates/sharing_portal/detail.html b/sharing_portal/templates/sharing_portal/detail.html
index 4b47ede6..7aa51ec5 100644
--- a/sharing_portal/templates/sharing_portal/detail.html
+++ b/sharing_portal/templates/sharing_portal/detail.html
@@ -47,10 +47,7 @@
{{ artifact.long_description|markdown|safe }}
-
- Artifact stats
- {% include 'sharing_portal/includes/stats.html' with artifact=artifact version=None %}
-
+ {% include 'sharing_portal/includes/stats.html' with artifact=artifact version=None %}
{% if artifact.authors %}