From 864834afa3a1ecd47825d8cf8b05b9a07f9aff3b Mon Sep 17 00:00:00 2001
From: Benjamin Becker <benjamin.becker@dataport.de>
Date: Fri, 30 Apr 2021 08:11:10 +0000
Subject: [PATCH] removes label "NEU" for historical datasets, improves
 accessibility for historical datasets

---
 ckanext/odsh/public/odsh.css                      | 6 +++++-
 ckanext/odsh/templates/snippets/package_item.html | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ckanext/odsh/public/odsh.css b/ckanext/odsh/public/odsh.css
index 3530e9c7..1b318798 100644
--- a/ckanext/odsh/public/odsh.css
+++ b/ckanext/odsh/public/odsh.css
@@ -739,7 +739,11 @@ label.rangesearch.disabled {
     border-bottom: none;
 }
 
-.opaque {
+.historical {
+    opacity: 0.8;
+}
+
+.historical img {
     opacity: 0.6;
 }
 
diff --git a/ckanext/odsh/templates/snippets/package_item.html b/ckanext/odsh/templates/snippets/package_item.html
index c94fa9a4..0867c1d2 100644
--- a/ckanext/odsh/templates/snippets/package_item.html
+++ b/ckanext/odsh/templates/snippets/package_item.html
@@ -34,7 +34,7 @@ Example:
 {% set successor_url = collection['successor']['url'] if collection else None %}
 
 {% block package_item %}
-<li class="odsh-dataset-item {% if successor_url %}opaque{% endif %}">
+<li class="odsh-dataset-item {% if successor_url %}historical{% endif %}">
     <div class="preview-image-container">
             {% if thumbnail %}
             <a href={{  h.url_for(controller='package', action='read', id=package.name) }}>
@@ -73,7 +73,7 @@ Example:
             {% if successor_url %}
             <span class='label historical-dataset-label'>{{ _('historical') }}</span>
             {% endif %}
-            {% if package.is_new %}
+            {% if package.is_new and not successor_url %}
             <span class='label new-dataset-label'>{{ _('NEW') }}</span>
             {% endif %}
             {% if package.private %}
-- 
GitLab