Skip to content
Snippets Groups Projects
Commit 7d4cf3f2 authored by Olivia Simonet's avatar Olivia Simonet Committed by alexisben
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 @@
{{ partial "commons/share.html" . }}
</li>
{{ with .Params.dates.add_to_calendar }}
{{ $links := . }}
<li class="events-actions">
<span>{{ i18n "events.add_to_calendar.title" }}</span>
{{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}}
{{- range $type := $types -}}
{{ $label := i18n (printf "events.add_to_calendar.%s" $type) }}
{{ with index $links $type }}
<a class="chip"
{{ if eq $type "ical" -}}
{{ printf `href="%s"` . | safeHTMLAttr }} download
{{ else }}
href="{{ . }}"
target="_blank"
{{ end }} >
{{- $label -}}
</a>
{{ if not .Params.dates.archive }}
{{ with .Params.dates.add_to_calendar }}
{{ $links := . }}
<li class="events-actions">
<span>{{ i18n "events.add_to_calendar.title" }}</span>
{{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}}
{{- range $type := $types -}}
{{ $label := i18n (printf "events.add_to_calendar.%s" $type) }}
{{ with index $links $type }}
<a class="chip"
{{ if eq $type "ical" -}}
{{ printf `href="%s"` . | safeHTMLAttr }} download
{{ else }}
href="{{ . }}"
target="_blank"
{{ end }} >
{{- $label -}}
</a>
{{- end }}
{{- end }}
{{- end }}
</li>
</li>
{{- end }}
{{- end }}
</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