Пример #1
0
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 3 of the
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import evaluationDisplay
from indico.web.flask.blueprints.event.display import event


# Evaluation
event.add_url_rule('/evaluation/', 'confDisplayEvaluation', evaluationDisplay.RHEvaluationMainInformation)
event.add_url_rule('/evaluation/evaluate', 'confDisplayEvaluation-display', evaluationDisplay.RHEvaluationDisplay)
event.add_url_rule('/evaluation/evaluate', 'confDisplayEvaluation-modif', evaluationDisplay.RHEvaluationDisplay)
event.add_url_rule('/evaluation/signin', 'confDisplayEvaluation-signIn', evaluationDisplay.RHEvaluationSignIn)
event.add_url_rule('/evaluation/evaluate', 'confDisplayEvaluation-submit', evaluationDisplay.RHEvaluationSubmit,
                   methods=('POST',))
event.add_url_rule('/evaluation/evaluate/success', 'confDisplayEvaluation-submitted',
                   evaluationDisplay.RHEvaluationSubmitted)
Пример #2
0
                func = lambda: redirect(url)
            else:
                # Old event namespace => 301-redirect to the new shorturl first to get Google etc. to update it
                url = url_for('.shorturl', confId=confId)
                func = lambda: redirect(url, 301)
        else:
            raise NotFound(
                _('The specified event with id or tag "%s" does not exist or has been deleted') % confId)

    return func()


# Routes supporting shorturls
# /e/ accepts slashes, /event/ doesn't - this is intended. We do not want to support slashes in the old namespace
# since it's a major pain in the ass to do so (and its route would eat anything that's usually a 404)
event.add_url_rule('!/e/<path:confId>', 'shorturl', _event_or_shorturl, strict_slashes=False,
                   defaults={'shorturl_namespace': True})
event.add_url_rule('!/event/<confId>/', 'conferenceDisplay', _event_or_shorturl)

# Event overview and navigation
event.add_url_rule('/overview', 'conferenceDisplay-overview', _event_or_shorturl, defaults={'ovw': True})
event.add_url_rule('/next', 'conferenceDisplay-next', conferenceDisplay.RHRelativeEvent, defaults={'which': 'next'})
event.add_url_rule('/prev', 'conferenceDisplay-prev', conferenceDisplay.RHRelativeEvent, defaults={'which': 'prev'})

# Event access
event.add_url_rule('/accesskey', 'conferenceDisplay-accessKey', conferenceDisplay.RHConferenceAccessKey,
                   methods=('GET', 'POST'))

# Event layout
event.add_url_rule('/style.css', 'conferenceDisplay-getCSS', conferenceDisplay.RHConferenceGetCSS)
event.add_url_rule('/logo', 'conferenceDisplay-getLogo', conferenceDisplay.RHConferenceGetLogo, methods=('GET', 'POST'))
event.add_url_rule('/picture/<picId>.<picExt>', 'conferenceDisplay-getPic', conferenceDisplay.RHConferenceGetPic)
Пример #3
0
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# Login
event.add_url_rule('/user/login', 'confLogin', conferenceDisplay.RHConfSignIn, methods=('GET', 'POST'))
event.add_url_rule('/user/login/disabled', 'confLogin-disabledAccount', conferenceDisplay.RHConfDisabledAccount,
                   methods=('GET', 'POST'))
event.add_url_rule('/user/login/not-activated', 'confLogin-unactivatedAccount',
                   conferenceDisplay.RHConfUnactivatedAccount)
event.add_url_rule('/user/reset-password', 'confLogin-sendLogin', conferenceDisplay.RHConfSendLogin, methods=('POST',))
event.add_url_rule('/user/reset-password/<token>', 'confLogin-resetPassword', conferenceDisplay.RHConfResetPassword,
                   methods=('GET', 'POST',))

# Registration
event.add_url_rule('/user/register', 'confUser', conferenceDisplay.RHConfUserCreation, methods=('GET', 'POST'))
event.add_url_rule('/user/register/success', 'confUser-created', conferenceDisplay.RHConfUserCreated)
event.add_url_rule('/user/register/exists', 'confUser-userExists', conferenceDisplay.RHConfUserExistWithIdentity,
                   methods=('GET', 'POST'))
event.add_url_rule('/user/register/activate', 'confLogin-active', conferenceDisplay.RHConfActivate)
event.add_url_rule('/user/register/send-activation', 'confLogin-sendActivation', conferenceDisplay.RHConfSendActivation,
Пример #4
0
                url = url_for('.shorturl', confId=confId)
                func = lambda: redirect(url, 301)
        elif is_legacy_id(confId):
            mapping = LegacyEventMapping.find_first(legacy_event_id=confId)
            if mapping is not None:
                url = url_for('event.conferenceDisplay', confId=mapping.event_id)
                func = lambda: redirect(url, 301)

    if func is None:
        raise NotFound(_('The specified event with id or tag "{}" does not exist or has been deleted').format(confId))
    return func()


# Routes supporting shorturls
# /e/ accepts slashes, /event/ doesn't - this is intended. We do not want to support slashes in the old namespace
# since it's a major pain in the ass to do so (and its route would eat anything that's usually a 404)
event.add_url_rule('!/e/<path:confId>', 'shorturl', _event_or_shorturl, strict_slashes=False,
                   defaults={'shorturl_namespace': True})
event.add_url_rule('!/event/<confId>/', 'conferenceDisplay', _event_or_shorturl)

# Event overview
event.add_url_rule('/overview', 'conferenceDisplay-overview', _event_or_shorturl, defaults={'ovw': True})

# Event access
event.add_url_rule('/accesskey', 'conferenceDisplay-accessKey', conferenceDisplay.RHConferenceAccessKey,
                   methods=('GET', 'POST'))

# Machine-readable formats
event.add_url_rule('/event.marc.xml', 'conferenceDisplay-marcxml', conferenceDisplay.RHConferenceToMarcXML)
event.add_url_rule('/event.xml', 'conferenceDisplay-xml', conferenceDisplay.RHConferenceToXML)
Пример #5
0
# This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# My conference
event.add_url_rule('/my-conference/', 'myconference', conferenceDisplay.RHMyStuff)

# Other views
event.add_url_rule('/other-view', 'conferenceOtherViews', conferenceDisplay.RHConferenceOtherViews)
Пример #6
0
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import paperReviewingDisplay
from indico.web.flask.blueprints.event.display import event


# paperReviewingDisplay.py
event.add_url_rule("/paper-reviewing/", "paperReviewingDisplay", paperReviewingDisplay.RHPaperReviewingDisplay)
event.add_url_rule(
    "/paper-reviewing/templates/", "paperReviewingDisplay-downloadTemplate", paperReviewingDisplay.RHDownloadPRTemplate
)
event.add_url_rule(
    "/paper-reviewing/templates/<reviewingTemplateId>",
    "paperReviewingDisplay-downloadTemplate",
    paperReviewingDisplay.RHDownloadPRTemplate,
)
event.add_url_rule("/paper-reviewing/upload", "paperReviewingDisplay-uploadPaper", paperReviewingDisplay.RHUploadPaper)
Пример #7
0
# This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.legacy.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# My conference
event.add_url_rule('/my-conference/', 'myconference', conferenceDisplay.RHMyStuff)
Пример #8
0
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import registrantsDisplay, registrationFormDisplay
from indico.web.flask.blueprints.event.display import event


# Registrants
event.add_url_rule('/registration/registrants', 'confRegistrantsDisplay-list', registrantsDisplay.RHRegistrantsList)

# Registration
# Sections
event.add_url_rule('/registration/', 'confRegistrationFormDisplay', registrationFormDisplay.RHRegistrationForm)
event.add_url_rule('/registration/', 'confRegistrationFormDisplay', registrationFormDisplay.RHRegistrationForm)
event.add_url_rule('/registration/conditions', 'confRegistrationFormDisplay-conditions',
                   registrationFormDisplay.RHRegistrationFormConditions)
event.add_url_rule('/registration/confirm', 'confRegistrationFormDisplay-confirmBooking',
                   registrationFormDisplay.RHRegistrationFormconfirmBooking, methods=('GET', 'POST'))
event.add_url_rule('/registration/pay', 'confRegistrationFormDisplay-confirmBookingDone',
                   registrationFormDisplay.RHRegistrationFormconfirmBookingDone)
event.add_url_rule('/registration/register', 'confRegistrationFormDisplay-creation',
                   registrationFormDisplay.RHRegistrationFormCreation, methods=('POST',))
event.add_url_rule('/registration/register/success', 'confRegistrationFormDisplay-creationDone',
                   registrationFormDisplay.RHRegistrationFormCreationDone)
Пример #9
0
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# My conference
event.add_url_rule("/my-conference/", "myconference", conferenceDisplay.RHMyStuff)
event.add_url_rule(
    "/my-conference/contributions", "myconference-myContributions", conferenceDisplay.RHConfMyStuffMyContributions
)
event.add_url_rule("/my-conference/sessions", "myconference-mySessions", conferenceDisplay.RHConfMyStuffMySessions)
event.add_url_rule("/my-conference/tracks", "myconference-myTracks", conferenceDisplay.RHConfMyStuffMyTracks)

# Other views
event.add_url_rule("/other-view", "conferenceOtherViews", conferenceDisplay.RHConferenceOtherViews)

# EMail form
event.add_url_rule("/email", "EMail", conferenceDisplay.RHConferenceEmail, methods=("GET", "POST"))
event.add_url_rule("/email/send", "EMail-send", conferenceDisplay.RHConferenceSendEmail, methods=("POST",))
Пример #10
0
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay, CFADisplay
from indico.web.flask.blueprints.event.display import event


# Call for abstracts
event.add_url_rule('/call-for-abstracts/', 'conferenceCFA', CFADisplay.RHConferenceCFA)
event.add_url_rule('/call-for-abstracts/my-abstracts', 'userAbstracts', CFADisplay.RHUserAbstracts)
event.add_url_rule('/call-for-abstracts/my-abstracts.pdf', 'userAbstracts-pdf', CFADisplay.RHUserAbstractsPDF)

# Abstract submission
event.add_url_rule('/call-for-abstracts/submit', 'abstractSubmission', CFADisplay.RHAbstractSubmission,
                   methods=('GET', 'POST'))
event.add_url_rule('/call-for-abstracts/<abstractId>/submitted', 'abstractSubmission-confirmation',
                   CFADisplay.RHAbstractSubmissionConfirmation)
event.add_url_rule('/call-for-abstracts/<abstractId>/modify', 'abstractModify', CFADisplay.RHAbstractModify,
                   methods=('GET', 'POST'))
event.add_url_rule('/call-for-abstracts/<abstractId>/withdraw', 'abstractWithdraw', CFADisplay.RHAbstractWithdraw,
                   methods=('GET', 'POST'))
event.add_url_rule('/call-for-abstracts/<abstractId>/recover', 'abstractWithdraw-recover',
                   CFADisplay.RHAbstractRecovery, methods=('GET', 'POST'))
Пример #11
0
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# My conference
event.add_url_rule('/my-conference/', 'myconference', conferenceDisplay.RHMyStuff)
event.add_url_rule('/my-conference/contributions', 'myconference-myContributions',
                   conferenceDisplay.RHConfMyStuffMyContributions)
event.add_url_rule('/my-conference/sessions', 'myconference-mySessions', conferenceDisplay.RHConfMyStuffMySessions)
event.add_url_rule('/my-conference/tracks', 'myconference-myTracks', conferenceDisplay.RHConfMyStuffMyTracks)

# Other views
event.add_url_rule('/other-view', 'conferenceOtherViews', conferenceDisplay.RHConferenceOtherViews)

# EMail form
event.add_url_rule('/email', 'EMail', conferenceDisplay.RHConferenceEmail, methods=('GET', 'POST'))
event.add_url_rule('/email/send', 'EMail-send', conferenceDisplay.RHConferenceSendEmail, methods=('POST',))
Пример #12
0
# This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from __future__ import unicode_literals

from indico.legacy.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event

# Event access
event.add_url_rule('/accesskey',
                   'conferenceDisplay-accessKey',
                   conferenceDisplay.RHConferenceAccessKey,
                   methods=('GET', 'POST'))

# Machine-readable formats
event.add_url_rule('/event.marc.xml', 'conferenceDisplay-marcxml',
                   conferenceDisplay.RHConferenceToMarcXML)
Пример #13
0
# This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# Program
event.add_url_rule('/program', 'conferenceProgram', conferenceDisplay.RHConferenceProgram)
event.add_url_rule('/program.pdf', 'conferenceProgram-pdf', conferenceDisplay.RHConferenceProgramPDF)
Пример #14
0
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import registrantsDisplay, registrationFormDisplay
from indico.web.flask.blueprints.event.display import event
from indico.web.flask.util import redirect_view


# Registrants
event.add_url_rule('/registration/registrants', 'confRegistrantsDisplay-list', registrantsDisplay.RHRegistrantsList,
                   methods=["GET", "POST"])

# Registration
event.add_url_rule('/registration/', 'confRegistrationFormDisplay',
                   registrationFormDisplay.RHRegistrationForm)
event.add_url_rule('/registration/conditions', 'confRegistrationFormDisplay-conditions',
                   registrationFormDisplay.RHRegistrationFormConditions)
event.add_url_rule('/registration/register', 'confRegistrationFormDisplay-creation',
                   registrationFormDisplay.RHRegistrationFormCreation, methods=('POST',))
event.add_url_rule('/registration/ticket.pdf', 'e-ticket-pdf',
                   registrationFormDisplay.RHConferenceTicketPDF)
event.add_url_rule('/registration/register', 'confRegistrationFormDisplay-display',
                   registrationFormDisplay.RHRegistrationFormDisplay)
event.add_url_rule('/registration/modify', 'confRegistrationFormDisplay-modify',
                   registrationFormDisplay.RHRegistrationFormModify)
event.add_url_rule('/registration/modify', 'confRegistrationFormDisplay-performModify',
Пример #15
0
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay, CFADisplay
from indico.web.flask.blueprints.event.display import event


# Call for abstracts
event.add_url_rule("/call-for-abstracts/", "conferenceCFA", CFADisplay.RHConferenceCFA)
event.add_url_rule("/call-for-abstracts/my-abstracts", "userAbstracts", CFADisplay.RHUserAbstracts)
event.add_url_rule("/call-for-abstracts/my-abstracts.pdf", "userAbstracts-pdf", CFADisplay.RHUserAbstractsPDF)

# Abstract submission
event.add_url_rule(
    "/call-for-abstracts/submit", "abstractSubmission", CFADisplay.RHAbstractSubmission, methods=("GET", "POST")
)
event.add_url_rule(
    "/call-for-abstracts/<abstractId>/submitted",
    "abstractSubmission-confirmation",
    CFADisplay.RHAbstractSubmissionConfirmation,
)
event.add_url_rule(
    "/call-for-abstracts/<abstractId>/modify", "abstractModify", CFADisplay.RHAbstractModify, methods=("GET", "POST")
)
Пример #16
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event

# My conference
event.add_url_rule('/my-conference/', 'myconference',
                   conferenceDisplay.RHMyStuff)
event.add_url_rule('/my-conference/contributions',
                   'myconference-myContributions',
                   conferenceDisplay.RHConfMyStuffMyContributions)
event.add_url_rule('/my-conference/sessions', 'myconference-mySessions',
                   conferenceDisplay.RHConfMyStuffMySessions)
event.add_url_rule('/my-conference/tracks', 'myconference-myTracks',
                   conferenceDisplay.RHConfMyStuffMyTracks)

# Other views
event.add_url_rule('/other-view', 'conferenceOtherViews',
                   conferenceDisplay.RHConferenceOtherViews)

# EMail form
event.add_url_rule('/email',
                   'EMail',
Пример #17
0
                              confId=mapping.event_id)
                func = lambda: redirect(url, 301)

    if func is None:
        raise NotFound(
            _('The specified event with id or tag "{}" does not exist or has been deleted'
              ).format(confId))
    return func()


# Routes supporting shorturls
# /e/ accepts slashes, /event/ doesn't - this is intended. We do not want to support slashes in the old namespace
# since it's a major pain in the ass to do so (and its route would eat anything that's usually a 404)
event.add_url_rule('!/e/<path:confId>',
                   'shorturl',
                   _event_or_shorturl,
                   strict_slashes=False,
                   defaults={'shorturl_namespace': True})
event.add_url_rule('!/event/<confId>/', 'conferenceDisplay',
                   _event_or_shorturl)

# Event overview and navigation
event.add_url_rule('/overview',
                   'conferenceDisplay-overview',
                   _event_or_shorturl,
                   defaults={'ovw': True})
event.add_url_rule('/next',
                   'conferenceDisplay-next',
                   conferenceDisplay.RHRelativeEvent,
                   defaults={'which': 'next'})
event.add_url_rule('/prev',
Пример #18
0
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# Material package
event.add_url_rule('/material/download', 'conferenceDisplay-matPkg', conferenceDisplay.RHFullMaterialPackage)
event.add_url_rule('/material/download', 'conferenceDisplay-performMatPkg',
                   conferenceDisplay.RHFullMaterialPackagePerform, methods=('POST',))

# My conference
event.add_url_rule('/my-conference/', 'myconference', conferenceDisplay.RHMyStuff)
event.add_url_rule('/my-conference/contributions', 'myconference-myContributions',
                   conferenceDisplay.RHConfMyStuffMyContributions)
event.add_url_rule('/my-conference/sessions', 'myconference-mySessions', conferenceDisplay.RHConfMyStuffMySessions)
event.add_url_rule('/my-conference/tracks', 'myconference-myTracks', conferenceDisplay.RHConfMyStuffMyTracks)

# Custom pages
event.add_url_rule('/page/<pageId>', 'internalPage', conferenceDisplay.RHInternalPageDisplay)

# Other views
event.add_url_rule('/other-view', 'conferenceOtherViews', conferenceDisplay.RHConferenceOtherViews)
Пример #19
0
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event

# Login
event.add_url_rule('/user/login',
                   'confLogin',
                   conferenceDisplay.RHConfSignIn,
                   methods=('GET', 'POST'))
event.add_url_rule('/user/login/disabled',
                   'confLogin-disabledAccount',
                   conferenceDisplay.RHConfDisabledAccount,
                   methods=('GET', 'POST'))
event.add_url_rule('/user/login/not-activated', 'confLogin-unactivatedAccount',
                   conferenceDisplay.RHConfUnactivatedAccount)
event.add_url_rule('/user/reset-password',
                   'confLogin-sendLogin',
                   conferenceDisplay.RHConfSendLogin,
                   methods=('POST', ))
event.add_url_rule('/user/reset-password/<token>',
                   'confLogin-resetPassword',
                   conferenceDisplay.RHConfResetPassword,
                   methods=(
Пример #20
0
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 3 of the
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay, sessionDisplay
from indico.web.flask.blueprints.event.display import event


# Program
event.add_url_rule('/program', 'conferenceProgram', conferenceDisplay.RHConferenceProgram)
event.add_url_rule('/program.pdf', 'conferenceProgram-pdf', conferenceDisplay.RHConferenceProgramPDF)

# Timetable
event.add_url_rule('/timetable/', 'conferenceTimeTable', conferenceDisplay.RHConferenceTimeTable)
event.add_url_rule('/timetable/pdf', 'conferenceTimeTable-customizePdf', conferenceDisplay.RHTimeTableCustomizePDF)
event.add_url_rule('/timetable/timetable.pdf', 'conferenceTimeTable-pdf', conferenceDisplay.RHTimeTablePDF,
                   methods=('GET', 'POST'))

# Sessions
event.add_url_rule('/session/<sessionId>/', 'sessionDisplay', sessionDisplay.RHSessionDisplay)
event.add_url_rule('/session/<sessionId>/session.ics', 'sessionDisplay-ical', sessionDisplay.RHSessionToiCal)
event.add_url_rule('/session/<showSessions>/timetable.pdf', 'conferenceTimeTable-pdf', conferenceDisplay.RHTimeTablePDF)
Пример #21
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event

# Material package
event.add_url_rule('/material/download', 'conferenceDisplay-matPkg',
                   conferenceDisplay.RHFullMaterialPackage)
event.add_url_rule('/material/download',
                   'conferenceDisplay-performMatPkg',
                   conferenceDisplay.RHFullMaterialPackagePerform,
                   methods=('POST', ))

# My conference
event.add_url_rule('/my-conference/', 'myconference',
                   conferenceDisplay.RHMyStuff)
event.add_url_rule('/my-conference/contributions',
                   'myconference-myContributions',
                   conferenceDisplay.RHConfMyStuffMyContributions)
event.add_url_rule('/my-conference/sessions', 'myconference-mySessions',
                   conferenceDisplay.RHConfMyStuffMySessions)
event.add_url_rule('/my-conference/tracks', 'myconference-myTracks',
                   conferenceDisplay.RHConfMyStuffMyTracks)
Пример #22
0
## published by the Free Software Foundation; either version 3 of the
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import registrantsDisplay, registrationFormDisplay
from indico.web.flask.blueprints.event.display import event

# Registrants
event.add_url_rule('/registration/registrants', 'confRegistrantsDisplay-list',
                   registrantsDisplay.RHRegistrantsList)

# Registration
# Sections
event.add_url_rule('/registration/', 'confRegistrationFormDisplay',
                   registrationFormDisplay.RHRegistrationForm)
event.add_url_rule('/registration/', 'confRegistrationFormDisplay',
                   registrationFormDisplay.RHRegistrationForm)
event.add_url_rule('/registration/conditions',
                   'confRegistrationFormDisplay-conditions',
                   registrationFormDisplay.RHRegistrationFormConditions)
event.add_url_rule('/registration/confirm',
                   'confRegistrationFormDisplay-confirmBooking',
                   registrationFormDisplay.RHRegistrationFormconfirmBooking,
                   methods=('GET', 'POST'))
event.add_url_rule(
Пример #23
0
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import paperReviewingDisplay
from indico.web.flask.blueprints.event.display import event

# paperReviewingDisplay.py
event.add_url_rule('/paper-reviewing/', 'paperReviewingDisplay',
                   paperReviewingDisplay.RHPaperReviewingDisplay)
event.add_url_rule('/paper-reviewing/templates/',
                   'paperReviewingDisplay-downloadTemplate',
                   paperReviewingDisplay.RHDownloadPRTemplate)
event.add_url_rule('/paper-reviewing/templates/<reviewingTemplateId>',
                   'paperReviewingDisplay-downloadTemplate',
                   paperReviewingDisplay.RHDownloadPRTemplate)
event.add_url_rule('/paper-reviewing/upload',
                   'paperReviewingDisplay-uploadPaper',
                   paperReviewingDisplay.RHUploadPaper)
Пример #24
0
# This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event

# Program
event.add_url_rule('/program', 'conferenceProgram',
                   conferenceDisplay.RHConferenceProgram)
event.add_url_rule('/program.pdf', 'conferenceProgram-pdf',
                   conferenceDisplay.RHConferenceProgramPDF)
Пример #25
0
# -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2013 European Organization for Nuclear Research (CERN).
##
## Indico is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 3 of the
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import paperReviewingDisplay
from indico.web.flask.blueprints.event.display import event


# paperReviewingDisplay.py
event.add_url_rule('/paper-reviewing/', 'paperReviewingDisplay', paperReviewingDisplay.RHPaperReviewingDisplay)
event.add_url_rule('/paper-reviewing/templates/', 'paperReviewingDisplay-downloadTemplate',
                   paperReviewingDisplay.RHDownloadPRTemplate)
event.add_url_rule('/paper-reviewing/templates/<reviewingTemplateId>', 'paperReviewingDisplay-downloadTemplate',
                   paperReviewingDisplay.RHDownloadPRTemplate)
event.add_url_rule('/paper-reviewing/upload', 'paperReviewingDisplay-uploadPaper', paperReviewingDisplay.RHUploadPaper)
Пример #26
0
# This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# My conference
event.add_url_rule('/my-conference/', 'myconference', conferenceDisplay.RHMyStuff)
event.add_url_rule('/my-conference/tracks', 'myconference-myTracks', conferenceDisplay.RHConfMyStuffMyTracks)

# Other views
event.add_url_rule('/other-view', 'conferenceOtherViews', conferenceDisplay.RHConferenceOtherViews)
Пример #27
0
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay, CFADisplay
from indico.web.flask.blueprints.event.display import event


# Call for abstracts
event.add_url_rule('/call-for-abstracts/', 'conferenceCFA', CFADisplay.RHConferenceCFA)
event.add_url_rule('/call-for-abstracts/my-abstracts', 'userAbstracts', CFADisplay.RHUserAbstracts)
event.add_url_rule('/call-for-abstracts/my-abstracts.pdf', 'userAbstracts-pdf', CFADisplay.RHUserAbstractsPDF)

# Abstract submission
event.add_url_rule('/call-for-abstracts/submit', 'abstractSubmission', CFADisplay.RHAbstractSubmission,
                   methods=('GET', 'POST'))
event.add_url_rule('/call-for-abstracts/<abstractId>/submitted', 'abstractSubmission-confirmation',
                   CFADisplay.RHAbstractSubmissionConfirmation)
event.add_url_rule('/call-for-abstracts/<abstractId>/modify', 'abstractModify', CFADisplay.RHAbstractModify,
                   methods=('GET', 'POST'))
event.add_url_rule('/call-for-abstracts/<abstractId>/withdraw', 'abstractWithdraw', CFADisplay.RHAbstractWithdraw,
                   methods=('GET', 'POST'))
event.add_url_rule('/call-for-abstracts/<abstractId>/recover', 'abstractWithdraw-recover',
                   CFADisplay.RHAbstractRecovery, methods=('GET', 'POST'))
Пример #28
0
## License, or (at your option) any later version.
##
## Indico is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Indico. If not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay, contribDisplay, subContribDisplay, authorDisplay
from indico.web.flask.blueprints.event.display import event


# Contribution list
event.add_url_rule('/contributions', 'contributionListDisplay', conferenceDisplay.RHContributionList)
event.add_url_rule('/contributions.pdf', 'contributionListDisplay-contributionsToPDF',
                   conferenceDisplay.RHContributionListToPDF, methods=('POST',))

with event.add_prefixed_rules('/session/<sessionId>'):
    # Display contribution
    event.add_url_rule('/contribution/<contribId>', 'contributionDisplay', contribDisplay.RHContributionDisplay)
    event.add_url_rule('/contribution/<contribId>.ics', 'contributionDisplay-ical', contribDisplay.RHContributionToiCal)
    event.add_url_rule('/contribution/<contribId>.marc.xml', 'contributionDisplay-marcxml',
                       contribDisplay.RHContributionToMarcXML)
    event.add_url_rule('/contribution/<contribId>.xml', 'contributionDisplay-xml', contribDisplay.RHContributionToXML)
    event.add_url_rule('/contribution/<contribId>.pdf', 'contributionDisplay-pdf', contribDisplay.RHContributionToPDF)
    event.add_url_rule('/contribution/<contribId>/<subContId>', 'subContributionDisplay',
                       subContribDisplay.RHSubContributionDisplay)
    event.add_url_rule('/contribution/<contribId>/<subContId>.marc.xml', 'subContributionDisplay-marcxml',
                       subContribDisplay.RHSubContributionToMarcXML)
Пример #29
0
                url = url_for('.shorturl', confId=confId)
                func = lambda: redirect(url, 301)
        elif is_legacy_id(confId):
            mapping = LegacyEventMapping.find_first(legacy_event_id=confId)
            if mapping is not None:
                url = url_for('event.conferenceDisplay', confId=mapping.event_id)
                func = lambda: redirect(url, 301)

    if func is None:
        raise NotFound(_('The specified event with id or tag "{}" does not exist or has been deleted').format(confId))
    return func()


# Routes supporting shorturls
# /e/ accepts slashes, /event/ doesn't - this is intended. We do not want to support slashes in the old namespace
# since it's a major pain in the ass to do so (and its route would eat anything that's usually a 404)
event.add_url_rule('!/e/<path:confId>', 'shorturl', _event_or_shorturl, strict_slashes=False,
                   defaults={'shorturl_namespace': True})
event.add_url_rule('!/event/<confId>/', 'conferenceDisplay', _event_or_shorturl)

# Event overview
event.add_url_rule('/overview', 'conferenceDisplay-overview', _event_or_shorturl, defaults={'ovw': True})

# Event access
event.add_url_rule('/accesskey', 'conferenceDisplay-accessKey', conferenceDisplay.RHConferenceAccessKey,
                   methods=('GET', 'POST'))

# Machine-readable formats
event.add_url_rule('/event.marc.xml', 'conferenceDisplay-marcxml', conferenceDisplay.RHConferenceToMarcXML)
event.add_url_rule('/event.xml', 'conferenceDisplay-xml', conferenceDisplay.RHConferenceToXML)
Пример #30
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay, contribDisplay, subContribDisplay, authorDisplay
from indico.web.flask.blueprints.event.display import event

# Contribution list
event.add_url_rule('/contributions', 'contributionListDisplay',
                   conferenceDisplay.RHContributionList)
event.add_url_rule('/contributions.pdf',
                   'contributionListDisplay-contributionsToPDF',
                   conferenceDisplay.RHContributionListToPDF,
                   methods=('POST', ))

with event.add_prefixed_rules('/session/<sessionId>'):
    # Display contribution
    event.add_url_rule('/contribution/<contribId>', 'contributionDisplay',
                       contribDisplay.RHContributionDisplay)
    event.add_url_rule('/contribution/<contribId>.ics',
                       'contributionDisplay-ical',
                       contribDisplay.RHContributionToiCal)
    event.add_url_rule('/contribution/<contribId>.marc.xml',
                       'contributionDisplay-marcxml',
                       contribDisplay.RHContributionToMarcXML)
Пример #31
0
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay, sessionDisplay
from indico.web.flask.blueprints.event.display import event


# Program
event.add_url_rule('/program', 'conferenceProgram', conferenceDisplay.RHConferenceProgram)
event.add_url_rule('/program.pdf', 'conferenceProgram-pdf', conferenceDisplay.RHConferenceProgramPDF)

# Timetable
event.add_url_rule('/timetable/', 'conferenceTimeTable', conferenceDisplay.RHConferenceTimeTable)
event.add_url_rule('/timetable/pdf', 'conferenceTimeTable-customizePdf', conferenceDisplay.RHTimeTableCustomizePDF)
event.add_url_rule('/timetable/timetable.pdf', 'conferenceTimeTable-pdf', conferenceDisplay.RHTimeTablePDF,
                   methods=('GET', 'POST'))

# Sessions
event.add_url_rule('/session/<sessionId>/', 'sessionDisplay', sessionDisplay.RHSessionDisplay)
event.add_url_rule('/session/<sessionId>/session.ics', 'sessionDisplay-ical', sessionDisplay.RHSessionToiCal)
event.add_url_rule('/session/<showSessions>/timetable.pdf', 'conferenceTimeTable-pdf', conferenceDisplay.RHTimeTablePDF)
Пример #32
0
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.webinterface.rh import conferenceDisplay
from indico.web.flask.blueprints.event.display import event


# My conference
event.add_url_rule('/my-conference/', 'myconference', conferenceDisplay.RHMyStuff)
event.add_url_rule('/my-conference/contributions', 'myconference-myContributions',
                   conferenceDisplay.RHConfMyStuffMyContributions)
event.add_url_rule('/my-conference/sessions', 'myconference-mySessions', conferenceDisplay.RHConfMyStuffMySessions)
event.add_url_rule('/my-conference/tracks', 'myconference-myTracks', conferenceDisplay.RHConfMyStuffMyTracks)

# Other views
event.add_url_rule('/other-view', 'conferenceOtherViews', conferenceDisplay.RHConferenceOtherViews)

# EMail form
event.add_url_rule('/email', 'EMail', conferenceDisplay.RHConferenceEmail, methods=('GET', 'POST'))
event.add_url_rule('/email/send', 'EMail-send', conferenceDisplay.RHConferenceSendEmail, methods=('POST',))

# Participation invitation
event.add_url_rule('/invitation/participant/<participantId>', 'confModifParticipants-invitation',
                   conferenceDisplay.RHConfParticipantsInvitation, methods=('GET', 'POST'))