Changeset eefc00 in indico
- Timestamp:
- 06/08/10 11:49:19 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- df3d1f
- Parents:
- b19615
- git-author:
- Ian Rolewicz <ian.rolewicz@…> (05/17/10 10:20:31)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (06/08/10 11:49:19)
- Files:
-
- 16 edited
-
doc/guides/UserGuide/UserGuidePics/confm3.png (modified) (previous)
-
indico/MaKaC/conference.py (modified) (2 diffs)
-
indico/MaKaC/registration.py (modified) (1 diff)
-
indico/MaKaC/services/implementation/reviewing.py (modified) (34 diffs)
-
indico/MaKaC/webinterface/pages/conferences.py (modified) (11 diffs)
-
indico/MaKaC/webinterface/pages/contributions.py (modified) (3 diffs)
-
indico/MaKaC/webinterface/pages/registrants.py (modified) (2 diffs)
-
indico/MaKaC/webinterface/pages/registrationForm.py (modified) (3 diffs)
-
indico/MaKaC/webinterface/pages/tracks.py (modified) (1 diff)
-
indico/MaKaC/webinterface/rh/CFADisplay.py (modified) (2 diffs)
-
indico/MaKaC/webinterface/rh/categoryDisplay.py (modified) (1 diff)
-
indico/MaKaC/webinterface/rh/conferenceDisplay.py (modified) (1 diff)
-
indico/MaKaC/webinterface/rh/ePaymentModif.py (modified) (2 diffs)
-
indico/MaKaC/webinterface/rh/evaluationModif.py (modified) (23 diffs)
-
indico/MaKaC/webinterface/rh/registrantsDisplay.py (modified) (3 diffs)
-
indico/MaKaC/webinterface/tpls/ConfModifMainData.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/conference.py
rbb4453 reefc00 4908 4908 4909 4909 def hasEnabledSection(self, section): 4910 return section in self.getSections() 4910 # This hack is there since there is no more enable/disable boxes 4911 # in the conference managment area corresponding to those features. 4912 # Until the managment area is improved to get a more user-friendly 4913 # way of enabling/disabling those features, we always make them 4914 # available for the time being, but we keep the previous code for 4915 # further improvements 4916 #return section in self.getSections() 4917 if section in ["paperReviewing"] : 4918 return False 4919 else : 4920 return True 4911 4921 4912 4922 def enableSection(self, section): … … 5049 5059 "videoconference": _("Videoconference"), # only for meetings 5050 5060 "collaboration": _("Collaboration"), # only for meetings 5051 "regForm": _("Registration Form") , 5052 "epay": _("e-payment") 5061 "regForm": _("Registration Form") 5053 5062 } 5054 5063 5055 5064 def hasSection(self, s): 5056 return self._sections.has_key(s) 5065 # This hack is there since there is no more enable/disable boxes 5066 # in the conference managment area corresponding to those features. 5067 # Until the managment area is improved to get a more user-friendly 5068 # way of enabling/disabling those features, we always make them 5069 # available in the side menu for the time being, but we keep 5070 # the previous code for further improvements 5071 #return self._sections.has_key(s) 5072 return True 5057 5073 5058 5074 def getSections(self): -
indico/MaKaC/registration.py
rd9fa47 reefc00 631 631 632 632 # if rp.getConference().getModPay().isActivated(): 633 if rp.getConference(). hasEnabledSection("epay") and rp.getConference().getModPay().isActivated() and rp.doPay():633 if rp.getConference().getModPay().isActivated() and rp.doPay(): 634 634 epaymentLink = "If you haven't paid for your registration yet, you can do it at %s" % urlHandlers.UHConfRegistrationFormCreationDone.getURL(rp) 635 635 paymentWarning = ", but please, do not forget to proceed with the payment if you haven't done it yet (see the link at the end of this email)." -
indico/MaKaC/services/implementation/reviewing.py
rbdd862 reefc00 58 58 else: 59 59 raise ServiceError("ERR-REV1a",_("Paper Reviewing is not active for this conference")) 60 60 61 61 def _checkParams(self): 62 62 ConferenceModifBase._checkParams(self) 63 63 self._confReview = self._conf.getConfReview() 64 64 65 65 class ConferenceReviewingPRMBase(ConferenceReviewingBase): 66 66 """ This base class verifies that the user is a PRM … … 69 69 if not RCPaperReviewManager.hasRights(self): 70 70 ConferenceReviewingBase._checkProtection(self) 71 71 72 72 class ConferenceReviewingAMBase(ConferenceReviewingBase): 73 73 """ This base class verifies that the user is an AM … … 76 76 if not RCAbstractManager.hasRights(self): 77 77 ConferenceReviewingBase._checkProtection(self) 78 78 79 79 class ConferenceReviewingPRMAMBase(ConferenceReviewingBase): 80 80 """ This base class verifies that the user is a PRM or an AM … … 83 83 if not RCPaperReviewManager.hasRights(self) and not RCAbstractManager.hasRights(self): 84 84 ConferenceReviewingBase._checkProtection(self) 85 86 85 86 87 87 class ConferenceReviewingPRMRefereeBase(ConferenceReviewingBase): 88 88 """ This base class verifies that the user is a PRM or a Referee of the Conference … … 91 91 if not RCPaperReviewManager.hasRights(self) and not RCReferee.hasRights(self): 92 92 ConferenceReviewingBase._checkProtection(self) 93 94 93 94 95 95 class ConferenceReviewingAssignStaffBase(UserModificationBase, ConferenceReviewingBase): 96 96 """ Base class for assigning referees, editors, etc. to contributions. … … 107 107 else: 108 108 raise ServiceError("ERR-REV2",_("List of contribution ids not set")) 109 109 110 110 class ConferenceReviewingAssignStaffBasePRM(ConferenceReviewingAssignStaffBase): 111 111 """ Base class that inherits from ConferenceReviewingAssignStaffBase, 112 112 and gives modification rights only to PRMs or Managers. 113 113 """ 114 114 115 115 def _checkProtection(self): 116 116 if not RCPaperReviewManager.hasRights(self): 117 117 ProtectedModificationService._checkProtection(self) 118 118 119 119 class ConferenceReviewingAssignStaffBasePRMReferee(ConferenceReviewingAssignStaffBase): 120 120 """ Base class that inherits from ConferenceReviewingAssignStaffBase, … … 122 122 case, only to referees of contributions in self._contributions). 123 123 """ 124 124 125 125 def _checkProtection(self): 126 126 hasRights = False; … … 134 134 break 135 135 hasRights = isRefereeOfAllContributions 136 136 137 137 if not hasRights: 138 138 ProtectedModificationService._checkProtection(self) … … 155 155 #Note: don't change the order of the inheritance here! 156 156 pass 157 158 157 158 159 159 class ConferenceReviewingModeModification(ConferenceReviewingSetupTextModificationBase ): 160 160 161 161 def _handleSet(self): 162 162 self._confReview.setReviewingMode( self._value ) 163 163 164 164 def _handleGet(self): 165 165 return self._confReview.getReviewingMode() 166 167 166 167 168 168 class ConferenceReviewingStatesModification(ConferenceReviewingListModificationBase): 169 169 170 170 def _handleGet(self): 171 171 return self._confReview.getStates() 172 172 173 173 def _handleSet(self): 174 174 self._confReview.setStates(self._value) 175 176 175 176 177 177 class ConferenceReviewingQuestionsModification(ConferenceReviewingListModificationBase): 178 178 179 179 def _handleGet(self): 180 180 return self._confReview.getReviewingQuestions() 181 181 182 182 def _handleSet(self): 183 183 self._confReview.setReviewingQuestions(self._value) 184 185 184 185 186 186 class ConferenceReviewingCriteriaModification(ConferenceReviewingListModificationBase): 187 187 188 188 def _handleGet(self): 189 189 return self._confReview.getLayoutCriteria() 190 190 191 191 def _handleSet(self): 192 192 self._confReview.setLayoutCriteria(self._value) 193 194 193 194 195 195 class ConferenceReviewingDefaultDueDateModification(ConferenceReviewingDateTimeModificationBase): 196 196 197 197 def _checkParams(self): 198 198 ConferenceReviewingDateTimeModificationBase._checkParams(self) 199 199 self._dueDateToChange = self._params.get("dueDateToChange") 200 200 201 201 def _setParam(self): 202 202 if self._dueDateToChange == "Referee": … … 208 208 else: 209 209 raise ServiceError("ERR-REV3a",_("Kind of due date to change not set")) 210 210 211 211 def _handleGet(self): 212 212 if self._dueDateToChange == "Referee": … … 218 218 else: 219 219 raise ServiceError("ERR-REV3b",_("Kind of due date to change not set")) 220 220 221 221 if date is None: 222 222 return 'No date set yet' 223 223 else: 224 224 return datetime.datetime.strftime(date,'%d/%m/%Y %H:%M') 225 226 225 226 227 227 class ConferenceAbstractReviewingDefaultDueDateModification(ConferenceAbstractReviewingDateTimeModificationBase): 228 228 229 229 def _setParam(self): 230 230 self._conf.getConfReview().setDefaultAbstractReviewerDueDate(self._pTime) 231 231 232 232 def _handleGet(self): 233 233 date = self._conf.getConfReview().getAdjustedDefaultAbstractReviewerDueDate() … … 236 236 else: 237 237 return datetime.datetime.strftime(date,'%d/%m/%Y %H:%M') 238 239 238 239 240 240 class ConferenceReviewingCompetenceModification(ListModificationBase, ConferenceReviewingPRMAMBase): 241 241 #Note: don't change the order of the inheritance here! … … 244 244 Note: don't change the order of the inheritance! 245 245 """ 246 246 247 247 def _checkParams(self): 248 248 ConferenceReviewingPRMAMBase._checkParams(self) … … 253 253 else: 254 254 raise ServiceError("ERR-REV4",_("No user id specified")) 255 255 256 256 def _handleGet(self): 257 257 return self._confReview.getCompetencesByUser(self._user) 258 258 259 259 def _handleSet(self): 260 260 self._confReview.setUserCompetences(self._user, self._value) … … 267 267 Note: don't change the order of the inheritance! 268 268 """ 269 269 270 270 def _handleGet(self): 271 271 if self._destination == "left": #left select box is the list of non-reviewable materials … … 273 273 if self._destination == "right": #right select box is the list of reviewable materials 274 274 return self._confReview.getReviewableMaterials() 275 275 276 276 def _handleSet(self): 277 277 if self._destination == "right": #right select box is the list of reviewable materials … … 291 291 if self._role is None: 292 292 raise ServiceError("ERR-REV5",_("No role specified")) 293 293 294 294 def _handleGet(self): 295 295 return [{"id": user.getId(), "name": user.getStraightFullName(), "competences": c} 296 296 for user, c in self._confReview.getAllUserCompetences(True, self._role)] 297 298 299 297 298 299 300 300 class ConferenceReviewingAssignReferee(ConferenceReviewingAssignStaffBasePRM): 301 301 """ Assigns a referee to a list of contributions … … 312 312 rm.setReferee(self._targetUser) 313 313 return True 314 314 315 315 class ConferenceReviewingRemoveReferee(ConferenceReviewingAssignStaffBasePRM): 316 316 """ Removes the referee from a list of contributions … … 322 322 rm.removeReferee() 323 323 return True 324 325 324 325 326 326 class ConferenceReviewingAssignEditor(ConferenceReviewingAssignStaffBasePRMReferee): 327 327 """ Assigns an editor to a list of contributions … … 330 330 if not self._targetUser: 331 331 raise ServiceError("ERR-REV6b",_("user id not set")) 332 332 333 333 for contribution in self._contributions: 334 334 rm = contribution.getReviewManager() … … 341 341 raise ServiceError("ERR-REV9a",_("This contribution has no Referee yet")) 342 342 return True 343 343 344 344 class ConferenceReviewingRemoveEditor(ConferenceReviewingAssignStaffBasePRMReferee): 345 345 """ Removes the editor from a list of contributions … … 359 359 if not self._targetUser: 360 360 raise ServiceError("ERR-REV6c",_("user id not set")) 361 361 362 362 for contribution in self._contributions: 363 363 rm = contribution.getReviewManager() 364 364 if rm.hasReferee(): 365 if not rm.isReviewer(self._targetUser): 365 if not rm.isReviewer(self._targetUser): 366 366 rm.addReviewer(self._targetUser) 367 367 else: … … 371 371 class ConferenceReviewingRemoveReviewer(ConferenceReviewingAssignStaffBasePRMReferee): 372 372 """ Removes a given reviewer from a list of contributions 373 """ 373 """ 374 374 def _getAnswer(self): 375 375 if not self._targetUser: 376 376 raise ServiceError("ERR-REV6d",_("user id not set")) 377 378 for contribution in self._contributions: 379 rm = contribution.getReviewManager() 377 378 for contribution in self._contributions: 379 rm = contribution.getReviewManager() 380 380 rm.removeReviewer(self._targetUser) 381 381 return True … … 384 384 class ConferenceReviewingRemoveAllReviewers(ConferenceReviewingAssignStaffBasePRMReferee): 385 385 """ Removes all the reviewers from a list of contributions 386 """ 386 """ 387 387 def _getAnswer(self): 388 388 for contribution in self._contributions: … … 396 396 ##################################### 397 397 class ContributionReviewingBase(ProtectedModificationService, ContributionBase): 398 398 399 399 def _checkParams(self): 400 400 ContributionBase._checkParams(self) 401 401 self._current = self._params.get("current", None) 402 402 403 403 def _checkProtection(self): 404 404 if self._target.getConference().hasEnabledSection("paperReviewing"): … … 410 410 elif self._current == 'reviewerJudgement': 411 411 hasRights = RCContributionReviewer.hasRights(self) 412 412 413 413 if not hasRights and not RCPaperReviewManager.hasRights(self): 414 ProtectedModificationService._checkProtection(self) 414 ProtectedModificationService._checkProtection(self) 415 415 else: 416 416 raise ServiceError("ERR-REV1b",_("Paper Reviewing is not active for this conference")) 417 418 417 418 419 419 def getJudgementObject(self): 420 lastReview = self._target.getReviewManager().getLastReview() 420 lastReview = self._target.getReviewManager().getLastReview() 421 421 if self._current == 'refereeJudgement': 422 422 return lastReview.getRefereeJudgement() … … 442 442 443 443 class ContributionReviewingDueDateModification(ContributionReviewingDateTimeModificationBase): 444 444 445 445 def _checkParams(self): 446 446 ContributionReviewingDateTimeModificationBase._checkParams(self) 447 447 self._dueDateToChange = self._params.get("dueDateToChange") 448 449 448 449 450 450 def _setParam(self): 451 451 lastReview = self._target.getReviewManager().getLastReview() … … 458 458 else: 459 459 raise ServiceError("ERR-REV3c",_("Kind of due date to change not set")) 460 460 461 461 def _handleGet(self): 462 462 lastReview = self._target.getReviewManager().getLastReview() … … 469 469 else: 470 470 raise ServiceError("ERR-REV3d",_("Kind of due date to change not set")) 471 471 472 472 return datetime.datetime.strftime(date,'%d/%m/%Y %H:%M') 473 473 474 474 class ContributionReviewingJudgementModification(ContributionReviewingTextModificationBase): 475 475 476 476 def _handleSet(self): 477 477 if self.getJudgementObject().isSubmitted(): 478 478 raise ServiceError("ERR-REV8a",_("You cannot modify a judgement marked as submitted")) 479 479 self.getJudgementObject().setJudgement(self._value) 480 480 481 481 def _handleGet(self): 482 482 judgement = self.getJudgementObject().getJudgement() … … 487 487 488 488 class ContributionReviewingCommentsModification(ContributionReviewingHTMLModificationBase): 489 489 490 490 def _handleSet(self): 491 491 if self.getJudgementObject().isSubmitted(): 492 492 raise ServiceError("ERR-REV8b",_("You cannot modify a judgement marked as submitted")) 493 493 self.getJudgementObject().setComments(self._value) 494 495 def _handleGet(self): 494 495 def _handleGet(self): 496 496 return self.getJudgementObject().getComments() 497 497 498 498 class ContributionReviewingCriteriaModification(ContributionReviewingTextModificationBase): 499 499 500 500 def _checkParams(self): 501 501 ContributionReviewingTextModificationBase._checkParams(self) 502 502 self._criterion = self._params.get("criterion") 503 503 504 504 def _handleSet(self): 505 505 if self.getJudgementObject().isSubmitted(): 506 506 raise ServiceError("ERR-REV8c",_("You cannot modify a judgement marked as submitted")) 507 507 self.getJudgementObject().setAnswer(self._criterion, int(self._value)) 508 508 509 509 def _handleGet(self): 510 510 return self.getJudgementObject().getAnswer(self._criterion) 511 512 511 512 513 513 class ContributionReviewingSetSubmitted(ContributionReviewingBase): 514 514 515 515 def _getAnswer( self ): 516 516 517 517 if self._params.has_key('value'): 518 518 judgementObject = self.getJudgementObject() … … 521 521 except MaKaCError, e: 522 522 raise ServiceError("ERR-REV9", e.getMsg()) 523 523 524 524 judgementObject.setAuthor(self._getUser()) 525 525 judgementObject.sendNotificationEmail(widthdrawn = not self.getJudgementObject().isSubmitted()) … … 527 527 528 528 class ContributionReviewingCriteriaDisplay(ContributionReviewingBase): 529 529 530 530 def _getAnswer( self ): 531 531 return [str(q) + " : " + ConferenceReview.reviewingQuestionsAnswers[int(a)] 532 532 for q,a in self.getJudgementObject().getAnswers()] 533 533 534 534 535 535 … … 544 544 "conference.changeReviewableMaterials" : ConferenceReviewingReviewableMaterialsModification, 545 545 "conference.userCompetencesList": ConferenceReviewingUserCompetenceList, 546 546 547 547 "conference.assignReferee" : ConferenceReviewingAssignReferee, 548 548 "conference.removeReferee" : ConferenceReviewingRemoveReferee, … … 552 552 "conference.removeReviewer" : ConferenceReviewingRemoveReviewer, 553 553 "conference.removeAllReviewers" : ConferenceReviewingRemoveAllReviewers, 554 554 555 555 "contribution.changeDueDate": ContributionReviewingDueDateModification, 556 556 "contribution.changeComments": ContributionReviewingCommentsModification, -
indico/MaKaC/webinterface/pages/conferences.py
r9a76d0 reefc00 159 159 self._cfaViewSubmissionsOpt = self._sectionMenu.getLinkByName("ViewAbstracts") 160 160 self._abstractsBookOpt = self._sectionMenu.getLinkByName("abstractsBook") 161 self._cfaOpt.setVisible(self._conf.getAbstractMgr().isActive()) 162 if not self._conf.hasEnabledSection("cfa"): 161 if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 163 162 self._cfaOpt.setVisible(False) 164 163 self._abstractsBookOpt.setVisible(False) 165 164 else: 165 self._cfaOpt.setVisible(True) 166 166 self._abstractsBookOpt.setVisible(True) 167 167 self._trackMgtOpt = self._sectionMenu.getLinkByName("manageTrack") … … 171 171 self._viewRegFormOpt = self._sectionMenu.getLinkByName("ViewMyRegistration") 172 172 self._newRegFormOpt = self._sectionMenu.getLinkByName("NewRegistration") 173 self._regFormOpt.setVisible(self._conf.getRegistrationForm().isActivated())174 173 if awUser != None: 175 174 self._viewRegFormOpt.setVisible(awUser.isRegisteredInConf(self._conf)) … … 179 178 self._newRegFormOpt.setVisible(True) 180 179 self._registrantsListOpt = self._sectionMenu.getLinkByName("registrants") 181 if not self._conf. hasEnabledSection("regForm"):180 if not self._conf.getRegistrationForm().isActivated() or not self._conf.hasEnabledSection("regForm"): 182 181 self._regFormOpt.setVisible(False) 183 182 self._registrantsListOpt.setVisible(False) 184 183 else: 184 self._regFormOpt.setVisible(True) 185 185 self._registrantsListOpt.setVisible(True) 186 186 … … 222 222 self._myTracksOpt.setCaption( _("My track")) 223 223 self._myTracksOpt.setURL(urlHandlers.UHTrackModifAbstracts.getURL(lt[0])) 224 if not self._conf. hasEnabledSection("cfa"):224 if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 225 225 self._myTracksOpt.setVisible(False) 226 226 self._myContribsOpt=self._sectionMenu.getLinkByName("mycontribs") … … 237 237 self._trackMgtOpt.setURL(str(url)) 238 238 self._trackMgtOpt.setVisible(True) 239 if not self._conf. hasEnabledSection("cfa"):239 if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 240 240 self._trackMgtOpt.setVisible(False) 241 241 … … 1062 1062 vars["bulletURL"] = Config.getInstance().getSystemIconURL( "track_bullet" ) 1063 1063 mgtIconHTML = "" 1064 if self._track.getConference(). hasEnabledSection("cfa") and self._track.canCoordinate( self._aw ):1064 if self._track.getConference().getAbstractMgr().isActive() and self._track.getConference().hasEnabledSection("cfa") and self._track.canCoordinate( self._aw ): 1065 1065 url = urlHandlers.UHTrackModifAbstracts.getURL( self._track ) 1066 1066 if self._track.getConference().canModify( self._aw ): … … 2169 2169 self._regFormMenuItem.setVisible(False) 2170 2170 2171 if not (self._conf.getType() == "conference" and self._conf.hasEnabledSection('paperReviewing') and (canModify or isReviewingStaff)): 2172 self._reviewingMenuItem.setVisible(False) 2173 else: #reviewing tab is enabled 2174 if isReviewingStaff and not canModify: 2175 self._reviewingMenuItem.setVisible(True) 2171 # if not (self._conf.getType() == "conference" and self._conf.hasEnabledSection('paperReviewing') and (canModify or isReviewingStaff)): 2172 # self._reviewingMenuItem.setVisible(False) 2173 # else: #reviewing tab is enabled 2174 # if isReviewingStaff and not canModify: 2175 # self._reviewingMenuItem.setVisible(True) 2176 # For now we don't want the paper reviewing to be displayed 2177 self._reviewingMenuItem.setVisible(False) 2178 2176 2179 2177 2180 if not (canModify or … … 2765 2768 type.getDescription())) 2766 2769 vars["typeList"] = "".join(typeList) 2767 #if not self._conf.isClosed():2768 # vars["status"] = "close"2769 # vars["statusURL"] = urlHandlers.UHConferenceClose.getURL(self._conf)2770 #else:2771 # vars["status"] = "open"2772 # vars["statusURL"] = urlHandlers.UHConferenceOpen.getURL(self._conf)2773 #-----Setting of the sections of the conference--------2774 vars["enablePic"]=Config.getInstance().getSystemIconURL( "enabledSection" )2775 vars["disablePic"]=Config.getInstance().getSystemIconURL( "disabledSection" )2776 enabledText = _("Click to disable")2777 disabledText = _("Click to enable")2778 lsect=[]2779 for sect in conference.ConfSectionsMgr().getSectionKeys():2780 2781 # Videoconference section should not appear in conferences2782 if sect in ['collaboration', 'paperReviewing','videoconference']:2783 continue2784 2785 url=urlHandlers.UHConfSectionsSettings.getURL(self._conf)2786 url.addParam("sectionId", sect)2787 url=quoteattr("%s#sections"%str(url))2788 if self._conf.hasEnabledSection(sect):2789 icon=vars["enablePic"]2790 textIcon=enabledText2791 else:2792 icon=vars["disablePic"]2793 textIcon=disabledText2794 lsect.append("""2795 <tr>2796 <td>2797 <a href=%s><img src=%s alt="%s" class="imglink"></a> <a href=%s>%s</a>2798 </td>2799 </tr>2800 """%(url, \2801 icon, \2802 textIcon, \2803 url, \2804 conference.ConfSectionsMgr().getSection(sect)))2805 vars["sections"]="".join(lsect)2806 2770 #------------------------------------------------------ 2807 2771 vars["reportNumbersTable"]=wcomponents.WReportNumbersTable(self._conf).getHTML() … … 7783 7747 def _getAdditionalFieldsHTML(self): 7784 7748 html="" 7785 if self.__owner.getConference(). hasEnabledSection("cfa") and self.__owner.getConference().getAbstractMgr().hasAnyEnabledAbstractField():7749 if self.__owner.getConference().getAbstractMgr().isActive() and self.__owner.getConference().hasEnabledSection("cfa") and self.__owner.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): 7786 7750 for f in self.__owner.getConference().getAbstractMgr().getAbstractFieldsMgr().getFields(): 7787 7751 if f.isActive(): … … 7867 7831 def _getAdditionalFieldsHTML(self): 7868 7832 html="" 7869 if self._conf.hasEnabledSection("cfa") and \ 7833 if self._conf.getAbstractMgr().isActive() and \ 7834 self._conf.hasEnabledSection("cfa") and \ 7870 7835 self._conf.getType() == "conference" and \ 7871 7836 self._conf.getAbstractMgr().hasAnyEnabledAbstractField(): … … 9358 9323 9359 9324 def _getTracksHTML(self): 9360 if self._aw.getUser() is None or not self._conf. hasEnabledSection("cfa"):9325 if self._aw.getUser() is None or not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 9361 9326 return "" 9362 9327 lt=self._conf.getCoordinatedTracks(self._aw.getUser()) -
indico/MaKaC/webinterface/pages/contributions.py
r8989f6 reefc00 551 551 552 552 def _getAbstractHTML( self ): 553 if not self._contrib.getConference(). hasEnabledSection("cfa"):553 if not self._contrib.getConference().getAbstractMgr().isActive() or not self._contrib.getConference().hasEnabledSection("cfa"): 554 554 return "" 555 555 abs = self._contrib.getAbstract() … … 663 663 def _getAdditionalFieldsHTML(self): 664 664 html="" 665 if self._contrib.getConference(). hasEnabledSection("cfa") and self._contrib.getConference().getAbstractMgr().hasAnyEnabledAbstractField():665 if self._contrib.getConference().getAbstractMgr().isActive() and self._contrib.getConference().hasEnabledSection("cfa") and self._contrib.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): 666 666 for f in self._contrib.getConference().getAbstractMgr().getAbstractFieldsMgr().getFields(): 667 667 if f.isActive(): … … 1230 1230 def _getAdditionalFieldsHTML(self): 1231 1231 html="" 1232 if self._contrib.getConference().hasEnabledSection("cfa") and \ 1232 if self._contrib.getConference().getAbstractMgr().isActive() and \ 1233 self._contrib.getConference().hasEnabledSection("cfa") and \ 1233 1234 self._contrib.getConference().getType() == "conference" and \ 1234 1235 self._contrib.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): -
indico/MaKaC/webinterface/pages/registrants.py
rd9fa47 reefc00 177 177 if display == []: 178 178 display=["Email", "Institution","Phone","City","Country"] 179 if self._conf. hasEnabledSection("epay"):179 if self._conf.getModPay().isActivated(): 180 180 display.extend(["isPayed","idpayment","amountToPay"]) 181 181 return display … … 1031 1031 elif self._registrant.doPay(): 1032 1032 urlEpayment="" 1033 if self._registrant.getConference(). hasEnabledSection("epay") and self._registrant.getConference().getModPay().isActivated() and self._registrant.doPay():1033 if self._registrant.getConference().getModPay().isActivated() and self._registrant.doPay(): 1034 1034 urlEpayment = """<br/><br/><i>Direct access link for epayment:</i><br/><small>%s</small>"""%escape(str(urlHandlers.UHConfRegistrationFormCreationDone.getURL(self._registrant))) 1035 1035 return _(""" <form action=%s method="POST"> -
indico/MaKaC/webinterface/pages/registrationForm.py
rd9fa47 reefc00 59 59 self._tabEPay.disable() 60 60 self._tabRegistrationPreview.disable() 61 if not self._conf.hasEnabledSection("epay"):62 self._tabEPay.disable()63 61 64 62 def _getPageContent(self, params): … … 2255 2253 modPay=self._conf.getModPay() 2256 2254 html=[] 2257 if self._conf.hasEnabledSection("epay") andmodPay.isActivated() and self._registrant.doPay():2255 if modPay.isActivated() and self._registrant.doPay(): 2258 2256 total={} 2259 2257 total["value"]=0 … … 2379 2377 vars["paymentInfo"] = self._getPaymentInfo() 2380 2378 vars["epaymentAnnounce"] = "" 2381 if self._conf. hasEnabledSection("epay") and self._conf.getModPay().isActivated() and self._registrant.doPay():2379 if self._conf.getModPay().isActivated() and self._registrant.doPay(): 2382 2380 vars["epaymentAnnounce"] = """<br><font color="black">Please proceed to the <b>payment of your order</b> (by using the "Next" button down this page). You will then receive the payment details.</font>""" 2383 2381 return vars -
indico/MaKaC/webinterface/pages/tracks.py
rbdd862 reefc00 93 93 self._tabAbstracts = self._tabCtrl.newTab( "abstracts", _("Abstracts"), \ 94 94 urlHandlers.UHTrackModifAbstracts.getURL( self._track ) ) 95 if self._conf.hasEnabledSection("cfa"):95 if self._conf.getAbstractMgr().isActive() and self._conf.hasEnabledSection("cfa"): 96 96 self._tabAbstracts.enable() 97 97 self._tabCoordination.enable() -
indico/MaKaC/webinterface/rh/CFADisplay.py
rdd1ff0 reefc00 541 541 def _checkProtection( self ): 542 542 RHConferenceBaseDisplay._checkProtection(self) 543 if not self._conf. hasEnabledSection("cfa"):543 if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 544 544 raise MaKaCError( _("The Call For Abstracts was disabled by the conference managers")) 545 545 … … 562 562 def _checkProtection( self ): 563 563 RHConferenceBaseDisplay._checkProtection(self) 564 if not self._conf. hasEnabledSection("cfa"):564 if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 565 565 raise MaKaCError( _("The Call For Abstracts was disabled by the conference managers")) 566 566 -
indico/MaKaC/webinterface/rh/categoryDisplay.py
r48a9df reefc00 247 247 else : 248 248 c.disableSessionSlots() 249 249 250 return c 250 251 -
indico/MaKaC/webinterface/rh/conferenceDisplay.py
re309f6 reefc00 933 933 def _checkProtection( self ): 934 934 RHConferenceBaseDisplay._checkProtection(self) 935 if not self._conf. hasEnabledSection("cfa"):935 if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 936 936 raise MaKaCError( _("The Call For Abstracts was disabled by the conference managers")) 937 937 -
indico/MaKaC/webinterface/rh/ePaymentModif.py
rc6b710 reefc00 29 29 from MaKaC.common import HelperMaKaCInfo 30 30 from MaKaC.i18n import _ 31 from MaKaC.webinterface.pages import registrationForm 31 32 32 33 class RHEPaymentModifBase( conferenceModif.RHConferenceModifBase ): … … 34 35 def _checkProtection( self ): 35 36 conferenceModif.RHConferenceModifBase._checkProtection(self) 36 if not self._conf.hasEnabledSection("epay"):37 raise MaKaCError( _("The registration form was disabled by the conference managers"))38 37 39 38 class RHEPaymentModif( RHEPaymentModifBase ): -
indico/MaKaC/webinterface/rh/evaluationModif.py
rbdd862 reefc00 34 34 class RHEvaluationBase(conferenceModif.RHConferenceModifBase): 35 35 """Basis of an Evaluation""" 36 36 37 37 def _checkProtection(self): 38 38 conferenceModif.RHConferenceModifBase._checkProtection(self) … … 42 42 class RHEvaluationSetup(RHEvaluationBase): 43 43 """Modification of an Evaluation.""" 44 44 45 45 def _process(self): 46 46 return evaluations.WPConfModifEvaluationSetup(self, self._conf).display() … … 48 48 class RHEvaluationSetupChangeStatus( RHEvaluationBase ): 49 49 """changes status of an Evaluation.""" 50 50 51 51 def _checkParams( self, params ): 52 52 RHEvaluationBase._checkParams( self, params ) 53 53 self._newStatus = params.get("changeTo", False) 54 54 55 55 def _process( self ): 56 56 evaluation = self._conf.getEvaluation() … … 63 63 class RHEvaluationSetupSpecialAction( RHEvaluationBase ): 64 64 """processes a special action.""" 65 65 66 66 def _process( self ): 67 67 params = self.getRequestParams() … … 84 84 evaluation.reinit() 85 85 self._redirect(urlHandlers.UHConfModifEvaluationSetup.getURL(self._conf)) 86 86 87 87 def _exportXml(self, evaluation, params): 88 88 """exportation of an evaluation.""" … … 97 97 self._req.headers_out["Content-Disposition"] = 'inline; filename="%s"'%Evaluation._XML_FILENAME 98 98 return xmlFile 99 99 100 100 def _importedXml(self, evaluation, params): 101 101 """ Importation of an evaluation. … … 181 181 isSelected = self._getValue(choiceItemNode,"isSelected") 182 182 question.insertChoiceItem(itemText, isSelected) 183 183 184 184 def _getElement(self, container, tagname): 185 185 """ Find the first element with given tagname contained in given container element. 186 186 If not found, return an empty Element tagged "_empty" (in order to avoid crashes). 187 187 188 188 Params: 189 189 container -- an Element containing the wanted element … … 198 198 else : 199 199 return Element("_empty") 200 200 201 201 def _getValue(self, container, tagname): 202 202 """ finds the first leaf element with given tagname contained in given element, 203 203 and returns its value. 204 204 205 205 Params: 206 206 container -- a non leaf Element containing the wanted leaf element … … 212 212 #given a leaf node, returns its value. 213 213 return utils.nodeValue(leafNode) 214 214 215 215 class RHEvaluationSetupDataModif( RHEvaluationBase ): 216 216 """called when you want to change general parameters of your evaluation.""" 217 217 218 218 def _process( self ): 219 219 return evaluations.WPConfModifEvaluationSetupDataModif( self, self._conf ).display() 220 220 221 221 class RHEvaluationSetupPerformDataModif( RHEvaluationBase ): 222 222 """performs changes to general parameters of the evaluation.""" … … 283 283 newSubmissionNotification.setCCList(newSubmissionNotifyCc) 284 284 evaluation.setNotification(Evaluation._NEW_SUBMISSION, newSubmissionNotification) 285 285 286 286 #redirecting... 287 287 self._redirect(urlHandlers.UHConfModifEvaluationSetup.getURL(self._conf)) … … 290 290 class RHEvaluationEdit(RHEvaluationBase): 291 291 """Edition of questions of an Evaluation.""" 292 292 293 293 def _process(self): 294 294 return evaluations.WPConfModifEvaluationEdit(self, self._conf).display() 295 295 296 296 class RHEvaluationEditPerformChanges( RHEvaluationBase ): 297 297 """performs changes for Evaluation questions.""" … … 308 308 questionValue = params.get("questionValue","").strip() 309 309 keyword = params.get("keyword","").strip() 310 310 311 311 ################### 312 312 #check consistency# … … 322 322 if choiceItem_1==choiceItem_2: 323 323 raise FormValuesError("Please enter different values for Choice Items.", "Evaluation") 324 324 325 325 ########## 326 326 #Add mode# … … 338 338 #set params for question 339 339 self._setQuestionParams(question, params) 340 340 341 341 ########### 342 342 #Edit mode# … … 359 359 if posChange>0: 360 360 self._evaluation.getQuestionAt(i).setPosition(posChange) 361 361 362 362 ############# 363 363 #Delete mode# … … 366 366 #DON'T USE params:newPos BUT params:questionPos which is edited question position!!! 367 367 self._evaluation.removeQuestion(int(params.get("questionPos",-1))) 368 368 369 369 #redirecting... 370 370 self._redirect(urlHandlers.UHConfModifEvaluationEdit.getURL(self._conf)) 371 371 372 372 def _setQuestionParams(self, question, params): 373 373 """ set the parameters for the given question with the dictionary (params). … … 412 412 question.insertChoiceItem(itemText, isSelected) 413 413 currentItemId += 1 414 414 415 415 416 416 class RHEvaluationPreview(RHEvaluationBase): 417 417 """Preview of an Evaluation.""" 418 418 419 419 def _process(self): 420 420 params = self.getRequestParams() … … 427 427 class RHEvaluationResults(RHEvaluationBase): 428 428 """Results of an Evaluation.""" 429 429 430 430 def _process(self): 431 431 return evaluations.WPConfModifEvaluationResults(self, self._conf).display() … … 434 434 class RHEvaluationResultsOptions(RHEvaluationBase): 435 435 """Do asked actions for the results.""" 436 436 437 437 def _process(self): 438 438 #################### … … 490 490 self._req.headers_out["Content-Disposition"] = 'inline; filename="%s"'%Evaluation._CSV_FILENAME 491 491 return excelFile 492 492 493 493 ######## 494 494 #remove# … … 505 505 #redirecting... 506 506 self._redirect(urlHandlers.UHConfModifEvaluationResults.getURL(self._conf)) 507 507 508 508 class RHEvaluationResultsSubmittersActions(RHEvaluationBase): 509 509 """Do asked actions for the submitters.""" 510 510 511 511 def _process(self): 512 512 #################### … … 518 518 select = params.has_key(Evaluation._SELECT_SUBMITTERS) 519 519 sessionVarName = "selectedSubmissions_%s_%s"%(self._conf.getId(), evaluation.getId()) 520 520 521 521 ######## 522 522 #remove# … … 533 533 for submission in removedSubmissions: 534 534 evaluation.removeSubmission(submission) 535 535 536 536 ########## 537 537 #selected# -
indico/MaKaC/webinterface/rh/registrantsDisplay.py
rbdd862 reefc00 27 27 28 28 class RHRegistrantsDisplayBase( conferenceDisplay.RHConferenceBaseDisplay): 29 29 30 30 def _checkProtection( self ): 31 31 conferenceDisplay.RHConferenceBaseDisplay._checkProtection(self) 32 if not self._conf. hasEnabledSection("regForm") or not displayMgr.ConfDisplayMgrRegistery().getDisplayMgr(self._conf).getMenu().getLinkByName("registrants").isEnabled():32 if not self._conf.getEvaluation().isVisible() or not self._conf.hasEnabledSection("regForm") or not displayMgr.ConfDisplayMgrRegistery().getDisplayMgr(self._conf).getMenu().getLinkByName("registrants").isEnabled(): 33 33 raise NoReportError("The registrants list page was disabled by the conference managers") 34 34 … … 44 44 else: 45 45 self._sessionFilterName="session" 46 47 filterUsed=params.has_key("OK") 46 47 filterUsed=params.has_key("OK") 48 48 filter = {} 49 49 50 50 sessform =regForm.getSessionsForm() 51 51 sesstypes = sessform.getSessionList() … … 61 61 sessionShowNoValue = params.has_key("sessionShowNoValue") 62 62 self._filterCrit.getField(self._sessionFilterName).setShowNoValue( sessionShowNoValue ) 63 63 64 64 # ---- SORTING ---- 65 65 self._sortingCrit = regFilters.SortingCriteria( [params.get( "sortBy", "Name" ).strip()] ) 66 66 self._order = params.get("order","down") 67 67 68 68 def _process( self ): 69 69 p = registrants.WPConfRegistrantsList( self, self._conf ) -
indico/MaKaC/webinterface/tpls/ConfModifMainData.tpl
r9033fd reefc00 38 38 <td colspan="3" class="horizontalLine"> </td> 39 39 </tr> 40 <tr>41 <td class="dataCaptionTD">42 <a name="sections"></a>43 <span class="dataCaptionFormat"> <%= _("Management features")%></span>44 <br>45 <br>46 <img src="<%=enablePic%>" alt="<%= _("Click to disable")%>"> <small> <%= _("Enabled feature")%></small>47 <br>48 <img src="<%=disablePic%>" alt="<%= _("Click to enable")%>"> <small> <%= _("Disabled feature")%></small>49 </td>50 <td bgcolor="white" width="100%%" class="blacktext" style="padding-left:20px">51 <table align="left">52 <%=sections%>53 </table>54 </td>55 </tr>56 <tr>57 <td colspan="3" class="horizontalLine"> </td>58 </tr>59 40 </table> 60 41
Note: See TracChangeset
for help on using the changeset viewer.
