Start using a macro called icon() for icons
authorMagnus Hagander <magnus@hagander.net>
Tue, 20 Nov 2018 10:16:01 +0000 (11:16 +0100)
committerMagnus Hagander <magnus@hagander.net>
Tue, 20 Nov 2018 10:17:47 +0000 (11:17 +0100)
We can use it for more later, but for now we use it to indicate slides
in the session list and schedule. By default this macro is empty, but it
can be overridden in downstream templates to include an icon appropriate
for that template.

template.jinja/confreg/schedule.html
template.jinja/confreg/sessionlist.html

index 0a745e4e510a1492a2955c4a94ae143b41078e67..1996622accd1a15d7b719536e304c3fc93b5ab51 100644 (file)
@@ -1,4 +1,5 @@
 {%extends "base.html" %}
+{%if not icon%}{%macro icon(what)%}{%endmacro%}{%endif%}
 {%block title%}Conference Schedule - {{conference}}{%endblock%}
 {%block extrahead%}
 <style media="print">
@@ -54,7 +55,7 @@ changes occur.
 {%for session in day.sessions%}
  <div class="sessblock track{{session.track.id}}" style="top: {{session.toppos}}px; left: {{session.leftpos}}px; width: {{session.widthpos}}px; height: {{session.heightpos}}px;">
 {%if session.id%}
-  <a href="session/{{session.id}}-{{session.title|slugify}}/">{{session.timeslot}}<br/>{{session.title}}</a>
+  <a href="session/{{session.id}}-{{session.title|slugify}}/">{{session.timeslot}}<br/>{{session.title}}{%if session.has_slides%} {{ icon("slides") }}{%endif%}</a>
 {%else%}
   {{session.timeslot}} - {{session.title}}
 {%endif%}
index 0a0872cf37d805306a9a7172482c5a71920f2664..931edbfff5925df83372b224dc7378e862a0282d 100644 (file)
@@ -1,4 +1,5 @@
 {%extends "base.html" %}
+{%if not icon%}{%macro icon(what)%}{%endmacro%}{%endif%}
 {%block title%}Conference Sessions - {{conference}}{%endblock%}
 {%block content%}
 <h1>Conference Sessions - {{conference}}</h1>
@@ -14,7 +15,7 @@ Note that they may not yet have been scheduled!
 <h2>{%if track is not none%}{{track}}{%else%}General{%endif%}</h2>
 <ul>
 {%for session in sessionlist %}
- <li><a href="session/{{session.id}}-{{session.title|slugify}}/">{{session.title}}</a> ({{session.speaker_list}})</li>
+ <li><a href="session/{{session.id}}-{{session.title|slugify}}/">{{session.title}}</a>{%if session.has_slides%} {{ icon("slides") }}{%endif%} ({{session.speaker_list}})</li>
 {%endfor%}
 </ul>
 {%endfor%}