From 7f106d949b0591a93da50384f87579d68aa440d0 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Thu, 18 Mar 2021 12:52:17 +0100 Subject: [PATCH] Remove sequential duplicates in literature and sources lists --- webapp/src/main/webapp/themes/iph/templates/text-lib.ftl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl index d7c5d07d6..bcbde83d5 100644 --- a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl @@ -126,8 +126,10 @@ <#if sources?? && sources?has_content && counter > 0>
+ <#assign lastSource = ""/> <#list sources as source> - <#if filter == "none" || source.excerpt == filter > + <#if filter == "none" && lastSource != source.works || source.excerpt == filter > + <#assign lastSource = source.works/>

${source.works}

@@ -141,8 +143,10 @@ <#if literature?? && literature?has_content && counter > 0>
+ <#assign lastLiterature = ""/> <#list literature as literatureItem> - <#if filter == "none" || literatureItem.excerpt == filter > + <#if filter == "none" && lastLiterature != literatureItem.bibliography || literatureItem.excerpt == filter > + <#assign lastLiterature = literatureItem.bibliography/>

${literatureItem.bibliography}