mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
publication archive: Fix error when no publications exist
This commit is contained in:
parent
71feb4ed7e
commit
9e14c8a74e
1 changed files with 2 additions and 0 deletions
|
@ -33,11 +33,13 @@
|
|||
<select class="pub-filters" data-filter-group="year">
|
||||
<option value="*">{{ i18n "filter_all" }}</option>
|
||||
{{ $years_sorted := $.Scratch.GetSortedMapValues "years" }}
|
||||
{{ if $years_sorted }}
|
||||
{{ range $year := sort $years_sorted "" "desc" }}
|
||||
<option value=".year-{{ $year }}">
|
||||
{{ $year }}
|
||||
</option>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</select>
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue