Commit 1ebecaed authored by Eric Poirier's avatar Eric Poirier
Browse files

Use multisets to add org info


Signed-off-by: Eric Poirier's avatarEric Poirier <eric.poirier@eclipse-foundation.org>
parent 70347351
---
title: "Event"
seo_title: "Event"
description: "This is an example of the Eclipse Foundation Solstice theme for Hugo."
date: 2018-04-05T15:50:25-04:00
layout: "single"
---
{{< events/agenda >}}
......@@ -4,22 +4,24 @@ types:
id: 1
color: "#e44"
- name: Keynote
id: b2
id: b2
color: "#a0a"
- name: Cloud
id: 3
id: 3
color: "#66e"
items:
- name: Open-source software
presenter: Ken K.
abstract: "<p>Sample abstract <a href='#'>Sample link</a></p>"
organization: test 1
type: 1
vod: "#1"
- name: How to 'how to'
presenter: Jim Bob
type: b2
vod: "#2"
organization: test 2
- name: Industry Keynote
presenter: Eclipse Foundation, .etc
type: b2
......@@ -28,5 +30,6 @@ items:
presenter: Adam A.
type: 3
vod: "#4"
organization: test 3
- name: Lunch Break
type: break
......@@ -92,11 +92,30 @@ span.eclipsefdn-agenda-legend-icon-{{ urlize .id }}::after {
</div>
<div class="content-nav-tab-body tab-content no-gutters-mobile padding-40 margin-bottom-30" id="tabs-content">
{{ end }}
{{ $hasOrgs := false }}
{{ if $multiSet }}
{{ range $index, $set := $agendaItemsBase }}
{{ range $set.items }}
{{ if isset . "organization" }}
{{ $hasOrgs = true }}
{{ end }}
{{ end }}
{{ end }}
{{ else }}
{{ range $index, $set := $agendaItemsBase }}
{{ range $set.items }}
{{ if isset . "organization" }}
{{ $hasOrgs = true }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ range $index, $set := $agendaItemsBase }}
<!-- Check for slide and vod column -->
{{ $has_slides := false }}
{{ $has_vod := false }}
{{ $has_org := false }}
{{ range $set.items }}
{{ if isset . "slides" }}
{{ $has_slides = true }}
......@@ -104,9 +123,6 @@ span.eclipsefdn-agenda-legend-icon-{{ urlize .id }}::after {
{{ if isset . "vod" }}
{{ $has_vod = true }}
{{ end }}
{{ if isset . "organization" }}
{{ $has_org = true }}
{{ end }}
{{ end }}
<!-- Check if multiple session sets -->
......@@ -119,7 +135,7 @@ span.eclipsefdn-agenda-legend-icon-{{ urlize .id }}::after {
<tr>
<th>{{ i18n "agenda-session-name" }}</th>
<th>{{ i18n "agenda-presenter-name" }}</th>
{{ if $has_org }}
{{ if $hasOrgs }}
<th>{{ i18n "agenda-organization" }}</th>
{{ end }}
{{ if and ($complete) ($has_vod) }}
......@@ -165,7 +181,7 @@ span.eclipsefdn-agenda-legend-icon-{{ urlize .id }}::after {
{{ .presenter | safeHTML }}
{{ end }}
</td>
{{ if $has_org }}
{{ if $hasOrgs }}
<td>
{{ .organization | safeHTML }}
</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment