From bc684bb2f48e3b18e0caff9094b14cbc0c65ac66 Mon Sep 17 00:00:00 2001 From: Ziip-dev <62331138+Ziip-dev@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:19:03 +0200 Subject: [PATCH] Modify script in layouts/partials/dashboards.html This enables dashboard cards to show up even if there is no matching entry in the EBI index file yet. These cards will be at the bottom of the dashboard grid and display a text indicating the absence of entry in EBI index. --- layouts/partials/dashboards.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/layouts/partials/dashboards.html b/layouts/partials/dashboards.html index 9a41cc88..11a2c03b 100644 --- a/layouts/partials/dashboards.html +++ b/layouts/partials/dashboards.html @@ -167,11 +167,14 @@
{{ .Name }}
month: 'short', day: 'numeric' }); - cardData.push({ card, updatedDate }); } else { - spanElement.textContent = 'No matching entry in EBI index'; + // In case there is no entry in the EBI file yet, + // we add a mock date for the reordering to keep working + spanElement.textContent = 'not yet available'; + updatedDate = new Date('1900-01-01'); + cardData.push({ card, updatedDate }); } });