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 <header class="program-session-header">
72 <h2>{{ session }}</h2>
78 {% macro desc(disc_list) %}
79 {% for desc_p in disc_list %}
84 {# populate sessions macro #}
85 {% macro populate_sessions(sessions, day_index, timeslot_index) %}
86 {% for session, session_info in sessions.iteritems() %} {# session start #}
87 <section id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}" class="program-session">
88 {{ mk_session_header(session) }}
89 {{ mk_speakers(session_info['speakers']) }}
90 <p class="program-session-room-details">
91 {{ mk_room(session_info['room']) }}
92 {% if session_info['desc'][0]|lower == 'desctba' %}
95 <button class="btn btn-default btn-xs"
96 data-toggle="collapse" aria-expanded="false"
97 aria-controls="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse"
98 data-target="#day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
100 <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
103 <div class="session-desc collapse in"
104 id="day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse">
105 {{ desc(session_info['desc']) }}
106 </div> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }}-collapse end -->
108 </section> <!-- day-{{ day_index }}-timeslot-{{ timeslot_index }}-session-{{ loop.index }} end -->
109 {% endfor %} {# session end #}
112 {# populate timeslots macro #}
113 {% macro populate_timeslots(timeslots, day_index) %}
114 {% for timeslot, sessions in timeslots.iteritems() %} {# timeslot start #}
115 <article id="day-{{ day_index }}-timeslot-{{ loop.index }}" class="program-timeslot">
116 {{ mk_timeslot_header(timeslot) }}
117 {% if sessions|length > 0 %}
118 {{ populate_sessions(sessions, day_index, loop.index) }}
120 </article> <!-- day-{{ day_index }}-timeslot-{{ loop.index }} end -->
121 {% endfor %} {# timeslot start #}
124 {# lp schedule 2016 template start #}
125 {% for day, timeslots in lp_dict.iteritems() %} {# day start #}
126 <article id="day-{{ loop.index }}-program" class="program-day">
127 {{ mk_day_header(day) }}
128 {{ populate_timeslots(timeslots, loop.index) }}
129 </article> <!-- day-{{ loop.index }} end -->
130 {% endfor %} {# day loop end #}