Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit f971801

Browse files
authored
Fix sponsorship CTA for maxed out levels (#389)
Fixes #387 Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
1 parent 75f5595 commit f971801

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

layouts/partials/sponsors.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010
<!--first sponsor row-->
1111
<div class="col-md-12">
1212
<h4 class="sponsor-cta">{{ $level.label }} Sponsors</h4>
13+
{{ if $e.sponsors}}
14+
{{ range where $e.sponsors "level" $level.id }}
15+
{{ $.Scratch.Add $level.id 1 }}
16+
{{ end }}
17+
{{ end }}
1318
{{- if ( $e.startdate) or (ge (dateFormat "2006-01-02" $e.startdate) (dateFormat "2006-01-02" ($.Now.Format "2006-01-02"))) -}}
1419
{{- if ne $e.sponsors_accepted "no" -}}
1520
{{- if or (not $level.max) (lt ($.Scratch.Get $level.id) $level.max) -}}
1621
<a href = "/events/{{ $e.name }}/sponsor" class="sponsor-cta">
1722
<i>Become a {{ $level.label }} Sponsor!</i>
1823
</a>
19-
{{ $.Scratch.Add $level.id 1 }}
2024
{{- end -}}
2125
{{- end -}}
2226
{{- end -}}

0 commit comments

Comments
 (0)