1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
{%extends "confreg/confadmin_base.html" %}
{%load assets%}
{%load pgmarkdown%}
{%load dictutil%}
{%block title%}Vote for sessions{%endblock%}
{%block bodyattr%} data-csrftok="{{csrf_token}}"{%endblock%}
{%block extrahead%}
{%asset "css" "fontawesome4" %}
<script type="text/javascript">
const valid_status_transitions = {{%for s, v in valid_status_transitions.items %}
{{s}}: {
{%for k,t in v.items %}
{{k}}: '{{t}}',{%endfor%}
},{%endfor%}
};
</script>
<script type="text/javascript" src="/media/js/sessionvotes.js"></script>
<link rel="stylesheet" type="text/css" href="/media/css/sessionvotes.css" />
<style>
{% for fc in filtercolumns %}
body:has(input#col_{{fc.class}}:checked) tr.headerrow td.flt-{{fc.class}},
body:has(input#col_{{fc.class}}:checked) tr.headerrow th.flt-{{fc.class}} {
display: table-cell;
}
{% endfor%}
</style>
{%endblock%}
{%block layoutblock%}
<h1>Vote for sessions - {{conference}}</h1>
<fieldset>
<legend>Filter sessions</legend>
<table role="presentation" border="0" width="100%" style="border-spacing: 2rem 0.3rem; border-collapse: separate;">
<tr>
<td style="width: 1px;">Track:</td>
<td>
{% for t in tracks %}<input type="checkbox" class="filtercheck filtercheck_track" id="t_{{t.id}}" checked> {{t.trackname}} <a class="filteronly">[only]</a> {% endfor %}
<input type="checkbox" class="filterall" checked> All
</td>
</tr>
{%if conference.callforpaperstags %}
<tr>
<td>Tags:</td>
<td>
{% for t in tags %}<input type="checkbox" class="filtercheck filtercheck_tag" id="tg_{{t.id}}" checked> {{t.tag}} <a class="filteronly">[only]</a> {% endfor %}
<input type="checkbox" class="filterall" checked> All
</td>
</tr>
{%endif%}
<tr>
<td>Statuses:</td>
<td>
{% for sid, s in status_choices %}<input type="checkbox" class="filtercheck filtercheck_status" id="st_{{sid}}" checked> {{s}} <a class="filteronly">[only]</a> {% endfor %}
<input type="checkbox" class="filterall" checked> All
</td>
</tr>
{% if isvoter %}
<tr>
<td>Voted:</td>
<td>
<input type="checkbox" class="filtercheck filtercheck_voted" id="vt_1"> Show only sessions you have not voted for
</td>
</tr>
{% endif %}
<tr>
<td colspan="2">
<a href="." class="btn btn-default">Reset</a>
{%if isadmin%}
<a href="../sessionnotifyqueue/" id="pendingNotificationsButton" class="btn btn-warning"{%if not conference.pending_session_notifications%} style="display:none;"{%endif%}>View and send pending notifications</a>
{%endif%}
</td>
</tr>
</table>
</fieldset>
<div id="ajaxStatus" class="alert alert-success" style="position: fixed; width: 100%;opacity: .8; text-align: center; font-weight: bold; font-size: 1.2em;">Loading submissions</div>
{%if not hasvoters%}
<div class="alert alert-warning">There are no talkvoters configured on this conference! List of talks will be empty!</div>
{%endif%}
<fieldset>
<legend>Vote on sessions</legend>
<p><b>Scoring method:</b> {{ scoring_method }}</p>
<p><b>Columns:</b> {% for fc in filtercolumns %}<input type="checkbox" id="col_{{fc.class}}"{%if fc.default%} checked{%endif%}> {{fc.title}} {% endfor %}
<table id="votetable" class="table table-bordered table-condensed">
<tbody class="header">
<tr class="headerrow tableheader">
<th class="flt-seq" style="width: 1%">Seq</th>
<th class="flt-id" style="width: 1%"><a class="sortheader sortnumber">Id</a></th>
<th class="col-md-6"><a class="sortheader">Session</a></th>
<th class="flt-spk"><a class="sortheader">Speakers</a></th>
<th class="flt-comp"><a class="sortheader">Companies</a></th>
<th class="flt-trk"><a class="sortheader">Track</a></th>
<th class="flt-tag"><a class="sortheader">Tags</a></th>
<th><a class="sortheader">Status</a></th>
{%for u in users%}
{% if conference.showvotes or isadmin or u == user.username and isvoter %}
<th class="flt-votes">{%if u == user.username%}{{u}}{%else%}<a class="sortheader sortnumber">{{u}}</a>{%endif%}</th>
{% endif %}
{%endfor%}
{% if conference.showvotes or isadmin %}
<th class="flt-avg"><a class="sortheader sortnumber">Average</a></th>
{% endif %}
<th class="flt-cmt">Comments</th>
</tr>
</tbody>
{%for s in sessionvotes%}
<tbody>
<tr class="headerrow sessionrow" data-sid="{{s.id}}" data-status="{{s.statusid}}" data-track="{{s.trackid|default:"0"}}"{% if conference.callforpaperstags %} data-tags="{{s.tags|join_dictkeys:"id,,"}}"{% endif %}>
<td class="flt-seq text-center"><div>
<div class="seq">{{forloop.counter}}</div>
{%if isadmin%}<div><a class="selup"></a><input type="checkbox"><a class="seldown"></a></div>{%endif%}
</div></td>
<td class="flt-id">{{s.id}}</td>
<td>
<h3><label class="dropdown-checkbox"><input type="checkbox" data-sid="{{s.id}}"><span></span></label> {{s.title}}</h3>
</td>
<td class="flt-spk">{{s.speakerdata|join_dictkeys:"fullname"}}</td>
<td class="flt-comp">{{s.speakerdata|join_dictkeys:"company"}}</td>
<td class="flt-trk">{{s.trackname|default:""}}</td>
<td class="flt-tag">{{s.tags|join_dictkeys:"tag"}}</td>
{%if isadmin%}
<td{%if s.speakerdata and not s.statusid == s.laststatusid %} bgcolor="yellow"{%endif%} class="fld-status"><a href="#" onclick="return false;">{{s.status}}</a></td>
{%else%}
<td>{{s.status}}</td>
{%endif%}
{%for u in users%}
{%if u == user.username%}
<td class="flt-votes" data-voted="{%if s.votes|dictlookup:u is None %}no{%else%}yes{%endif%}">
<select>
{%for val, opt in options%}
<option value="{{val}}"{%if val == s.votes|dictlookup:u|default_if_none:0%} SELECTED{%endif%}>{{opt}}</option>
{%endfor%}
</select>
</td>
{%else%}
{% if conference.showvotes or isadmin %}
<td class="flt-votes">{%if s.votes|dictlookup:u == -1%}Abstain{%else%}{{s.votes|dictlookup:u|default_if_none:''}}{%endif%}</td>
{%endif%}
{%endif%}
{%endfor%}
{% if conference.showvotes or isadmin %}
<td class="avgbox flt-avg">{{s.avg|default_if_none:''}}</td>
{% endif %}
<td class="flt-cmt">
{%if isvoter%}
<div style="margin-right: 0.5em; float:left;">
<a class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
</div>
{%endif%}
<div style="display:inline-block;">
{%for u, c in s.comments.items%}
<ul class="comments">
<li{%if u == user.username%} class="owncomment" {%if c == ""%} style="display:none"{%endif%}{%endif%}><span class="username">{{u}}:</span> <span class="comment">{{c}}</span></li>
</ul>
{%endfor%}
</div>
</td>
</tr>
<tr class="detailsrow" data-sid="{{s.id}}" id="detailsrow_{{s.id}}">
<td colspan="{{colcount}}">
<div class="detailscontent">
{%if isadmin%}
<a class="btn btn-default" style="float:right" href="/events/admin/{{conference.urlname}}/sessions/{{s.id}}/" target="_blank">Edit submission</a>
{%endif%}
<div><strong>Speakers:</strong> {%for sp in s.speakerdata%}{{sp.fullname}}{%if sp.company%} ({{sp.company}}){%endif%}{%if not forloop.last%}, {%endif%}{%endfor%}</div>
<div><strong>Track:</strong> {{s.trackname|default:""}}</div>
{%if conference.callforpaperstags%}
<div><strong>Tags:</strong> {%for t in s.tags%}<span class="label label-primary">{{t.tag}}</span> {%endfor%}</div>
{%endif%}
{%if conference.callforpapersrecording%}
<div><strong>Recording consent:</strong> {{s.recordingconsent | yesno:"Yes,No" }}</div>
{%endif%} <br/>
{{s.abstract|markdown}}
{%if s.submissionnote%}
<hr/>
<h3>Submission notes</h3>
<p>
{{s.submissionnote}}
</p>
{%endif%}
{%if s.internalnote%}
<hr/>
<h3>Internal notes</h3>
<p>
{{s.internalnote}}
</p>
{%endif%}
<hr/>
{%if s.speakerdata %}
<h3>Speaker profile</h3>
{%for sp in s.speakerdata %}
<h4>{{sp.fullname}}{%if sp.company%} ({{sp.company}}){%endif%} [speaker id: {{sp.id}}]</h4>
{{sp.abstract|markdown}}
{%endfor%}
{%endif%}
</div>
</td>
</tr>
</tbody>
{%endfor%}
{%if isadmin %}
<tbody class="header">
<tr class="headerrow tableheader">
<th colspan="2" class="flt-seq">
<button id="btnClearCheckboxes" class="btn">Clear checkboxes</button>
<button id="btnBulkStatus" class="btn">Bulk set status</button>
</th>
</tr>
</tbody>
{%endif%}
</table>
</fieldset>
<dialog id="dlgStatus">
<h3>Change status</h3>
<div class="buttons">
{%for statusid, status in status_choices %}
<button class="btn" data-statusid="{{statusid}}">{{status}}</button>
{%endfor%}
</div>
<div class="buttons">
<button class="btn">Cancel</button>
</div>
</dialog>
<dialog id="dlgComment">
<h3>Edit comment</h3>
<input type="text" id="dlgCommentText" style="width: 300px;">
<button class="btn">Save</button>
</dialog>
{%endblock%}
|