summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorUser Erdgeist <erdgeist@content.events.ccc.de>2019-10-30 14:23:58 +0000
committerUser Erdgeist <erdgeist@content.events.ccc.de>2019-10-30 14:24:11 +0000
commit8bcbcea5580818661eebcd17190780feb6e5bb86 (patch)
tree68d2066e395fdc270951fb325073eb50c61145fd /templates
parente8b020e28ca377868ff8aad8418372debc910ae6 (diff)
standardize config access
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/index.html b/templates/index.html
index 13a8aec..c8ccf71 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -2,7 +2,7 @@
2<title>{{ config.get('frab-conference') }} {{ config.get('track') }} rating helper</title> 2<title>{{ config.get('frab-conference') }} {{ config.get('track') }} rating helper</title>
3<head> 3<head>
4<script type="text/javascript">categories = { 4<script type="text/javascript">categories = {
5 {%- for category in cat -%} 5 {%- for category in config['categories'] -%}
6 'category{{ loop.index }}': '{{ category }}', 6 'category{{ loop.index }}': '{{ category }}',
7 {%- endfor -%} 7 {%- endfor -%}
8 }; 8 };
@@ -45,7 +45,7 @@
45 45
46<div class="event-rating hidden" id="event-rating-new"> 46<div class="event-rating hidden" id="event-rating-new">
47 <div class="event-rating-submitter"></div> 47 <div class="event-rating-submitter"></div>
48 {%- for category in cat -%} 48 {%- for category in config['categories'] -%}
49 <div><meter category="category{{loop.index}}" value="0" min="0" max="100"></meter><span class="event-rating-category-output" category="category{{loop.index}}"> {{ category + " 0 %" }}</span></div> 49 <div><meter category="category{{loop.index}}" value="0" min="0" max="100"></meter><span class="event-rating-category-output" category="category{{loop.index}}"> {{ category + " 0 %" }}</span></div>
50 {%- endfor -%} 50 {%- endfor -%}
51 <div class="event-rating-comment"></div> 51 <div class="event-rating-comment"></div>
@@ -54,7 +54,7 @@
54<div id="event-own-rating"> 54<div id="event-own-rating">
55 <hr/> 55 <hr/>
56 <div class="label">comment</div><textarea rows="8" id="event-comment"></textarea> 56 <div class="label">comment</div><textarea rows="8" id="event-comment"></textarea>
57 {%- for category in cat -%} 57 {%- for category in config['categories'] -%}
58 <div class="category-slider" id="event-category{{loop.index}}-slider"> 58 <div class="category-slider" id="event-category{{loop.index}}-slider">
59 <div class="label">{{category}}:</div> 59 <div class="label">{{category}}:</div>
60 <div class="slider"><input category="category{{loop.index}}" type="range" min="0" max="100" step="5" oninput="changeVal('event-category{{loop.index}}-output', this.value)"></div> 60 <div class="slider"><input category="category{{loop.index}}" type="range" min="0" max="100" step="5" oninput="changeVal('event-category{{loop.index}}-output', this.value)"></div>
@@ -71,7 +71,7 @@
71{% for ev in events -%} 71{% for ev in events -%}
72 <li class="event-list-item" event_state="{{ev.state}}" event_type="{{ev.event_type}}" id="event-{{ev.frab_id}}"> 72 <li class="event-list-item" event_state="{{ev.state}}" event_type="{{ev.event_type}}" id="event-{{ev.frab_id}}">
73 <div class="event-meter-bar"> 73 <div class="event-meter-bar">
74 {%- for m in range(1+cat|length) -%} 74 {%- for m in range(1+config['categories']|length) -%}
75 <meter class="top-meter meter-{{m}}" id="event-{{ev.frab_id}}-meter-{{m}}" value="0" min="0" max="100"></meter> 75 <meter class="top-meter meter-{{m}}" id="event-{{ev.frab_id}}-meter-{{m}}" value="0" min="0" max="100"></meter>
76 {%- endfor -%} 76 {%- endfor -%}
77 </div> 77 </div>
@@ -80,7 +80,7 @@
80 {%- else -%} 80 {%- else -%}
81 <button onclick="do_remove_event('{{ev.frab_id}}')" title="remove this event" class="mini-button remove-button">del</button> 81 <button onclick="do_remove_event('{{ev.frab_id}}')" title="remove this event" class="mini-button remove-button">del</button>
82 {%- endif -%} 82 {%- endif -%}
83 <div class="event-title"><a href="{{ config.get('frab-url') }}en/{{ config.get('frab-conference')}}/events/{{ ev.frab_id }}/">{{ ev.title }}</a></div> 83 <div class="event-title"><a href="{{ config['frab-conf-url'] }}/events/{{ ev.frab_id }}/">{{ ev.title }}</a></div>
84 {%- if ev.subtitle -%} 84 {%- if ev.subtitle -%}
85 <div class="event-subtitle"> {{ ev.subtitle }}</div> 85 <div class="event-subtitle"> {{ ev.subtitle }}</div>
86 {%- endif -%} 86 {%- endif -%}
@@ -90,7 +90,7 @@
90 {%- endif -%} 90 {%- endif -%}
91 <div class="event-speaker"><em>speakers: </em> 91 <div class="event-speaker"><em>speakers: </em>
92 {%- for speaker_id, speaker_name in json.loads(ev.speakers or '{}').items() -%} 92 {%- for speaker_id, speaker_name in json.loads(ev.speakers or '{}').items() -%}
93 <a href="{{ config.get('frab-url') }}en/{{ config.get('frab-conference') }}/people/{{speaker_id}}">{{speaker_name}}</a>&nbsp; 93 <a href="{{ config['frab-conf-url'] }}/people/{{speaker_id}}">{{speaker_name}}</a>&nbsp;
94 {%- endfor -%} 94 {%- endfor -%}
95 </div> 95 </div>
96 </div> 96 </div>
@@ -106,7 +106,7 @@
106 <div class="event-rating" id="event-rating-{{ev.frab_id}}" submitter="{{rating.submitter}}"> 106 <div class="event-rating" id="event-rating-{{ev.frab_id}}" submitter="{{rating.submitter}}">
107 <div class="event-rating-submitter">{{rating.submitter}}:</div> 107 <div class="event-rating-submitter">{{rating.submitter}}:</div>
108 {%- for category, value in json.loads(rating.rating_dict or '{}').items()|sort -%} 108 {%- for category, value in json.loads(rating.rating_dict or '{}').items()|sort -%}
109 <div><meter category="{{category}}" value="{{value}}" min="0" max="100"></meter><span class="event-rating-category-output" category="{{category}}"> {{ cat[loop.index-1] + " " + value|string + " %" }}</span></div> 109 <div><meter category="{{category}}" value="{{value}}" min="0" max="100"></meter><span class="event-rating-category-output" category="{{category}}"> {{ config['categories'][loop.index-1] + " " + value|string + " %" }}</span></div>
110 {%- endfor -%} 110 {%- endfor -%}
111 <div class="event-rating-comment">{{rating.comment}}</div> 111 <div class="event-rating-comment">{{rating.comment}}</div>
112 </div> 112 </div>