1 {# -*- mode: jinja2; -*- #}
3 Copyright © 2017 lpschedule-generator contributors. See CONTRIBUTORS.
5 This file is part of lpschedule-generator.
7 lpschedule-generator is free software: you can redistribute it
8 and/or modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation, either version 3 of
10 the License, or (at your option) any later version.
12 lpschedule-generator is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with lpschedule-generator (see COPYING). If not, see
19 <http://www.gnu.org/licenses/>.
24 {# make speakers macro #}
25 {% macro mk_speakers(speakers) %}
26 {% if speakers[0]|lower != 'speakertba' %}
27 <span class="program-session-speaker">
28 {% for speaker in speakers %}
40 {% macro mk_room(room) %}
41 {% if room|lower != 'roomtba' %}
42 <span class="room label label-default">{{ room }}</span>
46 {# make day header macro #}
47 {% macro mk_day_header(day, collapse_area) %}
48 {% if day|trim != '' %}
49 <header class="program-day-header">
57 {# make timeslot header macro #}
58 {% macro mk_timeslot_header(timeslot, collapse, collapse_area='') %}
59 {% if timeslot|trim != '' %}
60 <header class="program-timeslot-header">
62 <h2>{{ timeslot }}</h2>
68 {# make session header macro #}
69 {% macro mk_session_header(session) %}
70 {% if session|trim not in ['', 'st-from-ts'] %}
71 <header class="program-session-header">
73 <h2>{{ session }}</h2>
80 {% macro desc(disc_list) %}
81 {% for desc_p in disc_list %}
86 {# populate sessions macro #}
87 {% macro populate_sessions(sessions, day_index, timeslot_index) %}
88 {% for session, session_info in sessions.iteritems() %} {# session start #}
89 <section id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}" class="program-session">
90 {{ mk_session_header(session) }}
91 {{ mk_speakers(session_info['speakers']) }}
92 <p class="program-session-room-details">
93 {{ mk_room(session_info['room']) }}
94 {% if session_info['desc'][0]|lower == 'desctba' %}
97 <button class="btn btn-default btn-xs"
98 data-toggle="collapse" aria-expanded="false"
99 aria-controls="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse"
100 data-target="#day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
102 <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
105 <div class="session-desc collapse in"
106 id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
107 {{ desc(session_info['desc']) }}
108 </div> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse end -->
110 </section> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }} end -->
111 {% endfor %} {# session end #}
114 {# populate timeslots macro #}
115 {% macro populate_timeslots(timeslots, day_index) %}
116 {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #}
117 <article id="day-{{ day_index }}-timeslot-{{ loop.index }}" class="program-timeslot">
118 {{ mk_timeslot_header(timeslot) }}
119 {% if sessions|length > 0 %}
120 {{ populate_sessions(sessions, day_index, loop.index) }}
122 </article> <!-- day-{{ day_index }}-timeslot-{{ loop.index }} end -->
123 {% endfor %} {# timeslot start #}
126 {# lp schedule 2016 template start #}
127 {% for day, timeslots in lp_dict.iteritems() %} {# day start #}
128 <article id="day-{{ loop.index }}-program" class="program-day">
129 {{ mk_day_header(day) }}
130 {{ populate_timeslots(timeslots, loop.index) }}
131 </article> <!-- day-{{ loop.index }} end -->
132 {% endfor %} {# day loop end #}