Changeset 843480 in indico
- Timestamp:
- 07/28/11 11:30:26 (22 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
- Children:
- 4bf83c
- Parents:
- 39b7d0
- git-author:
- Alexis Castilla Hernandez <alexis.castilla.hernandez@…> (05/17/11 11:04:06)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (07/28/11 11:30:26)
- Files:
-
- 7 edited
-
bin/recovery/recovery.py (modified) (1 diff)
-
indico/MaKaC/review.py (modified) (4 diffs)
-
indico/MaKaC/webinterface/common/abstractNotificator.py (modified) (1 diff)
-
indico/MaKaC/webinterface/pages/abstractReviewing.py (modified) (2 diffs)
-
indico/MaKaC/webinterface/rh/abstractReviewing.py (modified) (4 diffs)
-
indico/MaKaC/webinterface/tpls/ConfModCFANotifTplEditData.tpl (modified) (2 diffs)
-
indico/MaKaC/webinterface/tpls/ConfModCFANotifTplNew.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bin/recovery/recovery.py
r9f7b3f6 r843480 1446 1446 ntpl.setFromAddr(nt.getFromAddr()) 1447 1447 ntpl.setCCAddrList(nt.getCCAddrList()) 1448 ntpl.setCAasCCAddr(nt.getCAasCCAddr()) 1448 1449 for a in nt.getToAddrList(): 1449 1450 add = TrashCanManager().getById(a._p_oid) -
indico/MaKaC/review.py
r39b7d0 r843480 1637 1637 return self._coAuthors 1638 1638 1639 def getCoAuthorEmailList(self): 1640 emailList = [] 1641 for coAuthor in self.getCoAuthorList(): 1642 emailList.append(coAuthor.getEmail()) 1643 return emailList 1644 1639 1645 def clearCoAuthors(self): 1640 1646 while len(self._coAuthors)>0: … … 3195 3201 self._tplBody="" 3196 3202 self._fromAddr = "" 3203 self._CAasCCAddr = False 3197 3204 self._ccAddrList=PersistentList() 3198 3205 self._toAddrs = PersistentList() … … 3208 3215 tpl.setTplBody(self.getTplBody()) 3209 3216 tpl.setFromAddr(self.getFromAddr()) 3217 tpl.setCAasCCAddr(self.getCAasCCAddr()) 3210 3218 3211 3219 for cc in self.getCCAddrList() : … … 3317 3325 self.addCCAddr(addr) 3318 3326 3327 def setCAasCCAddr(self, CAasCCAddr): 3328 self._CAasCCAddr = CAasCCAddr. 3329 3330 def getCAasCCAddr(self): 3331 try: 3332 if self._CAasCCAddr: 3333 pass 3334 except AttributeError: 3335 self._CAasCCAddr = False 3336 return self._CAasCCAddr 3337 3319 3338 def clearCCAddrList(self): 3320 3339 self._ccAddrList=PersistentList() -
indico/MaKaC/webinterface/common/abstractNotificator.py
r34d140 r843480 230 230 fa=tpl.getFromAddr() 231 231 cc=tpl.getCCAddrList() 232 # Add Co-authors addresses if needed 233 if tpl.getCAasCCAddr(): 234 ccList = cc + abstract.getCoAuthorEmailList() 235 else: 236 ccList = cc 237 232 238 tl = [] 233 239 for user in tpl.getToAddrs(abstract): 234 240 if not user.getEmail() in tl: 235 241 tl.append(user.getEmail()) 236 return Notification(subject=subj,body=b,fromAddr=fa,toList=tl,ccList=cc )242 return Notification(subject=subj,body=b,fromAddr=fa,toList=tl,ccList=ccList) 237 243 238 244 def notify(self,abstract,tpl): -
indico/MaKaC/webinterface/pages/abstractReviewing.py
r208058 r843480 235 235 vars["notifTpl"] = self._notifTpl 236 236 if not vars.has_key("ccList"): 237 vars["CCAddrs"] = quoteattr(str(",".join(self._notifTpl.getCCAddrList()))) 238 else: 239 vars["CCAddrs"] = quoteattr(str(",".join(vars["ccList"]))) 237 vars["CCAddrs"] = quoteattr(str(", ".join(self._notifTpl.getCCAddrList()))) 238 else: 239 vars["CCAddrs"] = quoteattr(str(", ".join(vars["ccList"]))) 240 vars["CAasCCAddr"] = self._notifTpl.getCAasCCAddr() 240 241 return vars 241 242 … … 492 493 vars["From"] = self._notifTpl.getFromAddr() 493 494 vars["toAddrs"] = self._getToAddrsHTML() 494 vars["CCAddrs"] = ", ".join(self._notifTpl.getCCAddrList()) 495 ccAddrs = ", ".join(self._notifTpl.getCCAddrList()) 496 if self._notifTpl.getCAasCCAddr(): 497 if ccAddrs == "": 498 ccAddrs = "Co-Authors" 499 else: 500 ccAddrs += ", Co-Authors" 501 vars["CCAddrs"] = ccAddrs 495 502 vars["subject"] = self._notifTpl.getTplSubjectShow(EmailNotificator.getVarList()) 496 503 vars["body"] = self._notifTpl.getTplBodyShow(EmailNotificator.getVarList()) -
indico/MaKaC/webinterface/rh/abstractReviewing.py
r208058 r843480 61 61 self._fromAddr = params.get("fromAddr","") 62 62 self._toList = self._normaliseListParam(params.get("toAddrs",[])) 63 self._ccList = params.get("CCAddrs","").split(",") 63 auxCCList = params.get("CCAddrs","") 64 # replace to have only one separator 65 auxCCList = auxCCList.replace(" ", ",").replace(";", ",").split(",") 66 # clean the list in order to avoid empty emails, for instance, comma at the end 67 cleanList = [] 68 for email in auxCCList: 69 if email != "": 70 cleanList.append(email) 71 self._ccList = cleanList 72 self._CAasCCAddr = params.has_key("CAasCCAddr") 64 73 self._cancel = params.get("cancel", None) 65 74 self._save = params.get("save", None) … … 99 108 tpl.setFromAddr(self._fromAddr) 100 109 tpl.setCCAddrList(self._ccList) 110 tpl.setCAasCCAddr(self._CAasCCAddr) 111 101 112 for toAddr in self._toList: 102 113 toAddrWrapper = NotifTplToAddrsFactory.getToAddrById(toAddr) … … 186 197 self._fromAddr=params.get("fromAddr","") 187 198 self._toList=self._normaliseListParam(params.get("toAddrs",[])) 188 self._ccList=params.get("CCAddrs","").split(",") 199 auxCCList = params.get("CCAddrs","") 200 # replace to have only one separator 201 auxCCList = auxCCList.replace(" ", ",").replace(";", ",").split(",") 202 # clean the list in order to avoid empty emails, for instance, comma at the end 203 cleanList = [] 204 for email in auxCCList: 205 if email != "": 206 cleanList.append(email) 207 self._ccList = cleanList 208 self._CAasCCAddr = params.get("CAasCCAddr","") 189 209 190 210 def _process(self): … … 211 231 self._notifTpl.setFromAddr(self._fromAddr) 212 232 self._notifTpl.setCCAddrList(self._ccList) 233 self._notifTpl.setCAasCCAddr(self._CAasCCAddr) 213 234 self._notifTpl.clearToAddrs() 214 235 for toAddr in self._toList: -
indico/MaKaC/webinterface/tpls/ConfModCFANotifTplEditData.tpl
r39b7d0 r843480 66 66 <td nowrap class="titleCellTD"><span class="titleCellFormat"> ${ _("CC addresses")}</span></td> 67 67 <td colspan="2" bgcolor="white" width="100%"> 68 <input id="notificationTplCCAddress" type="text" name="CCAddrs" style="width: 61%;" value=${ CCAddrs } onfocus="selected('notificationTplCCAddress')"> 68 <input id="notificationTplCCAddress" type="text" name="CCAddrs" style="width: 61%;" value=${ CCAddrs } onfocus="selected('notificationTplCCAddress')"><br> 69 <% checked = "" %> 70 % if CAasCCAddr: 71 <% checked = "checked" %> 72 % endif 73 <input name="CAasCCAddr" type="checkbox" ${ checked } id="CAasCCAddr" value="coAuthors"><span>${ _("Co-Authors") }</span> 69 74 </td> 70 75 </tr> … … 119 124 notifTplManager.addToPM($E('notificationTplBody')); 120 125 121 //Check when the page is loaded122 notifTplManager.checkSelectCondition($E('condTypeSelect'), $E('contribTypeSelect'), $E('trackSelect'));123 124 126 </script> -
indico/MaKaC/webinterface/tpls/ConfModCFANotifTplNew.tpl
r39b7d0 r843480 56 56 <td nowrap class="titleCellTD"><span class="titleCellFormat"> ${ _("CC addresses")}</span></td> 57 57 <td colspan="2" bgcolor="white" width="100%"> 58 <input id="notificationTplCCAddress" type="text" name="CCAddrs" style="width: 61%;" value=${ CCAddrs } onfocus="selected('notificationTplCCAddress')"> 58 <input id="notificationTplCCAddress" type="text" name="CCAddrs" style="width: 61%;" value=${ CCAddrs } onfocus="selected('notificationTplCCAddress')"><br> 59 <input name="CAasCCAddr" type="checkbox" id="CAasCCAddr" value="coAuthors"><span>${ _("Co-Authors") }</span> 59 60 </td> 60 61 </tr>
Note: See TracChangeset
for help on using the changeset viewer.
