From b2dcf3dfd9ea24062429b1094434cdf2d7f199f1 Mon Sep 17 00:00:00 2001 From: Ben Goldsworthy Date: Thu, 5 Oct 2023 18:26:53 +0100 Subject: [PATCH] fix original publication year --- layouts/partials/books/table-body.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/layouts/partials/books/table-body.html b/layouts/partials/books/table-body.html index be7ce86..0f66e2a 100644 --- a/layouts/partials/books/table-body.html +++ b/layouts/partials/books/table-body.html @@ -23,8 +23,10 @@

{{- index . "Year Published" -}} - {{- if ( and ( ne ( index . "Original Publication Year" ) "" ) ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) ( ne ( index . "Original Publication Year" ) nil ) ) -}} -  (orig. {{ index . "Original Publication Year" }}) + {{- if ( index . "Original Publication Year" ) -}} + {{- if ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) -}} +  (orig. {{ index . "Original Publication Year" }}) + {{- end -}} {{- end -}} @@ -62,8 +64,10 @@

{{- index . "Year Published" -}} - {{- if ( and ( ne ( index . "Original Publication Year" ) "" ) ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) ) -}} -  (orig. {{ index . "Original Publication Year" }}) + {{- if ( index . "Original Publication Year" ) -}} + {{- if ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) -}} +  (orig. {{ index . "Original Publication Year" }}) + {{- end -}} {{- end -}} @@ -106,8 +110,10 @@

{{- index . "Year Published" -}} - {{- if ( and ( ne ( index . "Original Publication Year" ) "" ) ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) ) -}} -  (orig. {{ index . "Original Publication Year" }}) + {{- if ( index . "Original Publication Year" ) -}} + {{- if ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) -}} +  (orig. {{ index . "Original Publication Year" }}) + {{- end -}} {{- end -}} @@ -149,7 +155,9 @@

{{- index . "Year Published" -}} {{- if ( index . "Original Publication Year" ) -}} - (orig. {{ index . "Orginal Publication Year" }}) + {{- if ( ne ( index . "Original Publication Year" ) ( index . "Year Published" ) ) -}} +  (orig. {{ index . "Original Publication Year" }}) + {{- end -}} {{- end -}} n/a