Changeset f7c613 in indico
- Timestamp:
- 02/14/11 16:42:05 (2 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
- Children:
- 38b4e2
- Parents:
- 9576e61
- git-author:
- Leszek Syroka <leszek.marek.syroka@…> (08/10/10 11:41:22)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (02/14/11 16:42:05)
- Location:
- indico/MaKaC/webinterface
- Files:
-
- 3 edited
-
common/abstractFilters.py (modified) (4 diffs)
-
pages/conferences.py (modified) (2 diffs)
-
rh/conferenceModif.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/webinterface/common/abstractFilters.py
r8b64ae rf7c613 86 86 if self.onlyMultiple() and len(abstract.getTrackList())<2: 87 87 return False 88 #ToDo: to be optimised by using OOSet intersections or indexes 89 hasTracks = False 90 for track in abstract.getTrackList(): 91 hasTracks = True 92 if track.getId() in self._values: 93 return True 94 if not hasTracks: 95 return self._showNoValue 96 return False 88 if len(self._conf.getTrackList()) == len(self._values): 89 return True 90 else: 91 #ToDo: to be optimised by using OOSet intersections or indexes 92 hasTracks = False 93 for track in abstract.getTrackList(): 94 hasTracks = True 95 if track.getId() in self._values: 96 return True 97 if not hasTracks: 98 return self._showNoValue 99 return False 97 100 98 101 def needsToBeApplied(self): … … 123 126 124 127 def satisfies( self, abstract ): 125 if not abstract.getContribType(): 128 if len(self._conf.getContribTypeList()) == len(self._values): 129 return True 130 elif not abstract.getContribType(): 126 131 return self._showNoValue 127 return abstract.getContribType() in self._values 132 else: 133 return abstract.getContribType() in self._values 128 134 129 135 def needsToBeApplied(self): … … 140 146 141 147 def satisfies(self,abstract): 142 s=abstract.getCurrentStatus() 143 if s.__class__ in [review.AbstractStatusAccepted,\ 144 review.AbstractStatusProposedToAccept]: 145 if s.getType() is None or s.getType()=="": 148 if len(self._conf.getContribTypeList()) == len(self._values): 149 return True 150 else: 151 s=abstract.getCurrentStatus() 152 if s.__class__ in [review.AbstractStatusAccepted,\ 153 review.AbstractStatusProposedToAccept]: 154 if s.getType() is None or s.getType()=="": 155 return self._showNoValue 156 return s.getType() in self._values 157 else: 146 158 return self._showNoValue 147 return s.getType() in self._values148 else:149 return self._showNoValue150 159 151 160 def needsToBeApplied(self): … … 169 178 if s.getTrack() is None: 170 179 return self._showNoValue 171 return s.getTrack().getId() in self._values 180 elif len(self._conf.getTrackList()) == len(self._values): 181 return True 182 else: 183 return s.getTrack().getId() in self._values 172 184 else: 173 185 return self._showNoValue -
indico/MaKaC/webinterface/pages/conferences.py
rf9e2b0 rf7c613 5981 5981 url.addParam("order","down") 5982 5982 vars["dateSortingURL"] = quoteattr( str( url ) ) 5983 5984 5985 5986 5987 5983 l = [] 5988 5984 f = filters.SimpleFilter( self._filterCrit, self._sortingCrit ) 5989 5985 abstractList=f.apply(self._conf.getAbstractMgr().getAbstractsMatchingAuth(self._authSearch)) 5990 5986 for abstract in abstractList: 5991 tracks = []5992 for track in abstract.getTrackListSorted():5993 tracks.append("%s"%self.htmlText(track.getCode() or track.getId()))5994 5995 5987 s=abstract.getCurrentStatus() 5996 status=AbstractStatusList.getInstance().getCode(s.__class__ )5997 statusIconURL=AbstractStatusList.getInstance().getIconURL(s.__class__)5998 statusIconHTML = """<img src=%s border="0" alt="">"""%quoteattr(str(statusIconURL))5999 contribType = abstract.getContribType()6000 contribTypeName = _("None")6001 if contribType:6002 contribTypeName = contribType.getName()6003 subDate = abstract.getSubmissionDate().strftime("%d %B %Y")6004 5988 comments = "" 6005 5989 if abstract.getComments(): 6006 5990 comments = _(""" <img src=%s alt="_("The submitter filled some comments")">""")%(quoteattr(Config.getInstance().getSystemIconURL("comments"))) 6007 5991 accTrack,accType=" "," " 6008 if isinstance(s,review.AbstractStatusAccepted):6009 if s.getTrack() is not None:6010 accTrack=self.htmlText(s.getTrack().getCode())6011 if s.getType() is not None:6012 accType=self.htmlText(s.getType().getName())6013 elif isinstance(s,review.AbstractStatusProposedToAccept):6014 if s.getTrack() is not None:6015 accTrack=self.htmlText(s.getTrack().getCode())6016 if s.getType() is not None:6017 accType=self.htmlText(s.getType().getName())6018 5992 urlGen=urlHandlers.UHCFAAbstractManagment.getURL 6019 authList = []6020 for auth in abstract.getPrimaryAuthorList():6021 if auth.getFullName():6022 authList.append(auth.getFullName())6023 PAuthors = "<br>".join(authList)6024 6025 5993 m = ["""<td valign="top" align="right" width="3%%"><input onchange="javascript:isSelected('abstracts%s')" type="checkbox" name="abstracts" value="%s"></td>"""%(abstract.getId(), abstract.getId())] 6026 5994 if self._fields["ID"][1] == "checked": … … 6030 5998 <a href=%s>%s</a></td>"""%(quoteattr(str(urlGen(abstract))), self.htmlText(abstract.getTitle()))) 6031 5999 if self._fields["PrimaryAuthor"][1] == "checked": 6000 authList = [ auth.getFullName() for auth in abstract.getPrimaryAuthorList() if auth.getFullName()] 6001 PAuthors = "<br>".join(authList) 6032 6002 m.append("""<td class="CRLabstractDataCell">%s</td>"""%PAuthors) 6033 6003 if self._fields["Tracks"][1] == "checked": 6004 tracks = [ self.htmlText(track.getCode() or track.getId()) for track in abstract.getTrackListSorted()] 6034 6005 m.append("""<td class="CRLabstractDataCell">%s</td>"""%("<br>".join(tracks) or " ")) 6035 6006 if self._fields["Type"][1] == "checked": 6007 contribType = abstract.getContribType() 6008 contribTypeName = _("None") 6009 if contribType: 6010 contribTypeName = contribType.getName() 6036 6011 m.append("""<td class="CRLabstractDataCell">%s</td>"""%self.htmlText(contribTypeName)) 6037 6012 if self._fields["Status"][1] == "checked": 6013 status=AbstractStatusList.getInstance().getCode(s.__class__ ) 6014 statusIconURL=AbstractStatusList.getInstance().getIconURL(s.__class__) 6015 statusIconHTML = """<img src=%s border="0" alt="">"""%quoteattr(str(statusIconURL)) 6038 6016 m.append("""<td class="CRLabstractDataCell" nowrap>%s %s</td>"""%(statusIconHTML,status)) 6039 6017 if self._fields["AccTrack"][1] == "checked": 6018 if isinstance(s,review.AbstractStatusAccepted): 6019 if s.getTrack() is not None: 6020 accTrack=self.htmlText(s.getTrack().getCode()) 6021 elif isinstance(s,review.AbstractStatusProposedToAccept): 6022 if s.getTrack() is not None: 6023 accTrack=self.htmlText(s.getTrack().getCode()) 6040 6024 m.append("""<td class="CRLabstractDataCell">%s</td>"""%accTrack) 6041 6025 if self._fields["AccType"][1] == "checked": 6026 if isinstance(s,review.AbstractStatusAccepted): 6027 if s.getType() is not None: 6028 accType=self.htmlText(s.getType().getName()) 6029 elif isinstance(s,review.AbstractStatusProposedToAccept): 6030 if s.getType() is not None: 6031 accType=self.htmlText(s.getType().getName()) 6042 6032 m.append("""<td class="CRLabstractDataCell">%s</td>"""%accType) 6043 6033 if self._fields["SubmissionDate"][1] == "checked": 6044 m.append("""<td class="CRLabstractDataCell" nowrap>%s</td>"""% subDate)6034 m.append("""<td class="CRLabstractDataCell" nowrap>%s</td>"""%abstract.getSubmissionDate().strftime("%d %B %Y")) 6045 6035 if len(m) == 1: 6046 6036 m = ["<td></td>"] -
indico/MaKaC/webinterface/rh/conferenceModif.py
r64b616 rf7c613 3949 3949 3950 3950 def satisfies( self, abstract ): 3951 status = AbstractStatusList.getInstance().getId( abstract.getCurrentStatus().__class__ ) 3952 return status in self._values 3951 if len(AbstractStatusList.getInstance().getStatusList()) == len(self._values): 3952 return True 3953 else: 3954 status = AbstractStatusList.getInstance().getId( abstract.getCurrentStatus().__class__ ) 3955 return status in self._values 3953 3956 3954 3957 def needsToBeApplied(self): … … 4111 4114 del sessionData['comment'] 4112 4115 4113 4114 4116 # TODO: improve this part and do it as with the registrants 4115 se lf._fields["ID"] = [ _("ID"), sessionData.get("showID", "")]4116 self._fields["PrimaryAuthor"] = [ _("Primary Author"), sessionData.get("showPrimaryAuthor", "")]4117 self._fields["Tracks"] = [ _("Tracks"), sessionData.get("showTracks", "")]4118 self._fields["Type"] = [ _("Type"), sessionData.get("showType", "")]4119 self._fields["Status"] = [ _("Status"), sessionData.get("showStatus", "")]4120 self._fields["AccTrack"] = [ _("showAcc. Track"), sessionData.get("showAccTrack", "")]4121 self._fields["AccType"] = [ _("showAcc. Type"), sessionData.get("showAccType", "")]4122 self._fields["SubmissionDate"] = [ _("Submission Date"), sessionData.get("showSubmissionDate", "")]4117 sessionData["fields"] = {"ID": [ _("ID"), params.get("showID","")], 4118 "PrimaryAuthor": [ _("Primary Author"), params.get("showPrimaryAuthor","")], 4119 "Tracks": [ _("Tracks"), params.get("showTracks","")], 4120 "Type": [ _("Type"), params.get("showType","")], 4121 "Status": [ _("Status"), params.get("showStatus","")], 4122 "AccTrack": [ _("Acc. Track"), params.get("showAccTrack","")], 4123 "AccType": [ _("Acc. Type"), params.get("showAccType","")], 4124 "SubmissionDate": [ _("Submission Date"), params.get("showSubmissionDate","")]} 4123 4125 4124 4126 return sessionData … … 4174 4176 RHConfModifCFABase._checkParams( self, params ) 4175 4177 4176 self._fields = {}4177 4178 4178 operationType = params.get('operationType') 4179 4179 … … 4216 4216 self._msg = sessionData.get("directAbstractMsg","") 4217 4217 self._authSearch = sessionData.get("authSearch", "") 4218 self._fields = sessionData.get("fields",{}) 4218 4219 4219 4220 def _process( self ):
Note: See TracChangeset
for help on using the changeset viewer.
