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
This commit is contained in:
Serge Bibauw authored and gcushen committed 2018-07-15 18:01:59 +01:00
1 parent c42f4a8cf2
commit 2bc968b9c5
1 file changed
+2 -2
+2 -2
View File
@@ -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 }}
<h2>{{ (i18n "talks") }}</h2>
{{ range $items }}
{{ range sort $items ".Params.time_start" "desc" }}
{{ partial "talk_li_simple" . }}
{{ end }}
{{ end }}