source: indico/indico/MaKaC/webinterface/tpls/ConfModificationReviewingSettings.tpl @ e9c2ff

burotelhello-world-walkthroughipv6v0.98-seriesv0.98.2v0.98.3v0.98b1v0.98b2v0.99v1.0v1.1
Last change on this file since e9c2ff was e9c2ff, checked in by Jose Benito <jose.benito.gonzalez@…>, 3 years ago

[FIXED] - show/hide UploadedListTpl/NoTpl? tables

  • Fixed the show the List of uploaded templates if there are ones; otherwise - to show "No templates" table
  • Property mode set to 100644
File size: 44.8 KB
Line 
1<% declareTemplate(newTemplateStyle=True) %>
2
3<% from MaKaC.reviewing import ConferenceReview %>
4<% from MaKaC.reviewing import Template %>
5<% from MaKaC.common.utils import formatDateTime %>
6<% import MaKaC.webinterface.urlHandlers as urlHandlers %>
7<% import MaKaC.common.Configuration as Configuration %>
8<table width="90%%" border="0" style="margin-bottom:1em">
9    <tr>
10        <td nowrap id="reviewingModeHelp" class="groupTitle"><%= _("Step 1: Choose type of paper reviewing for the conference")%>
11        </td>
12    </tr>
13        <em><%= _("Please, follow the steps to set up the Paper Reviewing Module")%></em>
14</table>
15       
16<table width="90%%" border="0" style="margin-bottom:1em">
17    <tr>
18        <td>
19       
20        </td>
21    </tr>
22    <tr>
23        <td nowrap class="titleCellTD"  style="padding-top: 5px;">
24            <span class="titleCellFormat"><%= _("Type of reviewing:")%></span>
25        </td>
26        <td nowrap style="vertical-align:top; padding-top: 5px;">
27            <span id="inPlaceEditReviewingMode" style="display:inline"><%= ConferenceReview.reviewingModes[choice] %></span>
28        </td>
29    </tr>
30</table>
31<% if ConfReview.hasReviewing(): %>
32    <% display = 'table' %>
33<% end %>
34<% else: %>
35    <% display = 'none' %>
36<% end %>
37<table id='steptitle' width="90%%" border="0" style="margin-bottom:1em; display:<%=display%>">
38    <tr>
39        <td class="groupTitle">
40            <%= _("Step 2: Set up the options for ")%><span id="title">
41            <%if ConferenceReview.reviewingModes[choice]==ConferenceReview.reviewingModes[2]: %><%= _("content reviewing team")%><% end %>
42            <%if ConferenceReview.reviewingModes[choice]==ConferenceReview.reviewingModes[3]: %><%= _("layout reviewing team")%><% end %>
43            <%if ConferenceReview.reviewingModes[choice]==ConferenceReview.reviewingModes[4]: %><%= _("content and layout reviewing team")%><% end %>
44            </span>
45        </td>
46    </tr>
47</table>
48<% if ConfReview.hasReviewing(): %>
49    <% display = 'table' %>
50<% end %>
51<% else: %>
52    <% display = 'none' %>
53<% end %>
54<!-- for now we leave the boxes for chosing reviewing material not to display(they are not used any more)
55ToDo: to remove the code which is not using any more, but to know that we have this wonderful Widget  -->
56<table id='materialsTable' width="90%%" align="center" border="0" style="display:none;">
57    <tr>
58        <td id="reviewableMaterialsHelp" colspan="5" class="reviewingsubtitle" style="padding-top: 20px;">
59            <span><%= _("Choose types of materials to be revised")%></span>
60        </td>
61    </tr>
62    <tr>
63        <td>
64           <div id="inPlaceEditReviewableMaterials"  style="padding-top: 5px;"><%=", ".join(ConfReview.getReviewableMaterials()) %></div>
65        </td>
66    </tr>
67</table>
68
69<% if ConfReview.hasPaperReviewing(): %>
70    <% display = 'table' %>
71<% end %>
72<% else: %>
73    <% display = 'none' %>
74<% end %>
75<table id='statusTable' width="90%%" align="center" border="0" style="margin-bottom:1em; display:<%=display%>">
76    <tr>
77        <td id="reviewingStatesHelp" colspan="5" class="reviewingsubtitle"><%= _("Add a paper status for paper reviewing")%></td>
78    </tr>
79    <tr>
80       
81    </tr>
82    <!--
83    <tr>
84    <form action=<%=addStateURL%> method="post">
85        <%= stateAdd %>
86    </form>
87    </tr>
88    <tr>
89        <form action=<%=removeStateURL%> method="post">
90            <td bgcolor="white" width="50%%" valign="top" class="blacktext">
91                <%= stateTable %>
92            </td>
93           
94        </form>
95    </tr>
96    -->
97    <tr>
98        <td style="width: 400px;"> 
99            <div class="titleCellFormat" style="padding-top: 5px;">
100                <%= _("The default statuses are: ")%><em><%= _("Accept, To be corrected")%></em><%=_(" and ")%><em><%=_("Reject")%></em>.<%= _("You can define your own statuses")%>
101            </div>
102            <div id="inPlaceEditStates"  style="padding-top: 10px;"><%= ', '.join(ConfReview.getAllStates())%></div>
103        </td>
104    </tr>
105</table>
106
107<% if ConfReview.hasPaperReviewing(): %>
108    <% display = 'table' %>
109<% end %>
110<% else: %>
111    <% display = 'none' %>
112<% end %>
113<table id="reviewingQuestionsTable" width="90%%" align="center" border="0" style="margin-bottom:1em; display:<%=display%>">
114    <tr>
115        <td id="reviewingQuestionsHelp" colspan="5" class="reviewingsubtitle"><%= _("Add questions for content reviewing")%></td>
116    </tr>
117    <!--
118    <tr>
119        <form action=<%=addQuestionURL%> method="post">
120            <%= questionAdd %>
121        </form>
122    </tr>
123    <tr>
124        <form action=<%=removeQuestionURL%> method="post">
125          <td bgcolor="white" width="50%%" valign="top" class="blacktext">
126              <%= questionTable%>
127          </td>
128        </form>
129    </tr>
130    -->
131    <tr>
132        <td>
133            <div id="inPlaceEditQuestions"  style="padding-top: 5px;"><%= ', '.join(ConfReview.getReviewingQuestions())%></div>
134        </td>
135    </tr>
136</table>
137
138
139<% if ConfReview.hasPaperEditing(): %>
140    <% display = 'table' %>
141<% end %>
142<% else: %>
143    <% display = 'none' %>
144<% end %>
145<table id="editingCriteriaTable" width="90%%" align="center" border="0" style="margin-bottom:1em; display:<%=display%>">
146    <tr>
147        <td id="editingCriteriaHelp" colspan="5" class="reviewingsubtitle"  style="padding-top: 5px;"><%= _("Set criteria for layout reviewing")%></td>
148    </tr>
149    <!--
150    <tr>
151        <form action=<%=addCriteriaURL%> method="post">
152            <%= criteriaAdd %>
153            </form>
154    </tr>
155    <tr>
156        <form action=<%=removeCriteriaURL%> method="post">
157        <td bgcolor="white" width="50%%" valign="top" class="blacktext">
158             <%= criteriaTable %>
159        </td>
160        </form>
161    </tr>
162    -->
163    <tr>
164        <td>
165            <div id="inPlaceEditCriteria"  style="padding-top: 10px;"><%= ', '.join(ConfReview.getLayoutCriteria())%></div>
166        </td>
167    </tr>
168</table>
169
170
171<% if ConfReview.hasReviewing(): %>
172    <% display = 'table' %>
173<% end %>
174<% else: %>
175    <% display = 'none' %>
176<% end %>
177<table id="defaultDueDatesTable" width="90%%" align="center" border="0" style="margin-bottom:1em; display:<%=display%>">
178    <tr>
179        <td id="defaultDatesHelp" colspan="5" class="reviewingsubtitle"><%= _("Deadlines for reviewing team")%></td>
180    </tr>
181    <% if ConfReview.hasPaperReviewing(): %>
182        <% display = 'table-row' %>
183    <% end %>
184    <% else: %>
185        <% display = 'none' %>
186    <% end %>   
187    <tr id="refereeDefaultDateRow" style="white-space:nowrap; display: <%=display%>">
188        <td nowrap class="titleCellTD" style="text-align:left"><span class="titleCellFormat" align="left">
189            <%= _("Referee Deadline")%>
190        </span></td>
191        <td nowrap class="blacktext">
192            <span id="inPlaceEditDefaultRefereeDueDate">
193                <% date = ConfReview.getAdjustedDefaultRefereeDueDate() %>
194                <% if date is None: %>
195                    <%= _("Date has not been set yet.")%>
196                <% end %>
197                <% else: %>
198                    <%= formatDateTime(date) %>
199                <% end %>
200            </span>
201        </td>
202    </tr>
203    <% if ConfReview.hasPaperEditing(): %>
204        <% display = 'table-row' %>
205    <% end %>
206    <% else: %>
207        <% display = 'none' %>
208    <% end %>   
209    <tr id="editorDefaultDateRow" style="white-space:nowrap; display: <%=display%>">
210        <td nowrap class="titleCellTD" style="text-align:left"><span class="titleCellFormat">
211            <%= _("Layout Reviewer Deadline")%>
212        </span></td>
213        <td nowrap class="blacktext">
214            <span id="inPlaceEditDefaultEditorDueDate">
215                <% date = ConfReview.getAdjustedDefaultEditorDueDate() %>
216                <% if date is None: %>
217                    <%= _("Date has not been set yet.")%>
218                <% end %>
219                <% else: %>
220                    <%= formatDateTime(date) %>
221                <% end %>
222            </span>
223        </td>
224        <% if not ConfReview.hasPaperReviewing(): %>
225            <% display = 'table-row' %>
226        <% end %>
227        <% else: %>
228            <% display = 'none' %>
229        <% end %>   
230    </tr>
231    <% if ConfReview.hasPaperReviewing(): %>
232        <% display = 'table-row' %>
233    <% end %>
234    <% else: %>
235        <% display = 'none' %>
236    <% end %>   
237    <tr id="reviewerDefaultDateRow" style="white-space:nowrap;display: <%=display%>">
238        <td nowrap class="titleCellTD" style="text-align:left"><span class="titleCellFormat">
239            <%= _("Content Reviewer Deadline")%>
240        </span></td>
241        <td nowrap class="blacktext">
242            <span id="inPlaceEditDefaultReviewerDueDate">
243                <% date = ConfReview.getAdjustedDefaultReviewerDueDate() %>
244                <% if date is None: %>
245                    <%= _("Date has not been set yet.")%>
246                <% end %>
247                <% else: %>
248                    <%= formatDateTime(date) %>
249                <% end %>
250            </span>
251        </td>
252    </tr>
253</table>
254
255<table id="automaticNotification" width="90%%" align="center" border="0">
256    <% if ConfReview.hasReviewing(): %>
257            <% display = 'table' %>
258        <% end %>
259        <% else: %>
260            <% display = 'none' %>
261        <% end %>
262            <tr id="autoEmails" style="display:<%=display%>">
263                <td id="automaticNotificationHelp" colspan="5" class="reviewingsubtitle"><%= _("Automatic e-mails")%>
264                   <% inlineContextHelp(_('Here you can enable/disable automatic e-mails sending.<br/>Notifications can be send to the Reviewing Team in the next several situations<br/><ul><li>when are added/removed Reviewers for the conference</li><li>when are assinged/removed contributions to Reviewers</li><li>when authors of the contributions have been submitted materials</li></ul>Notifications can be send to the authors when their contributions had been judged by the Reviewers.'))%>
265                </td>
266            </tr>
267        <% if ConfReview.hasPaperReviewing(): %>
268            <% display = 'table-row' %>
269        <% end %>
270        <% else: %>
271            <% display = 'none' %>
272        <% end %>
273           <tr id="refereeNotif" style="white-space:nowrap; display: <%=display%>">
274            <td>
275            <div>
276                <span id="refereeNotifButton">                   
277                </span>
278            </div>
279        </td>
280       </tr>
281        <% if ConfReview.hasPaperEditing(): %>
282            <% display = 'table-row' %>
283        <% end %>
284        <% else: %>
285            <% display = 'none' %>
286        <% end %>
287       <tr id="editorNotif" style="white-space:nowrap; display: <%=display%>">
288          <td>
289            <div>
290                <span id="editorNotifButton">                   
291                </span>
292            </div>
293         </td>
294       </tr>
295        <% if ConfReview.hasPaperReviewing(): %>
296            <% display = 'table-row' %>
297        <% end %>
298        <% else: %>
299            <% display = 'none' %>
300        <% end %>
301       <tr id="reviewerNotif" style="white-space:nowrap; display: <%=display%>">
302        <td>
303            <div>
304                <span id="reviewerNotifButton">                   
305                </span>
306            </div>
307        </td>
308       </tr>
309       <% if ConfReview.hasPaperReviewing(): %>
310            <% display = 'table-row' %>
311        <% end %>
312        <% else: %>
313            <% display = 'none' %>
314        <% end %>
315       <tr id="refereeNotifForContribution" style="white-space:nowrap; display: <%=display%>">
316        <td>
317            <div>
318                <span id="refereeNotifForContributionButton">                   
319                </span>
320            </div>
321        </td>
322       </tr>
323        <% if ConfReview.hasPaperEditing(): %>
324            <% display = 'table-row' %>
325        <% end %>
326        <% else: %>
327            <% display = 'none' %>
328        <% end %>
329       <tr id="editorNotifForContribution" style="white-space:nowrap; display: <%=display%>">
330          <td>
331            <div>
332                <span id="editorNotifForContributionButton">                   
333                </span>
334            </div>
335         </td>
336       </tr>
337        <% if ConfReview.hasPaperReviewing(): %>
338            <% display = 'table-row' %>
339        <% end %>
340        <% else: %>
341            <% display = 'none' %>
342        <% end %>
343       <tr id="reviewerNotifForContribution" style="white-space:nowrap; display: <%=display%>">
344        <td>
345            <div>
346                <span id="reviewerNotifForContributionButton">                   
347                </span>
348            </div>
349        </td>
350       </tr>
351       <% if ConfReview.hasPaperReviewing(): %>
352            <% display = 'table-row' %>
353        <% end %>
354        <% else: %>
355            <% display = 'none' %>
356        <% end %>
357       <tr id="authorSubmittedMatRefereeNotif" style="white-space:nowrap; display: <%=display%>">
358        <td>
359            <div>
360                <span id="authorSubmittedMatRefereeNotifButton">                   
361                </span>
362            </div>
363        </td>
364       </tr>
365        <% if ConfReview.hasPaperEditing(): %>
366            <% display = 'table-row' %>
367        <% end %>
368        <% else: %>
369            <% display = 'none' %>
370        <% end %>
371       <tr id="authorSubmittedMatEditorNotif" style="white-space:nowrap; display: <%=display%>">
372          <td>
373            <div>
374                <span id="authorSubmittedMatEditorNotifButton">                   
375                </span>
376            </div>
377         </td>
378       </tr>
379        <% if ConfReview.hasPaperReviewing(): %>
380            <% display = 'table-row' %>
381        <% end %>
382        <% else: %>
383            <% display = 'none' %>
384        <% end %>
385       <tr id="authorSubmittedMatReviewerNotif" style="white-space:nowrap; display: <%=display%>">
386        <td>
387            <div>
388                <span id="authorSubmittedMatReviewerNotifButton">                   
389                </span>
390            </div>
391        </td>
392       </tr>
393       <% if ConfReview.hasPaperReviewing(): %>
394            <% display = 'table-row' %>
395        <% end %>
396        <% else: %>
397            <% display = 'none' %>
398        <% end %>
399       <tr id="refereeJudgementNotif" style="white-space:nowrap; display: <%=display%>">
400        <td>
401            <div>
402                <span id="refereeJudgementNotifButton">                   
403                </span>
404            </div>
405        </td>
406       </tr>
407        <% if ConfReview.hasPaperEditing(): %>
408            <% display = 'table-row' %>
409        <% end %>
410        <% else: %>
411            <% display = 'none' %>
412        <% end %>
413       <tr id="editorJudgementNotif" style="white-space:nowrap; display: <%=display%>">
414          <td>
415            <div>
416                <span id="editorJudgementNotifButton">                   
417                </span>
418            </div>
419         </td>
420       </tr>
421        <% if ConfReview.hasPaperReviewing(): %>
422            <% display = 'table-row' %>
423        <% end %>
424        <% else: %>
425            <% display = 'none' %>
426        <% end %>
427       <tr id="reviewerJudgementNotif" style="white-space:nowrap; display: <%=display%>">
428        <td>
429            <div>
430                <span id="reviewerJudgementNotifButton">                   
431                </span>
432            </div>
433        </td>
434       </tr>
435</table>
436
437<% if ConfReview.hasReviewing(): %>
438    <% display = 'table' %>
439<% end %>
440<% else: %>
441    <% display = 'none' %>
442<% end %>
443<form action="<%= setTemplateURL %>" method="post" ENCTYPE="multipart/form-data">
444<table id="templateTable" width="90%%" align="center" border="0" style="display:<%=display%>">
445    <tr>
446        <td id="uploadTemplateHelp" colspan="5" class="reviewingsubtitle"><%= _("Upload a template")%></td>
447    </tr>
448   <!--  <tr>
449        <td>
450            <table>
451                <tr>
452                        <td align="right">
453                                <%= _("Name")%>
454                        </td>
455                                        <td>
456                                                <input type=text size="70" name="name">
457                                        </td>
458                </tr>
459                <tr>
460                    <td align="right">
461                        <%= _("Description")%>
462                    </td>
463                    <td>
464                        <textarea rows="2" cols="53" name="description">
465                    </td>
466                </tr>
467                <tr>
468                    <td align="right">
469                        <%= _("Format")%>
470                    </td>
471                    <td id='formatchooser'>                       
472                    </td>
473                   
474                </tr>
475                                <tr>
476                    <td align="right">
477                        <%= _("Template")%>
478                    </td>
479                    <td>
480                        <input name="file" type="file" value="<%= _("Browse...")%>">
481                    </td>
482                </tr>
483            </table>
484        </td>
485    </tr>
486    <tr>
487        <td>
488            <input type="submit" class="btn" value="<%= _("Upload")%>">
489        </td>
490    </tr> -->
491    <tr><a name="UploadTemplate" />
492        <td style="padding-left: 15px;" ><input id='uploadTpl' type="button" value="<%= _('Upload Template')%>"></a>                       
493        </td>
494    </tr>
495    <tr><td>
496        <% if ConfReview.hasTemplates(): %>
497         <% display = 'table' %>
498       <% end %>
499       <% else: %>
500         <% display = 'none' %>
501       <% end %>
502    <table id="templateListTableAll" width="90%%" align="center" border="0" style="display:<%=display%>">
503    <!-- here to put table for the uploaded templates info :) -->
504     <thead>
505        <tr>
506            <td nowrap width="50%%" class="titleCellFormat" style="border-right:5px solid #FFFFFF;border-left:5px solid #FFFFFF;border-bottom: 1px solid #DDDDDD;">
507                <%= _("Name")%>
508            </td>
509            <td nowrap class="titleCellFormat" style="border-right:5px solid #FFFFFF;border-left:5px solid #FFFFFF;border-bottom: 1px solid #DDDDDD;">
510                <%= _("Format")%>
511            </td>
512            <td nowrap class="titleCellFormat" style="border-right:5px solid #FFFFFF;border-left:5px solid #FFFFFF;border-bottom: 1px solid #DDDDDD;">
513                <%= _("Description")%>
514            </td>
515        </tr>
516        </thead>
517        <tbody id="templateListTable">
518        </tbody>
519        <!-- <% keys = ConfReview.getTemplates().keys() %>
520       <% keys.sort() %>
521        <% for k in keys: %>
522            <% t = ConfReview.getTemplates()[k] %>
523        <tr id="TemplateRow_<%= k %>">
524            <td id="TemplateName_<%= k %>" style="border-right:5px solid #FFFFFF;border-left:5px solid #FFFFFF;">
525                <a style="color:#5FA5D4" href="<%= urlHandlers.UHDownloadContributionTemplate.getURL(t) %>">
526                    <%= t.getName() %>
527                </a>
528                <% if CanDelete: %>
529                &nbsp;&nbsp;&nbsp;
530                <a href="<%= urlHandlers.UHDeleteContributionTemplate.getURL(t) %>">
531                <a href="#" onclick="deleteTemplate('<%=t.getId()%>', '<%= t.getName() %>',  '<%= k %>')">
532                    <img class="imglink" style="vertical-align: bottom; width: 15px; height: 15px;" src="<%= Configuration.Config.getInstance().getSystemIconURL("remove") %>" alt="delete template">
533                </a>
534                <% end %>
535            </td>
536            <td id="TemplateFormat_<%= k %>" style="border-right:5px solid #FFFFFF;border-left:5px solid #FFFFFF;">
537                <%= t.getFormat() %>
538            </td>
539            <td id="TemplateDescription_<%= k %>" style="border-right:5px solid #FFFFFF;border-left:5px solid #FFFFFF;">
540                <%= t.getDescription() %>
541            </td>
542        </tr>
543        <% end %> -->
544        </table>
545        <% if ConfReview.hasTemplates(): %>
546         <% display = 'none' %>
547       <% end %>
548       <% else: %>
549         <% display = 'table' %>
550       <% end %>
551        <table id="NoTemplateTable" width="90%%" align="center" border="0" style="display:<%=display%>">
552        <tr><td style="border-right:5px solid #FFFFFF;border-left:5px solid #FFFFFF;">
553            <%= _("No templates have been uploaded yet.")%>
554        </td></tr>
555        </table>
556    </tr></td>
557    <tr><td style="padding-bottom:15px;"></td></tr>
558        <tr><td colspan="5" style="padding-top: 20px;">
559            <em><%= _("To assign team for Paper Review Module, please click on 'Team' and follow the steps")%></em>
560        </td></tr>   
561</table>
562</form>
563
564<script type="text/javascript">
565
566var observer = function(value) {
567   
568    if (value == "No reviewing") {
569        $E('steptitle').dom.style.display = 'none';
570        $E('title').dom.style.display = 'none';
571        $E('materialsTable').dom.style.display = 'none';
572        $E('statusTable').dom.style.display = 'none';
573        $E('reviewingQuestionsTable').dom.style.display = 'none';
574        $E('editingCriteriaTable').dom.style.display = 'none';
575        $E('defaultDueDatesTable').dom.style.display = 'none';
576        $E('refereeDefaultDateRow').dom.style.display = 'none';
577        $E('editorDefaultDateRow').dom.style.display = 'none';
578        $E('reviewerDefaultDateRow').dom.style.display = 'none';
579        $E('autoEmails').dom.style.display = 'none';
580        $E('refereeNotif').dom.style.display = 'none';
581        $E('editorNotif').dom.style.display = 'none';
582        $E('reviewerNotif').dom.style.display = 'none';
583        $E('refereeNotifForContribution').dom.style.display = 'none';
584        $E('editorNotifForContribution').dom.style.display = 'none';
585        $E('reviewerNotifForContribution').dom.style.display = 'none';
586        $E('refereeJudgementNotif').dom.style.display = 'none';
587        $E('editorJudgementNotif').dom.style.display = 'none';
588        $E('reviewerJudgementNotif').dom.style.display = 'none';
589        $E('authorSubmittedMatRefereeNotif').dom.style.display = 'none';
590        $E('authorSubmittedMatEditorNotif').dom.style.display = 'none';
591        $E('authorSubmittedMatReviewerNotif').dom.style.display = 'none';
592        $E('templateTable').dom.style.display = 'none';
593    }
594    if (value == "Content reviewing") {
595        $E('steptitle').dom.style.display = '';
596        $E('title').set('<%= _("content reviewing team")%>');
597        $E('title').dom.style.display = '';
598        $E('materialsTable').dom.style.display = 'none';
599        $E('statusTable').dom.style.display = '';
600        $E('reviewingQuestionsTable').dom.style.display = '';
601        $E('editingCriteriaTable').dom.style.display = 'none';
602        $E('defaultDueDatesTable').dom.style.display = '';
603        $E('refereeDefaultDateRow').dom.style.display = '';
604        $E('editorDefaultDateRow').dom.style.display = 'none';
605        $E('reviewerDefaultDateRow').dom.style.display = '';
606        $E('autoEmails').dom.style.display = ''
607        $E('refereeNotif').dom.style.display = '';
608        $E('editorNotif').dom.style.display = 'none';
609        $E('reviewerNotif').dom.style.display = '';
610        $E('refereeNotifForContribution').dom.style.display = '';
611        $E('editorNotifForContribution').dom.style.display = 'none';
612        $E('reviewerNotifForContribution').dom.style.display = '';
613        $E('refereeJudgementNotif').dom.style.display = '';
614        $E('editorJudgementNotif').dom.style.display = 'none';
615        $E('reviewerJudgementNotif').dom.style.display = '';
616        $E('authorSubmittedMatRefereeNotif').dom.style.display = '';
617        $E('authorSubmittedMatEditorNotif').dom.style.display = 'none';
618        $E('authorSubmittedMatReviewerNotif').dom.style.display = '';
619        $E('templateTable').dom.style.display = '';
620       
621        //showReviewableMaterials();
622        showReviewingStates();
623        showReviewingQuestions();
624        showDefaultReviewerDate();
625        showDefaultRefereeDate();
626        //showFormatChooser();
627    }
628    if (value == "Layout reviewing") {
629        $E('steptitle').dom.style.display = '';
630        $E('title').dom.style.display = '';
631        $E('title').set('<%= _("layout reviewing team")%>');
632        $E('materialsTable').dom.style.display = 'none';
633        $E('statusTable').dom.style.display = 'none';
634        $E('reviewingQuestionsTable').dom.style.display = 'none';
635        $E('editingCriteriaTable').dom.style.display = '';
636        $E('defaultDueDatesTable').dom.style.display = '';
637        $E('refereeDefaultDateRow').dom.style.display = 'none';
638        $E('editorDefaultDateRow').dom.style.display = '';
639        $E('reviewerDefaultDateRow').dom.style.display = 'none';
640        $E('autoEmails').dom.style.display = '';
641        $E('refereeNotif').dom.style.display = 'none';
642        $E('editorNotif').dom.style.display = '';
643        $E('reviewerNotif').dom.style.display = 'none';
644        $E('refereeNotifForContribution').dom.style.display = 'none';
645        $E('editorNotifForContribution').dom.style.display = '';
646        $E('reviewerNotifForContribution').dom.style.display = 'none';
647        $E('refereeJudgementNotif').dom.style.display = 'none';
648        $E('editorJudgementNotif').dom.style.display = '';
649        $E('reviewerJudgementNotif').dom.style.display = 'none';
650        $E('authorSubmittedMatRefereeNotif').dom.style.display = 'none';
651        $E('authorSubmittedMatEditorNotif').dom.style.display = '';
652        $E('authorSubmittedMatReviewerNotif').dom.style.display = 'none';
653        $E('templateTable').dom.style.display = '';
654       
655        //showReviewableMaterials();
656        showEditingCriteria();
657        showDefaultEditorDate();
658        //showFormatChooser();
659    }
660    if (value == "Content and layout reviewing") {
661        $E('steptitle').dom.style.display = '';
662        $E('title').set('<%= _("content and layout reviewing team")%>');
663        $E('title').dom.style.display = '';
664        $E('materialsTable').dom.style.display = 'none';
665        $E('statusTable').dom.style.display = '';
666        $E('reviewingQuestionsTable').dom.style.display = '';
667        $E('editingCriteriaTable').dom.style.display = '';
668        $E('defaultDueDatesTable').dom.style.display = '';
669        $E('refereeDefaultDateRow').dom.style.display = '';
670        $E('editorDefaultDateRow').dom.style.display = '';
671        $E('reviewerDefaultDateRow').dom.style.display = '';
672        $E('autoEmails').dom.style.display = '';
673        $E('refereeNotif').dom.style.display = '';
674        $E('editorNotif').dom.style.display = '';
675        $E('reviewerNotif').dom.style.display = '';
676        $E('refereeNotifForContribution').dom.style.display = '';
677        $E('editorNotifForContribution').dom.style.display = '';
678        $E('reviewerNotifForContribution').dom.style.display = '';
679        $E('refereeJudgementNotif').dom.style.display = '';
680        $E('editorJudgementNotif').dom.style.display = '';
681        $E('reviewerJudgementNotif').dom.style.display = '';
682        $E('authorSubmittedMatRefereeNotif').dom.style.display = '';
683        $E('authorSubmittedMatEditorNotif').dom.style.display = '';
684        $E('authorSubmittedMatReviewerNotif').dom.style.display = '';
685        $E('templateTable').dom.style.display = '';
686       
687        //showReviewableMaterials();
688        showReviewingStates();
689        showReviewingQuestions();
690        showDefaultReviewerDate();
691        showDefaultRefereeDate();
692        showEditingCriteria();
693        showDefaultEditorDate();
694        //showFormatChooser();
695    }
696}
697
698new IndicoUI.Widgets.Generic.selectionField($E('inPlaceEditReviewingMode'),
699                    'reviewing.conference.changeReviewingMode',
700                    {conference: '<%= ConfReview.getConference().getId() %>'},
701                    <%= ConferenceReview.reviewingModes[1:] %>,
702                    "<%= ConfReview.getReviewingMode() %>",
703                    observer);                   
704
705/*var showReviewableMaterials = function() {
706    new IndicoUI.Widgets.Generic.twoListField($E('inPlaceEditReviewableMaterials'),
707                        10,"200px",<%=ConfReview.getNonReviewableMaterials()%>,<%=ConfReview.getReviewableMaterials()%>,
708                        $T("Non reviewable materials"), $T("Reviewable materials"),
709                        'reviewing.conference.changeReviewableMaterials',
710                        {conference: '<%= ConfReview.getConference().getId() %>'},
711                        '');
712}*/
713
714               
715var showReviewingStates = function() {
716    new IndicoUI.Widgets.Generic.keywordField(
717        $E('inPlaceEditStates'),
718        'multipleLinesListItem',
719        'reviewing.conference.changeStates',
720        {conference: '<%= ConfReview.getConference().getId() %>'},
721        $T('Remove this status from the list')
722    );
723}
724
725var showReviewingQuestions = function() {
726    new IndicoUI.Widgets.Generic.keywordField(
727        $E('inPlaceEditQuestions'),
728        'multipleLinesListItem',
729        'reviewing.conference.changeQuestions',
730        {conference: '<%= ConfReview.getConference().getId() %>'},
731        $T('Remove this question from the list')
732    );
733}
734
735var showEditingCriteria = function() {
736    new IndicoUI.Widgets.Generic.keywordField(
737        $E('inPlaceEditCriteria'),
738        'multipleLinesListItem',
739        'reviewing.conference.changeCriteria',
740        {conference: '<%= ConfReview.getConference().getId() %>'},
741        $T('Remove this criteria from the list')
742    );
743}
744
745var showDefaultRefereeDate = function() {
746    new IndicoUI.Widgets.Generic.dateEditor($E('inPlaceEditDefaultRefereeDueDate'),
747                       'reviewing.conference.changeDefaultDueDate',
748                       {conference: '<%= ConfReview.getConference().getId() %>',
749                        dueDateToChange: 'Referee'},
750                       null, true);
751}
752               
753var showDefaultEditorDate = function() {
754    new IndicoUI.Widgets.Generic.dateEditor($E('inPlaceEditDefaultEditorDueDate'),
755                       'reviewing.conference.changeDefaultDueDate',
756                       {conference: '<%= ConfReview.getConference().getId() %>',
757                        dueDateToChange: 'Editor'},
758                       null, true);
759}
760
761var showDefaultReviewerDate = function() {
762    new IndicoUI.Widgets.Generic.dateEditor($E('inPlaceEditDefaultReviewerDueDate'),
763                       'reviewing.conference.changeDefaultDueDate',
764                       {conference: '<%= ConfReview.getConference().getId() %>',
765                        dueDateToChange: 'Reviewer'},
766                       null, true);
767}
768
769/*var deleteTemplate = function(tempId, tempName, rowId) {
770                    var row = $E('TemplateRow_'+rowId);
771                    var params = {conference: '<%= ConfReview.getConference().getId() %>',templateId: tempId}
772                    if (confirm("Are you sure you want to delete '"+ tempName+"'?")) {
773                        var killProgress = IndicoUI.Dialogs.Util.progress($T('Removing...'));
774                        jsonRpc(Indico.Urls.JsonRpcService,
775                            'reviewing.conference.deleteTemplate',
776                            params,
777                            function(response,error) {
778                                    if (exists(error)) {
779                                        killProgress();
780                                        IndicoUtil.errorReport(error);
781                                    } else {
782                                        $E('templateListTable').remove(row);
783                                        killProgress();
784                                    }
785                                }
786                    );
787                    }
788                };*/
789
790var TemplateList = function(){
791            <% keys = ConfReview.getTemplates().keys() %>
792            <% for k in keys: %>
793                <% t = ConfReview.getTemplates()[k] %>
794                    var row = Html.tr({id:'TemplateRow_'+'<%=t.getId()%>'});
795                var menu;
796                    menu = Html.span(
797                        {},
798                        Widget.link(command( function(){
799                            var params = {conference: <%= ConfReview.getConference().getId() %>,templateId: '<%=t.getId()%>'}
800                                    if (confirm("Are you sure you want to delete '"+ '<%=t.getName()%>'+"'?")) {
801                                        var killProgress = IndicoUI.Dialogs.Util.progress($T('Removing...'));
802                                        jsonRpc(Indico.Urls.JsonRpcService,
803                                            'reviewing.conference.deleteTemplate',
804                                            params,
805                                            function(response,error) {
806                                                    if (exists(error)) {
807                                                        killProgress();
808                                                        IndicoUtil.errorReport(error);
809                                                    } else {
810                                                        killProgress();
811                                                        $E('templateListTable').remove($E('TemplateRow_'+'<%=t.getId()%>'));
812                                                        tablerows = document.getElementById('templateListTable').rows.length;
813                                                                if(tablerows == '1'){
814                                                                    $E('NoTemplateTable').dom.style.display = '';
815                                                                    $E('templateListTableAll').dom.style.display = 'none';}
816                                                    }
817                                                }
818                                    );}
819                           },
820                            IndicoUI.Buttons.removeButton()
821                        )));
822                    var linkName = Html.a({href: "<%= urlHandlers.UHDownloadContributionTemplate.getURL() %>" + "?reviewingTemplateId=" + '<%= t.getId()%>' + "&confId=<%= ConfReview.getConference().getId()%>", style:{color:'#5FA5D4'}}, '<%= t.getName()%>');
823                    var cellName = Html.td({id:'TemplateName_'+'<%= t.getId()%>', style:{borderRight: '5px solid #FFFFFF', borderLeft:'5px solid #FFFFFF'}}, linkName);
824                    cellName.append(linkName);
825                    <% if CanDelete: %>
826                        cellName.append(menu);
827                    <% end %>
828                    var cellFormat = Html.td({id:'TemplateName_'+'<%= t.getId()%>', style:{borderRight: '5px solid #FFFFFF', borderLeft:'5px solid #FFFFFF'}}, '<%= t.getFormat()%>');
829                    var cellDescription = Html.td({id:'TemplateName_'+'<%= t.getId()%>', style:{borderRight: '5px solid #FFFFFF', borderLeft:'5px solid #FFFFFF'}}, '<%= t.getDescription()%>');
830                    row.append(cellName);
831                    row.append(cellFormat);
832                    row.append(cellDescription);       
833                    $E('templateListTable').append(row);
834             <% end %>
835           
836          } 
837 
838
839$E('refereeNotifButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.RefereeEmailNotif',
840                                            {conference: '<%= ConfReview.getConference().getId() %>',
841                                            AutoEmailsToChange: 'Referee'},
842                                            'When a Referee is added or removed from the team',
843                                            true
844));
845$E('reviewerNotifButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.ReviewerEmailNotif',
846                                            {conference: '<%= ConfReview.getConference().getId() %>',
847                                            AutoEmailsToChange: 'Reviewer'},
848                                            'When a Content Reviewer is added or removed from the team',
849                                            true
850));
851$E('editorNotifButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.EditorEmailNotif',
852                                            {conference: '<%= ConfReview.getConference().getId() %>',
853                                            AutoEmailsToChange: 'Editor'},
854                                            'When a Layout Reviewer is added or removed from the team',
855                                            true
856));
857$E('refereeNotifForContributionButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.RefereeEmailNotifForContribution',
858                                            {conference: '<%= ConfReview.getConference().getId() %>',
859                                            AutoEmailsToChange: 'Referee'},
860                                            'When a contribution is assigned or unassigned to a Referee',
861                                            true
862));
863$E('reviewerNotifForContributionButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.ReviewerEmailNotifForContribution',
864                                            {conference: '<%= ConfReview.getConference().getId() %>',
865                                            AutoEmailsToChange: 'Reviewer'},
866                                            'When a contribution is assigned or unassigned to a Content Reviewer',
867                                            true
868));
869$E('editorNotifForContributionButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.EditorEmailNotifForContribution',
870                                            {conference: '<%= ConfReview.getConference().getId() %>',
871                                            AutoEmailsToChange: 'Editor'},
872                                            'When a contribution is assigned or unassigned to a Layout Reviewer',
873                                            true
874));
875$E('refereeJudgementNotifButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.RefereeEmailJudgementNotif',
876                                            {conference: '<%= ConfReview.getConference().getId() %>',
877                                            AutoEmailsToChange: 'Referee'},
878                                            'To the author when the Referee submits judgement',
879                                            true
880));
881$E('reviewerJudgementNotifButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.ReviewerEmailJudgementNotif',
882                                            {conference: '<%= ConfReview.getConference().getId() %>',
883                                            AutoEmailsToChange: 'Reviewer'},
884                                            'To the author when a Content Reviewer submits judgement',
885                                            true
886));
887$E('editorJudgementNotifButton').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.EditorEmailJudgementNotif',
888                                            {conference: '<%= ConfReview.getConference().getId() %>',
889                                            AutoEmailsToChange: 'Editor'},
890                                            'To the author when the Layout Reviewer submits judgement',
891                                            true
892));
893$E('authorSubmittedMatRefereeNotif').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.AuthorSubmittedMatRefereeNotif',
894                                            {conference: '<%= ConfReview.getConference().getId() %>',
895                                            AutoEmailsToChange: 'Referee'},
896                                            'To the Referee when an author submits paper',
897                                            true
898));
899$E('authorSubmittedMatReviewerNotif').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.AuthorSubmittedMatEditorNotif',
900                                            {conference: '<%= ConfReview.getConference().getId() %>',
901                                            AutoEmailsToChange: 'Reviewer'},
902                                            'To the Content Reviewer when an author submits paper',
903                                            true
904));
905$E('authorSubmittedMatEditorNotif').set(IndicoUI.Widgets.Generic.switchOptionButton('reviewing.conference.AuthorSubmittedMatReviewerNotif',
906                                            {conference: '<%= ConfReview.getConference().getId() %>',
907                                            AutoEmailsToChange: 'Editor'},
908                                            'To the Layout Reviewer when an author submits paper',
909                                            true
910));
911
912
913/* IndicoUI.executeOnLoad(function(){
914    var pm = new IndicoUtil.parameterManager();
915    return $E('formatchooser').set(showFormatChooser(pm));
916});
917
918
919function showFormatChooser(pm){
920    var select = Html.select({name: 'format'}, Html.option({value: "Unknown"}, "--Select a format--")<% for f in Template.formats: %>,Html.option({value: "<%= f %>"}, "<%= f %>")<%end%>);
921    var text = Html.edit({name: 'formatOther'});
922    var chooser = new Chooser(new Lookup({
923            select: function() {
924                pm.remove(text);
925                pm.add(select);
926               var sel = '<select name="format" id="defaultformat">'+
927                         '<option value="Unknown"><%= _("--Select a format--")%></option>'+ 
928<% for f in Template.formats: %>
929                         '<option value="<%= f %>"><%= f %></option>'+
930<% end %>
931                         '</select>';
932                return Html.div({},select,
933                         " ",
934                         $T("or"),
935                         " ",
936                         Widget.link(command(function() {
937                             chooser.set('write');
938                         }, $T("other"))));
939            },
940
941            write: function() {
942                bind.detach(select);
943                pm.remove(select);
944                pm.add(text);
945                return Html.div({}, text,
946                                " ",
947                               $T("or"),
948                               " ",
949                                Widget.link(command(function() {
950                                    chooser.set('select');
951                                }, $T("select from list"))));
952            }
953        }));
954        chooser.set('select');
955
956        return Widget.block(chooser);
957}
958 */
959                 
960<% if ConfReview.hasReviewing(): %>
961    //showReviewableMaterials();
962    TemplateList();
963   
964    $E('uploadTpl').observeClick(function(){ var popup = new UploadTemplateDialog( 'Upload Template',
965        {conference: '<%= ConfReview.getConference().getId() %>'}, '350px', '30px',
966        <%= jsonEncode(Template.formats.keys()) %>, '<%= urlHandlers.UHSetTemplate.getURL() %>',
967        function(value) {
968            $E('NoTemplateTable').dom.style.display = 'none';
969            $E('templateListTableAll').dom.style.display = '';
970           
971                /* this is a little hack who is needed to get the URL of the new uploaded template*/
972                //linkDelete = "<%= urlHandlers.UHDeleteContributionTemplate.getURL() %>" + "?reviewingTemplateId=" + value.id + "&confId=<%= ConfReview.getConference().getId()%>";
973            //var deleteIcon = Html.img({className: 'imglink',style:{paddingLeft: '20px', verticalAlign: 'bottom', width: '15px', height: '15px'}, alt: 'delete template', src: imageSrc("remove")});
974            //var deleteLink = Html.a({href: linkDelete},deleteIcon);
975           
976            var row = Html.tr();
977            var params = {conference: '<%= ConfReview.getConference().getId() %>',templateId: value.id}
978            var deleteTemplate = function() {
979            if (confirm("Are you sure you want to delete '"+ value.name+"'?")) {
980                var killProgress = IndicoUI.Dialogs.Util.progress($T('Removing...'));
981                    jsonRpc(Indico.Urls.JsonRpcService,
982                            'reviewing.conference.deleteTemplate',
983                            params,
984                            function(response,error) {
985                            if (exists(error)) {
986                                killProgress();
987                                IndicoUtil.errorReport(error);
988                            } else {
989                                killProgress();
990                                $E('templateListTable').remove(row);
991                                tablerows = document.getElementById('templateListTableAll').rows.length;
992                                if(tablerows == '1'){
993                                    $E('NoTemplateTable').dom.style.display = '';
994                                    $E('templateListTableAll').dom.style.display = 'none';}
995                            }
996                        });}};
997        var menu;
998            menu = Html.span(
999                {},
1000                Widget.link(command(
1001                    deleteTemplate,
1002                    IndicoUI.Buttons.removeButton()
1003                )));
1004            var linkName = Html.a({href: "<%= urlHandlers.UHDownloadContributionTemplate.getURL() %>" + "?reviewingTemplateId=" + value.id + "&confId=<%= ConfReview.getConference().getId()%>", style:{color:'#5FA5D4'}}, value.name);
1005            var cellName = Html.td({id:'TemplateName_'+value.id, style:{borderRight: '5px solid #FFFFFF', borderLeft:'5px solid #FFFFFF'}}, linkName);
1006            cellName.append(linkName);
1007            <% if CanDelete: %>
1008                cellName.append(menu);
1009            <% end %>
1010            var cellFormat = Html.td({id:'TemplateName_'+value.id, style:{borderRight: '5px solid #FFFFFF', borderLeft:'5px solid #FFFFFF'}}, value.format);
1011            var cellDescription = Html.td({id:'TemplateName_'+value.id, style:{borderRight: '5px solid #FFFFFF', borderLeft:'5px solid #FFFFFF'}}, value.description);
1012            row.append(cellName);
1013            row.append(cellFormat);
1014            row.append(cellDescription);
1015           
1016            return $E('templateListTable').append(row);     
1017       
1018            }); popup.open();
1019            }
1020            );
1021<% end %>
1022<% if ConfReview.hasPaperReviewing(): %>
1023    showReviewingStates();
1024    showReviewingQuestions();
1025    showDefaultReviewerDate();
1026    showDefaultRefereeDate();
1027<% end %>
1028<% if ConfReview.hasPaperEditing(): %>
1029    showEditingCriteria();
1030    showDefaultEditorDate();
1031<% end %>
1032
1033</script>
Note: See TracBrowser for help on using the repository browser.