Changeset 94fff24f37b433dbb078153fdcfba0d9eb58898d in indico


Ignore:
Timestamp:
02/02/12 11:53:11 (4 months ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
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)
Message:

[FIX] Contribution export not working

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • bin/utils/proposeAbstractsToAccept.py

    r97a9da r94fff2  
    2626 
    2727""" 
    28 Propose  to be accepted the abstracts with status submitted of a track 
     28Change all submitted abstracts to "propose to be accepted" status 
    2929""" 
    3030 
    3131DBMgr.getInstance().startRequest() 
    32 error = False 
    3332 
    3433confId = '149557' 
     
    4645        abstract.proposeToAccept(user, track, contribType) 
    4746 
    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" 
     47DBMgr.getInstance().endRequest() 
  • indico/MaKaC/services/implementation/category.py

    r97a9da r94fff2  
    336336    "protection.removeManager": CategoryRemoveControlUser, 
    337337    "protection.addExistingConfCreator": CategoryAddExistingControlUser, 
    338     "protection.removeConfCreator": CategoryRemoveControlUser 
     338    "protection.removeConfCreator": CategoryRemoveControlUser, 
    339339    "api.getExportURLs": CategoryExportURLs 
    340340    } 
  • indico/MaKaC/services/implementation/user.py

    r97a9da r94fff2  
    466466        if ak and ak.isBlocked(): 
    467467            raise ServiceAccessError((_("The API Key is blocked"))) 
    468     def _getAnswer( self): 
     468 
     469    def _getAnswer(self): 
    469470        ak = self._avatar.getAPIKey() 
    470471        ak.setPersistentAllowed(not ak.isPersistentAllowed()) 
    471472        return ak.isPersistentAllowed() 
    472473 
    473 class UserCreateKeyAndEnablePersistentSignatures(LoggedOnlyService): 
     474class UserCreateKeyEnablePersistent(LoggedOnlyService): 
    474475 
    475476    def _checkParams(self): 
     
    508509    "syncPersonalData": UserSyncPersonalData, 
    509510    "togglePersistentSignatures": UserSetPersistentSignatures, 
    510     "createKeyAndEnablePersistent": UserCreateKeyAndEnablePersistentSignatures 
     511    "createKeyAndEnablePersistent": UserCreateKeyEnablePersistent 
    511512} 
  • indico/MaKaC/webinterface/tpls/ICalExportCommon.tpl

    r97a9da r94fff2  
    33    <div id="agreementApiKey"> 
    44        <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()))} 
    66        </div> 
    7         <input type="checkbox" id="agreeCheckBoxKey"> ${("I red the agreement.")} 
     7        <input type="checkbox" id="agreeCheckBoxKey"> ${("I read the agreement.")} 
    88        <input id="agreementButtonKey" type="submit" value="Agree" disabled="disabled"/> 
    99        <div style="display:inline;" id="progressPersistentKey"></div> 
     
    1313            <div>${apiPersistentEnableAgreement}</div> 
    1414        </div> 
    15         <input type="checkbox" id="agreeCheckBoxPersistent"> ${("I red the agreement.")} 
     15        <input type="checkbox" id="agreeCheckBoxPersistent"> ${("I read the agreement.")} 
    1616        <input id="agreementButtonPersistent" type="submit" value="Agree" disabled="disabled"/> 
    1717        <div style="display:inline;" id="progressPersistentSignatures"></div> 
  • indico/web/http_api/api.py

    r4fd80c r94fff2  
    380380 
    381381    def _process(self, iterator, filter=None, iface=None): 
     382        print 'process' 
    382383        if iface is None: 
    383384            iface = self.DETAIL_INTERFACES.get(self._detail) 
     
    511512 
    512513    def event(self, idlist): 
     514        print 'event' 
    513515        ch = ConferenceHolder() 
    514516 
  • indico/web/http_api/fossils.py

    r5d1bf6 r94fff2  
    259259    getType.convert = lambda t: t and t.getName() 
    260260 
     261    def getLocator(self): 
     262        pass 
     263    getLocator.convert = Conversion.url(urlHandlers.UHContributionDisplay) 
     264    getLocator.name = 'url' 
     265 
    261266 
    262267class ISubContributionMetadataFossil(IFossil): 
  • indico/web/http_api/handlers.py

    rc92eab r94fff2  
    246246            else: 
    247247                req.headers_out['Content-Type'] = serializer.getMIMEType() 
    248  
     248            print resultFossil 
    249249            return serializer(resultFossil) 
    250250        except: 
  • indico/web/http_api/ical.py

    r9fe579 r94fff2  
    5252 
    5353 
    54 @staticmethod 
    55 def serialize_conference(fossil, now): 
     54def serialize_event(self, fossil, now, id_prefix="indico-event"): 
    5655    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'])) 
    5857    event.set('dtstamp', now) 
    5958    event.set('dtstart', fossil['startDate']) 
    6059    event.set('dtend', fossil['endDate']) 
    6160    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 '' 
    6463    if fossil['room']: 
    65         loc += ' ' + fossil['room'] 
    66     event['location'] = loc 
     64        loc += ' ' + fossil['room'].decode('utf-8') 
     65    event.set('location', loc) 
    6766    if fossil['description']: 
    68         event['description'] = fossil['description'] + '\n' + fossil['url'] 
     67        event.set('description', fossil['description'].decode('utf-8') + '\n' + fossil['url']) 
    6968    else: 
    70         event['description'] = fossil['url'] 
     69        event.set('description', fossil['url']) 
    7170    return event 
    7271 
    7372 
    74 @staticmethod 
    7573def serialize_repeatability(startDT, endDT, repType): 
    7674    intervals = { RepeatabilityEnum.onceAWeek: 1, RepeatabilityEnum.onceEvery2Weeks: 2, RepeatabilityEnum.onceEvery3Weeks: 3 } 
     
    9694    event.set('url', fossil['bookingUrl']) 
    9795    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']) 
    10098    rrule = None 
    10199    if fossil['repeatability'] is not None: 
     
    106104 
    107105 
     106def 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 
    108113class ICalSerializer(Serializer): 
    109114 
     
    112117 
    113118    _mappers = { 
    114         'conferenceMetadata': serialize_conference, 
    115         'reservationMetadata': serialize_reservation 
     119        'conferenceMetadata': serialize_event, 
     120        'reservationMetadata': serialize_reservation, 
     121        'conferenceMetadataWithContribs': serialize_contribs 
    116122    } 
    117123 
Note: See TracChangeset for help on using the changeset viewer.