Skip to content
Snippets Groups Projects
Unverified Commit 68484612 authored by Olivia Simonet's avatar Olivia Simonet Committed by GitHub
Browse files

Merge pull request #250 from noesya/front/archive-share-links

Front/archived events agenda links
parents 0b01dfc9 518e2f09
No related branches found
No related tags found
No related merge requests found
...@@ -30,26 +30,28 @@ ...@@ -30,26 +30,28 @@
{{ partial "commons/share.html" . }} {{ partial "commons/share.html" . }}
</li> </li>
{{ with .Params.dates.add_to_calendar }} {{ if not .Params.dates.archive }}
{{ $links := . }} {{ with .Params.dates.add_to_calendar }}
<li class="events-actions"> {{ $links := . }}
<span>{{ i18n "events.add_to_calendar.title" }}</span> <li class="events-actions">
{{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}} <span>{{ i18n "events.add_to_calendar.title" }}</span>
{{- range $type := $types -}} {{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}}
{{ $label := i18n (printf "events.add_to_calendar.%s" $type) }} {{- range $type := $types -}}
{{ with index $links $type }} {{ $label := i18n (printf "events.add_to_calendar.%s" $type) }}
<a class="chip" {{ with index $links $type }}
{{ if eq $type "ical" -}} <a class="chip"
{{ printf `href="%s"` . | safeHTMLAttr }} download {{ if eq $type "ical" -}}
{{ else }} {{ printf `href="%s"` . | safeHTMLAttr }} download
href="{{ . }}" {{ else }}
target="_blank" href="{{ . }}"
{{ end }} > target="_blank"
{{- $label -}} {{ end }} >
</a> {{- $label -}}
</a>
{{- end }}
{{- end }} {{- end }}
{{- end }} </li>
</li> {{- end }}
{{- end }} {{- end }}
</ul> </ul>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment