From 2bc968b9c5a1c7a2b2e0720ce65df33e7a434fd7 Mon Sep 17 00:00:00 2001 From: Serge Bibauw Date: Sun, 15 Jul 2018 19:01:59 +0200 Subject: [PATCH] projects: Fix list of talks (#548) - Sort list of talks by `time_start` rather than `date` (consistent with home page widget) - Fix bug that made publications duplicate in talks list when there was no talk in a project --- layouts/project/single.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/project/single.html b/layouts/project/single.html index 0f8603f0..04af86f1 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -49,11 +49,11 @@ {{ end }} {{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }} - {{ $items := $items | union (where (where .Site.RegularPages "Type" "publication") ".Params.url_project" $project_path) }} + {{ $items := $items | union (where (where .Site.RegularPages "Type" "talk") ".Params.url_project" $project_path) }} {{ $talks_len := len $items }} {{ if ge $talks_len 1 }}

{{ (i18n "talks") }}

- {{ range $items }} + {{ range sort $items ".Params.time_start" "desc" }} {{ partial "talk_li_simple" . }} {{ end }} {{ end }}