Changeset 94fff24f37b433dbb078153fdcfba0d9eb58898d in indico
- Timestamp:
- 02/02/12 11:53:11 (4 months ago)
- Children:
- 3a3b0559117b8fa0bd787c535d5cf4c1675f32e1
- Parents:
- 9fe579e305fa5c222040f95e217f038c13fc87db
- git-author:
- Pedro Ferreira <jose.pedro.ferreira@…> (02/02/12 11:53:11)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (02/15/12 17:19:47)
- Files:
-
- 8 edited
-
bin/utils/proposeAbstractsToAccept.py (modified) (2 diffs)
-
indico/MaKaC/services/implementation/category.py (modified) (1 diff)
-
indico/MaKaC/services/implementation/user.py (modified) (2 diffs)
-
indico/MaKaC/webinterface/tpls/ICalExportCommon.tpl (modified) (2 diffs)
-
indico/web/http_api/api.py (modified) (2 diffs)
-
indico/web/http_api/fossils.py (modified) (1 diff)
-
indico/web/http_api/handlers.py (modified) (1 diff)
-
indico/web/http_api/ical.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bin/utils/proposeAbstractsToAccept.py
r97a9da r94fff2 26 26 27 27 """ 28 Propose to be accepted the abstracts with status submitted of a track 28 Change all submitted abstracts to "propose to be accepted" status 29 29 """ 30 30 31 31 DBMgr.getInstance().startRequest() 32 error = False33 32 34 33 confId = '149557' … … 46 45 abstract.proposeToAccept(user, track, contribType) 47 46 48 if not error: 49 DBMgr.getInstance().endRequest() 50 print "No error. The change are saved" 51 else: 52 print "There were errors. The changes was not saved" 47 DBMgr.getInstance().endRequest() -
indico/MaKaC/services/implementation/category.py
r97a9da r94fff2 336 336 "protection.removeManager": CategoryRemoveControlUser, 337 337 "protection.addExistingConfCreator": CategoryAddExistingControlUser, 338 "protection.removeConfCreator": CategoryRemoveControlUser 338 "protection.removeConfCreator": CategoryRemoveControlUser, 339 339 "api.getExportURLs": CategoryExportURLs 340 340 } -
indico/MaKaC/services/implementation/user.py
r97a9da r94fff2 466 466 if ak and ak.isBlocked(): 467 467 raise ServiceAccessError((_("The API Key is blocked"))) 468 def _getAnswer( self): 468 469 def _getAnswer(self): 469 470 ak = self._avatar.getAPIKey() 470 471 ak.setPersistentAllowed(not ak.isPersistentAllowed()) 471 472 return ak.isPersistentAllowed() 472 473 473 class UserCreateKey AndEnablePersistentSignatures(LoggedOnlyService):474 class UserCreateKeyEnablePersistent(LoggedOnlyService): 474 475 475 476 def _checkParams(self): … … 508 509 "syncPersonalData": UserSyncPersonalData, 509 510 "togglePersistentSignatures": UserSetPersistentSignatures, 510 "createKeyAndEnablePersistent": UserCreateKey AndEnablePersistentSignatures511 "createKeyAndEnablePersistent": UserCreateKeyEnablePersistent 511 512 } -
indico/MaKaC/webinterface/tpls/ICalExportCommon.tpl
r97a9da r94fff2 3 3 <div id="agreementApiKey"> 4 4 <div id="agreementApiKeyText" class="agreement"> 5 ${_("""You need to create an HTTP API key in order to retrieve the information from the HTTP API. You can clicking in the button below or in <a href="%s" target="_blank">My Profile</a> where you can also manage it.""")%(urlHandlers.UHUserAPI.getURL(self_._aw.getUser()))}5 ${_("""You need to create an HTTP API key in order to retrieve the information from the HTTP API. You can do so by accepting the agreement below or from <a href="%s" target="_blank">My Profile</a>, where you can also manage it.""") % (urlHandlers.UHUserAPI.getURL(self_._aw.getUser()))} 6 6 </div> 7 <input type="checkbox" id="agreeCheckBoxKey"> ${("I re d the agreement.")}7 <input type="checkbox" id="agreeCheckBoxKey"> ${("I read the agreement.")} 8 8 <input id="agreementButtonKey" type="submit" value="Agree" disabled="disabled"/> 9 9 <div style="display:inline;" id="progressPersistentKey"></div> … … 13 13 <div>${apiPersistentEnableAgreement}</div> 14 14 </div> 15 <input type="checkbox" id="agreeCheckBoxPersistent"> ${("I re d the agreement.")}15 <input type="checkbox" id="agreeCheckBoxPersistent"> ${("I read the agreement.")} 16 16 <input id="agreementButtonPersistent" type="submit" value="Agree" disabled="disabled"/> 17 17 <div style="display:inline;" id="progressPersistentSignatures"></div> -
indico/web/http_api/api.py
r4fd80c r94fff2 380 380 381 381 def _process(self, iterator, filter=None, iface=None): 382 print 'process' 382 383 if iface is None: 383 384 iface = self.DETAIL_INTERFACES.get(self._detail) … … 511 512 512 513 def event(self, idlist): 514 print 'event' 513 515 ch = ConferenceHolder() 514 516 -
indico/web/http_api/fossils.py
r5d1bf6 r94fff2 259 259 getType.convert = lambda t: t and t.getName() 260 260 261 def getLocator(self): 262 pass 263 getLocator.convert = Conversion.url(urlHandlers.UHContributionDisplay) 264 getLocator.name = 'url' 265 261 266 262 267 class ISubContributionMetadataFossil(IFossil): -
indico/web/http_api/handlers.py
rc92eab r94fff2 246 246 else: 247 247 req.headers_out['Content-Type'] = serializer.getMIMEType() 248 248 print resultFossil 249 249 return serializer(resultFossil) 250 250 except: -
indico/web/http_api/ical.py
r9fe579 r94fff2 52 52 53 53 54 @staticmethod 55 def serialize_conference(fossil, now): 54 def serialize_event(self, fossil, now, id_prefix="indico-event"): 56 55 event = ical.Event() 57 event.set('uid', ' indico-event-%s@cern.ch' % fossil['id'])56 event.set('uid', '%s-%s@cern.ch' % (id_prefix, fossil['id'])) 58 57 event.set('dtstamp', now) 59 58 event.set('dtstart', fossil['startDate']) 60 59 event.set('dtend', fossil['endDate']) 61 60 event.set('url', fossil['url']) 62 event ['summary'] = fossil['title']63 loc = fossil['location'] or ''61 event.set('summary', fossil['title'].decode('utf-8')) 62 loc = fossil['location'].decode('utf-8') or '' 64 63 if fossil['room']: 65 loc += ' ' + fossil['room'] 66 event ['location'] = loc64 loc += ' ' + fossil['room'].decode('utf-8') 65 event.set('location', loc) 67 66 if fossil['description']: 68 event ['description'] = fossil['description'] + '\n' + fossil['url']67 event.set('description', fossil['description'].decode('utf-8') + '\n' + fossil['url']) 69 68 else: 70 event ['description'] = fossil['url']69 event.set('description', fossil['url']) 71 70 return event 72 71 73 72 74 @staticmethod75 73 def serialize_repeatability(startDT, endDT, repType): 76 74 intervals = { RepeatabilityEnum.onceAWeek: 1, RepeatabilityEnum.onceEvery2Weeks: 2, RepeatabilityEnum.onceEvery3Weeks: 3 } … … 96 94 event.set('url', fossil['bookingUrl']) 97 95 event.set('summary', fossil['reason']) 98 event ['location'] = fossil['location'] + ': ' + fossil['room']['fullName']99 event ['description'] = fossil['reason'] + '\n' + fossil['bookingUrl']96 event.set('location', fossil['location'].decode('utf-8') + ': ' + fossil['room']['fullName'].decode('utf-8')) 97 event.set('description', fossil['reason'].decode('utf-8') + '\n' + fossil['bookingUrl']) 100 98 rrule = None 101 99 if fossil['repeatability'] is not None: … … 106 104 107 105 106 def serialize_contribs(fossil, now): 107 for sfossil in fossil['contributions']: 108 if sfossil['startDate']: 109 sfossil['id'] = "%s-%s" % (fossil['id'], sfossil['id']) 110 cal.add_component(serialize_event(sfossil, now, id_prefix="indico-contribution")) 111 112 108 113 class ICalSerializer(Serializer): 109 114 … … 112 117 113 118 _mappers = { 114 'conferenceMetadata': serialize_conference, 115 'reservationMetadata': serialize_reservation 119 'conferenceMetadata': serialize_event, 120 'reservationMetadata': serialize_reservation, 121 'conferenceMetadataWithContribs': serialize_contribs 116 122 } 117 123
Note: See TracChangeset
for help on using the changeset viewer.
