| 1 | <% declareTemplate(newTemplateStyle=True) %> |
|---|
| 2 | <% from MaKaC.reviewing import ConferenceReview %> |
|---|
| 3 | <% import MaKaC.webinterface.urlHandlers as urlHandlers %> |
|---|
| 4 | <% from MaKaC.common.utils import formatDateTime %> |
|---|
| 5 | |
|---|
| 6 | <% format = "%a %d %b %Y at %H\x3a%M" %> |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | <div style="padding-left: 10px; padding-top: 10px; padding-bottom: 10px;"> |
|---|
| 10 | <em><%= _("The reviewing mode choosen for this conference is")%>: <%= ConferenceChoiceStr%></em> |
|---|
| 11 | </div> |
|---|
| 12 | <% if not Review.isAuthorSubmitted(): %> |
|---|
| 13 | <table width="90%%" align="center" border="0" style="margin-bottom: 1em"> |
|---|
| 14 | <% if len(Review.getReviewManager().getVersioning()) == 1: %> |
|---|
| 15 | <tr> |
|---|
| 16 | <td> |
|---|
| 17 | <p style="padding-left: 25px;"><font color="gray"> |
|---|
| 18 | <%= _("Warning: the author(s) of this contribution have still not marked their initial materials as submitted.")%><br> |
|---|
| 19 | <%= _("You must wait until then to start the reviewing process.")%> |
|---|
| 20 | </font></p> |
|---|
| 21 | </td> |
|---|
| 22 | </tr> |
|---|
| 23 | <% end %> |
|---|
| 24 | <% else: %> |
|---|
| 25 | <tr> |
|---|
| 26 | <td> |
|---|
| 27 | <p style="padding-left: 25px;"><font color="gray"> |
|---|
| 28 | <%= _("Warning: since this contribution was marked 'To be corrected', the author(s) has not submitted new materials.")%><br> |
|---|
| 29 | <%= _("You must wait until then to restart the reviewing process.")%><br> |
|---|
| 30 | </font></p> |
|---|
| 31 | </td> |
|---|
| 32 | </tr> |
|---|
| 33 | <% end %> |
|---|
| 34 | </table> |
|---|
| 35 | <% end %> |
|---|
| 36 | <% else: %> |
|---|
| 37 | <!-- Judgement of the editor --> |
|---|
| 38 | <% if ConferenceChoice == 3 or ConferenceChoice == 4:%> |
|---|
| 39 | <table width="90%%" align="center" border="0" style="margin-bottom: 1em; margin-top: 1em"> |
|---|
| 40 | <tr> |
|---|
| 41 | <td id="editingJudgementHelp" colspan="5" class="groupTitle" style="border-bottom: none"><%= _("Layout judgement details")%> |
|---|
| 42 | <% inlineContextHelp(_('Here is displayed the judgement given by the Layout Reviewer.<br/>Only the Layout Reviewer of this contribution can change this.')) %> |
|---|
| 43 | </td> |
|---|
| 44 | </tr> |
|---|
| 45 | <tr> |
|---|
| 46 | <td align="left"> |
|---|
| 47 | <% if Editing.isSubmitted(): %> |
|---|
| 48 | <% includeTpl ('EditingJudgementDisplay', Editing = Editing, ShowEditor = True) %> |
|---|
| 49 | <% end %> |
|---|
| 50 | <% else: %> |
|---|
| 51 | <font><%= _("Warning: the layout reviewer has not given his judgement yet.")%></span> |
|---|
| 52 | <% end %> |
|---|
| 53 | </td> |
|---|
| 54 | </tr> |
|---|
| 55 | </table> |
|---|
| 56 | <% end %> |
|---|
| 57 | |
|---|
| 58 | <!-- List of advices from the reviewers --> |
|---|
| 59 | <% if ConferenceChoice == 2 or ConferenceChoice == 4:%> |
|---|
| 60 | <table width="90%%" align="center" border="0" style="margin-bottom: 1em"> |
|---|
| 61 | <tr> |
|---|
| 62 | <td id="reviewingJudgementHelp" colspan="5" class="groupTitle" style="padding-top: 5px; border-bottom: none"><%= _("Content judgement details")%> |
|---|
| 63 | <% inlineContextHelp(_('Here is displayed the judgement given by the Content Reviewers<br/>Only the Content Reviewers of this contribution can change their respective judgements.')) %> |
|---|
| 64 | </td> |
|---|
| 65 | </tr> |
|---|
| 66 | <tr> |
|---|
| 67 | <td> |
|---|
| 68 | <% if len(AdviceList) > 0: %> |
|---|
| 69 | <table cellspacing="0" cellpadding="5" width="100%%"> |
|---|
| 70 | <% for advice in AdviceList: %> |
|---|
| 71 | <% includeTpl ('AdviceJudgementDisplay', advice = advice, ShowReviewer = True) %> |
|---|
| 72 | <% end %> |
|---|
| 73 | </table> |
|---|
| 74 | <% end %> |
|---|
| 75 | <% else: %> |
|---|
| 76 | <font><%= _("Warning: all your content reviewers have not given their advices yet.")%></span> |
|---|
| 77 | <% end %> |
|---|
| 78 | </td> |
|---|
| 79 | </tr> |
|---|
| 80 | </table> |
|---|
| 81 | <% end %> |
|---|
| 82 | |
|---|
| 83 | <!-- Final reviewing of the referee --> |
|---|
| 84 | <% if ConferenceChoice == 2 or ConferenceChoice == 4:%> |
|---|
| 85 | <table width="90%%" align="center" border="0" style="margin-bottom: 1em"> |
|---|
| 86 | <tr> |
|---|
| 87 | <td id="finalJudgementHelp" colspan="5" class="groupTitle" style="padding-bottom: 15px; padding-top: 5px; border-bottom: none"><a name="FinalReviewing"></a><%= _("Final Judgement")%> |
|---|
| 88 | <% inlineContextHelp(_('Here is displayed the judgement given by the Referee.<br/>If you are the Referee of this contribution, you can change this.')) %> |
|---|
| 89 | </td> |
|---|
| 90 | </tr> |
|---|
| 91 | <% if not IsReferee: %> |
|---|
| 92 | <% if not Review.getRefereeJudgement().isSubmitted(): %> |
|---|
| 93 | <tr> |
|---|
| 94 | <td colspan="2" align="left"> |
|---|
| 95 | <span> |
|---|
| 96 | <%= _("This contribution has not been judged yet.")%><br> |
|---|
| 97 | <%= _("You are not allowed to perform the final judgement on this contribution.")%> |
|---|
| 98 | </span> |
|---|
| 99 | </td> |
|---|
| 100 | </tr> |
|---|
| 101 | <% end %> |
|---|
| 102 | <% end %> |
|---|
| 103 | <tr> |
|---|
| 104 | <td nowrap class="titleCellTD"> |
|---|
| 105 | <span class="titleCellFormat"><%= _("Reviewing questions:")%></span> |
|---|
| 106 | </td> |
|---|
| 107 | <td width="60%%" id="questionListDisplay"> |
|---|
| 108 | </td> |
|---|
| 109 | </tr> |
|---|
| 110 | <tr> |
|---|
| 111 | <td nowrap class="titleCellTD"><span class="titleCellFormat"><%= _("Comments")%>:</span></td> |
|---|
| 112 | <td> |
|---|
| 113 | <div id="inPlaceEditComments"></div> |
|---|
| 114 | </td> |
|---|
| 115 | </tr> |
|---|
| 116 | <tr> |
|---|
| 117 | <td nowrap class="titleCellTD"><span class="titleCellFormat"><strong><%= _("Judgement")%>:</strong></span></td> |
|---|
| 118 | <td> |
|---|
| 119 | <div id="inPlaceEditJudgement"><strong><%= Review.getRefereeJudgement().getJudgement() %></strong></div> |
|---|
| 120 | </td> |
|---|
| 121 | </tr> |
|---|
| 122 | <% if IsReferee: %> |
|---|
| 123 | <% if not FinalJudge: %> |
|---|
| 124 | <% display = 'span' %> |
|---|
| 125 | <% end %> |
|---|
| 126 | <% else: %> |
|---|
| 127 | <% display = 'none' %> |
|---|
| 128 | <% end %> |
|---|
| 129 | <tr> |
|---|
| 130 | <td colspan="3" style="padding-top: 20px"> |
|---|
| 131 | <span id="submitbutton" align="right"></span> |
|---|
| 132 | <span id="submitHelpPopUp" style="display:<%=display%>" align="right"></span> |
|---|
| 133 | <span id="submittedmessage"></span> |
|---|
| 134 | </td> |
|---|
| 135 | </tr> |
|---|
| 136 | <% end %> |
|---|
| 137 | </table> |
|---|
| 138 | <% end %> |
|---|
| 139 | <% end %> |
|---|
| 140 | <script type="text/javascript"> |
|---|
| 141 | |
|---|
| 142 | var observer = function(value) { |
|---|
| 143 | if(value!="None"){ |
|---|
| 144 | submitButton.dom.disabled = false; |
|---|
| 145 | $E('submitHelpPopUp').set(""); |
|---|
| 146 | $E('submitHelpPopUp').dom.display = 'none'; |
|---|
| 147 | } |
|---|
| 148 | |
|---|
| 149 | } |
|---|
| 150 | |
|---|
| 151 | var showWidgets = function(firstLoad) { |
|---|
| 152 | |
|---|
| 153 | new IndicoUI.Widgets.Generic.selectionField($E('inPlaceEditJudgement'), |
|---|
| 154 | 'reviewing.contribution.changeJudgement', |
|---|
| 155 | {conference: '<%= Contribution.getConference().getId() %>', |
|---|
| 156 | contribution: '<%= Contribution.getId() %>', |
|---|
| 157 | current: 'refereeJudgement' |
|---|
| 158 | }, <%= ConfReview.getAllStates() %>, "<%=FinalJudge%>", observer); |
|---|
| 159 | |
|---|
| 160 | new IndicoUI.Widgets.Generic.richTextField($E('inPlaceEditComments'), |
|---|
| 161 | 'reviewing.contribution.changeComments', |
|---|
| 162 | {conference: '<%= Contribution.getConference().getId() %>', |
|---|
| 163 | contribution: '<%= Contribution.getId() %>', |
|---|
| 164 | current: 'refereeJudgement' |
|---|
| 165 | },400,200); |
|---|
| 166 | |
|---|
| 167 | |
|---|
| 168 | |
|---|
| 169 | <% if len (ConfReview.getReviewingQuestions()) == 0 : %> |
|---|
| 170 | $E('questionListDisplay').set($T("No reviewing questions proposed for this conference.")); |
|---|
| 171 | <% end %> |
|---|
| 172 | <% else: %> |
|---|
| 173 | $E("questionListDisplay").set(''); |
|---|
| 174 | <% for q in ConfReview.getReviewingQuestions(): %> |
|---|
| 175 | var newDiv = Html.div({style:{paddingLeft:'5px', marginLeft:'10px'}}); |
|---|
| 176 | |
|---|
| 177 | newDiv.append(Html.span(null,"<%=q%>")); |
|---|
| 178 | newDiv.append(Html.br()); |
|---|
| 179 | |
|---|
| 180 | if (firstLoad) { |
|---|
| 181 | var initialValue = "<%= Review.getRefereeJudgement().getAnswer(q) %>"; |
|---|
| 182 | } else { |
|---|
| 183 | var initialValue = false; |
|---|
| 184 | } |
|---|
| 185 | |
|---|
| 186 | newDiv.append(new IndicoUI.Widgets.Generic.radioButtonField( |
|---|
| 187 | null, |
|---|
| 188 | 'horizontal2', |
|---|
| 189 | <%= str(range(len(ConfReview.reviewingQuestionsAnswers))) %>, |
|---|
| 190 | <%= str(ConfReview.reviewingQuestionsLabels) %>, |
|---|
| 191 | initialValue, |
|---|
| 192 | 'reviewing.contribution.changeCriteria', |
|---|
| 193 | {conference: '<%= Contribution.getConference().getId() %>', |
|---|
| 194 | contribution: '<%= Contribution.getId() %>', |
|---|
| 195 | criterion: '<%= q %>', |
|---|
| 196 | current: 'refereeJudgement' |
|---|
| 197 | })); |
|---|
| 198 | |
|---|
| 199 | $E("questionListDisplay").append(newDiv); |
|---|
| 200 | $E("questionListDisplay").append(Html.br()); |
|---|
| 201 | |
|---|
| 202 | <% end %> |
|---|
| 203 | <% end %> |
|---|
| 204 | } |
|---|
| 205 | |
|---|
| 206 | var showValues = function() { |
|---|
| 207 | indicoRequest('reviewing.contribution.changeComments', |
|---|
| 208 | { |
|---|
| 209 | conference: '<%= Contribution.getConference().getId() %>', |
|---|
| 210 | contribution: '<%= Contribution.getId() %>', |
|---|
| 211 | current: 'refereeJudgement' |
|---|
| 212 | }, |
|---|
| 213 | function(result, error){ |
|---|
| 214 | if (!error) { |
|---|
| 215 | if(result.length == 0){ |
|---|
| 216 | $E('inPlaceEditComments').set($T('No comments given.')); |
|---|
| 217 | } else { |
|---|
| 218 | $E('inPlaceEditComments').set(result) |
|---|
| 219 | } |
|---|
| 220 | } |
|---|
| 221 | } |
|---|
| 222 | ) |
|---|
| 223 | indicoRequest('reviewing.contribution.changeJudgement', |
|---|
| 224 | { |
|---|
| 225 | conference: '<%= Contribution.getConference().getId() %>', |
|---|
| 226 | contribution: '<%= Contribution.getId() %>', |
|---|
| 227 | current: 'refereeJudgement' |
|---|
| 228 | }, |
|---|
| 229 | function(result, error){ |
|---|
| 230 | if (!error) { |
|---|
| 231 | $E('inPlaceEditJudgement').set(result); |
|---|
| 232 | } |
|---|
| 233 | } |
|---|
| 234 | ) |
|---|
| 235 | |
|---|
| 236 | indicoRequest('reviewing.contribution.getCriteria', |
|---|
| 237 | { |
|---|
| 238 | conference: '<%= Contribution.getConference().getId() %>', |
|---|
| 239 | contribution: '<%= Contribution.getId() %>', |
|---|
| 240 | current: 'refereeJudgement' |
|---|
| 241 | }, |
|---|
| 242 | function(result, error){ |
|---|
| 243 | if (!error) { |
|---|
| 244 | if (result.length == 0) { |
|---|
| 245 | $E('questionListDisplay').set($T('No reviewing questions proposed for this conference.')); |
|---|
| 246 | } else { |
|---|
| 247 | $E('questionListDisplay').set(''); |
|---|
| 248 | for (var i = 0; i<result.length; i++) { |
|---|
| 249 | $E('questionListDisplay').append(result[i]); |
|---|
| 250 | $E('questionListDisplay').append(Html.br()); |
|---|
| 251 | } |
|---|
| 252 | } |
|---|
| 253 | |
|---|
| 254 | } |
|---|
| 255 | } |
|---|
| 256 | ) |
|---|
| 257 | } |
|---|
| 258 | |
|---|
| 259 | |
|---|
| 260 | <% if Review.getRefereeJudgement().isSubmitted() or not IsReferee:%> |
|---|
| 261 | var submitted = true; |
|---|
| 262 | <% end %> |
|---|
| 263 | <% else: %> |
|---|
| 264 | var submitted = false; |
|---|
| 265 | <% end %> |
|---|
| 266 | |
|---|
| 267 | |
|---|
| 268 | var updatePage = function (){ |
|---|
| 269 | if (submitted) { |
|---|
| 270 | <% if IsReferee: %> |
|---|
| 271 | submitButton.set($T('Undo sending')); |
|---|
| 272 | $E('submittedmessage').set($T('Judgement has been sent')); |
|---|
| 273 | <% end %> |
|---|
| 274 | showValues(); |
|---|
| 275 | } else { |
|---|
| 276 | <% if IsReferee: %> |
|---|
| 277 | submitButton.set($T('Send')); |
|---|
| 278 | <% if not Review.isAuthorSubmitted() or not FinalJudge: %> |
|---|
| 279 | submitButton.dom.disabled = true; |
|---|
| 280 | var HelpImg = Html.img({src: '<%= Config.getInstance().getSystemIconURL("help") %>', style: {marginLeft: '5px', verticalAlign: 'middle'}}); |
|---|
| 281 | $E('submitHelpPopUp').append(HelpImg); |
|---|
| 282 | /* <% if not Review.isAuthorSubmitted(): %> |
|---|
| 283 | var submitHelpPopUpText = function(event) { |
|---|
| 284 | IndicoUI.Widgets.Generic.tooltip(this, event, "<span style='padding:3px'>You are not allowed to give final judgement.<br/>You have to wait for the author to submit the materials.</span>"); |
|---|
| 285 | } |
|---|
| 286 | <% end %>*/ |
|---|
| 287 | <% if not FinalJudge: %> |
|---|
| 288 | var submitHelpPopUpText = function(event) { |
|---|
| 289 | IndicoUI.Widgets.Generic.tooltip(this, event, "<span style='padding:3px'>You must give your judgement before sending.</span>"); |
|---|
| 290 | } |
|---|
| 291 | <% end %> |
|---|
| 292 | $E('submitHelpPopUp').dom.onmouseover = submitHelpPopUpText; |
|---|
| 293 | <% end %> |
|---|
| 294 | $E('submittedmessage').set($T('Judgement not sent yet')); |
|---|
| 295 | <% end %> |
|---|
| 296 | showWidgets(); |
|---|
| 297 | } |
|---|
| 298 | } |
|---|
| 299 | |
|---|
| 300 | |
|---|
| 301 | <% if IsReferee: %> |
|---|
| 302 | var submitButton = new IndicoUI.Widgets.Generic.simpleButton($E('submitbutton'), 'reviewing.contribution.setSubmitted', |
|---|
| 303 | { |
|---|
| 304 | conference: '<%= Contribution.getConference().getId() %>', |
|---|
| 305 | contribution: '<%= Contribution.getId() %>', |
|---|
| 306 | current: 'refereeJudgement', |
|---|
| 307 | value: true |
|---|
| 308 | }, |
|---|
| 309 | function(result, error){ |
|---|
| 310 | if (!error) { |
|---|
| 311 | submitted = !submitted; |
|---|
| 312 | /*updatePage(false)*/ |
|---|
| 313 | location.href = "<%= urlHandlers.UHContributionModifReviewing.getURL(Contribution) %>#FinalReviewing" |
|---|
| 314 | location.reload(true) |
|---|
| 315 | } else { |
|---|
| 316 | IndicoUtil.errorReport(error); |
|---|
| 317 | } |
|---|
| 318 | }, |
|---|
| 319 | $T('Send') |
|---|
| 320 | ); |
|---|
| 321 | <% end %> |
|---|
| 322 | |
|---|
| 323 | updatePage(true); |
|---|
| 324 | |
|---|
| 325 | </script> |
|---|