Skip to content

Commit

Permalink
Merge pull request devopsdays#213 from devopsdays/mattstratton/empty-…
Browse files Browse the repository at this point in the history
…sponsor-fix

Check for empty sponsor on event file. Fixes devopsdays#211
  • Loading branch information
mattstratton committed May 5, 2016
2 parents c8fe982 + 191e603 commit b2c80e2
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions themes/devopsdays-legacy/layouts/partials/event_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,24 @@

<div class="col-md-4">
<!-- sponsor code begin -->
{{ $sponsors := $e.sponsors }}
{{ range $e.sponsor_levels }}
<h2>{{ .label }} Sponsors</h2>
{{ range where $sponsors "level" .id }}
{{ $s := (index $.Site.Data.sponsors .id) }}
{{ if isset $.Site.Data.sponsors .id }}
<a href = "{{ $s.url }}"><img alt = "{{ .id }}" src = "/img/sponsors/{{ .id }}.png" class="img-responsive company-logo" height="100px" width="100px"></a>
{{ if $e.sponsors }}
{{ $sponsors := $e.sponsors }}
{{ range $e.sponsor_levels }}
<h2>{{ .label }} Sponsors</h2>
{{ range where $sponsors "level" .id }}
{{ $s := (index $.Site.Data.sponsors .id) }}
{{ if isset $.Site.Data.sponsors .id }}
<a href = "{{ $s.url }}"><img alt = "{{ .id }}" src = "/img/sponsors/{{ .id }}.png" class="img-responsive company-logo" height="100px" width="100px"></a>
{{ end }}
{{ end }}
{{ if eq $e.status "current" }}
<div class = "sponsor-cta">
<a href = "/events/{{ $e.name }}/sponsor">Become a {{ .label }} Sponsor!</a>
</div>
{{ else }}
<div class = "sponsor-cta">
</div>
{{ end }}
{{ end }}
{{ if eq $e.status "current" }}
<div class = "sponsor-cta">
<a href = "/events/{{ $e.name }}/sponsor">Become a {{ .label }} Sponsor!</a>
</div>
{{ else }}
<div class = "sponsor-cta">
</div>
{{ end }}
{{ end }}

Expand Down

0 comments on commit b2c80e2

Please sign in to comment.