# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from indico.modules.legal.controllers import RHDisplayPrivacyPolicy, RHDisplayTOS, RHManageLegalMessages from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('legal', __name__, template_folder='templates', virtual_template_folder='legal') _bp.add_url_rule('/admin/legal', 'manage', RHManageLegalMessages, methods=('GET', 'POST')) _bp.add_url_rule('/tos', 'display_tos', RHDisplayTOS) _bp.add_url_rule('/privacy', 'display_privacy', RHDisplayPrivacyPolicy)
RHLegacyTimetableMoveEntry, RHLegacyTimetableEditEntryDateTime, RHLegacyTimetableShiftEntries, RHLegacyTimetableSwapEntries, RHLegacyTimetableEditSession, RHLegacyTimetableBreakREST) from indico.modules.events.timetable.controllers.manage import (RHManageTimetable, RHManageSessionTimetable, RHTimetableREST, RHManageTimetableEntryInfo) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('timetable', __name__, template_folder='templates', virtual_template_folder='events/timetable', url_prefix='/event/<confId>') # Management _bp.add_url_rule('/manage/timetable/', 'management', RHManageTimetable) _bp.add_url_rule('/manage/timetable/', 'timetable_rest', RHTimetableREST, methods=('POST',)) _bp.add_url_rule('/manage/timetable/<int:entry_id>', 'timetable_rest', RHTimetableREST, methods=('PATCH', 'DELETE')) _bp.add_url_rule('/manage/timetable/session/<int:session_id>/', 'manage_session', RHManageSessionTimetable) # Timetable legacy operations _bp.add_url_rule('/manage/timetable/add-session', 'add_session', RHLegacyTimetableAddSession, methods=('GET', 'POST')) _bp.add_url_rule('/manage/timetable/break/<int:break_id>', 'legacy_break_rest', RHLegacyTimetableBreakREST, methods=('PATCH',)) with _bp.add_prefixed_rules('/manage/timetable/session/<int:session_id>', '/manage/timetable'): _bp.add_url_rule('/', 'session_rest', RHLegacyTimetableEditSession, methods=('PATCH',)) _bp.add_url_rule('/entry/<int:entry_id>/info', 'entry_info_manage', RHManageTimetableEntryInfo) _bp.add_url_rule('/entry/<int:entry_id>/delete', 'delete_entry', RHLegacyTimetableDeleteEntry, methods=('POST',)) _bp.add_url_rule('/entry/<int:entry_id>/move', 'move_entry', RHLegacyTimetableMoveEntry, methods=('GET', 'POST'))
# 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 (admins, announcement, taskManager, maintenance, domains, users, groups, templates, conferenceModif, services, api, oauth) from indico.web.flask.wrappers import IndicoBlueprint admin = IndicoBlueprint('admin', __name__, url_prefix='/admin') # General settings admin.add_url_rule('/', 'adminList', admins.RHAdminArea) admin.add_url_rule('/settings/general/news', 'adminList-switchNewsActive', admins.RHAdminSwitchNewsActive) admin.add_url_rule('/settings/general/', 'generalInfoModification', admins.RHGeneralInfoModification) admin.add_url_rule('/settings/general/', 'generalInfoModification-update', admins.RHGeneralInfoPerformModification, methods=('POST',)) # System settings admin.add_url_rule('/settings/system', 'adminSystem', admins.RHSystem) admin.add_url_rule('/settings/system/modify', 'adminSystem-modify', admins.RHSystemModify, methods=('GET', 'POST')) # Announcement admin.add_url_rule('/announcement', 'adminAnnouncement', announcement.RHAnnouncementModif) admin.add_url_rule('/announcement', 'adminAnnouncement-save', announcement.RHAnnouncementModifSave, methods=('POST',)) # News admin.add_url_rule('/news', 'updateNews', admins.RHUpdateNews)
# along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from flask import current_app, g from indico.modules.events.papers.controllers import display, management, paper, templates from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('papers', __name__, url_prefix='/event/<confId>', template_folder='templates', virtual_template_folder='events/papers') # Display pages _bp.add_url_rule('/papers/', 'call_for_papers', display.RHCallForPapers) _bp.add_url_rule('/papers/select-contribution', 'select_contribution', display.RHSelectContribution) _bp.add_url_rule('/papers/<int:contrib_id>/', 'paper_timeline', display.RHPaperTimeline) _bp.add_url_rule('/papers/<int:contrib_id>/files/<int:file_id>-<filename>', 'download_file', display.RHDownloadPaperFile) _bp.add_url_rule('/papers/templates/<int:template_id>-<filename>', 'download_template', templates.RHDownloadPaperTemplate) _bp.add_url_rule('/contributions/<int:contrib_id>/paper/submit', 'submit_revision', display.RHSubmitPaper, methods=('GET', 'POST')) # Paper reviews/judgments _bp.add_url_rule('/papers/<int:contrib_id>/review/type/<review_type>', 'submit_review', display.RHSubmitPaperReview, methods=('GET', 'POST')) _bp.add_url_rule('/papers/<int:contrib_id>/revision/<int:revision_id>/review/<int:review_id>/edit', 'edit_review', display.RHEditPaperReview, methods=('GET', 'POST')) _bp.add_url_rule('/papers/<int:contrib_id>/judgment', 'judge_paper', display.RHJudgePaper, methods=('POST',))
# 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.modules.events import event_object_url_prefixes from indico.modules.events.notes.controllers import RHCompileNotes, RHEditNote, RHDeleteNote, RHViewNote from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('event_notes', __name__, template_folder='templates', virtual_template_folder='events/notes', url_prefix='/event/<confId>') _bp.add_url_rule('/note/compile', 'compile', RHCompileNotes, methods=('GET', 'POST'), defaults={'object_type': 'event'}) for object_type, prefixes in event_object_url_prefixes.iteritems(): for prefix in prefixes: _bp.add_url_rule(prefix + '/note/', 'view', RHViewNote, defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/note/edit', 'edit', RHEditNote, methods=('GET', 'POST'), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/note/delete', 'delete', RHDeleteNote, methods=('POST',), defaults={'object_type': object_type})
domains, users, groups, templates, conferenceModif, services, api, oauth, ) from indico.web.flask.wrappers import IndicoBlueprint admin = IndicoBlueprint("admin", __name__, url_prefix="/admin") # General settings admin.add_url_rule("/", "adminList", admins.RHAdminArea) admin.add_url_rule("/settings/general/news", "adminList-switchNewsActive", admins.RHAdminSwitchNewsActive) admin.add_url_rule("/settings/general/", "generalInfoModification", admins.RHGeneralInfoModification) admin.add_url_rule( "/settings/general/", "generalInfoModification-update", admins.RHGeneralInfoPerformModification, methods=("POST",) ) # System settings admin.add_url_rule("/settings/system", "adminSystem", admins.RHSystem) admin.add_url_rule("/settings/system/modify", "adminSystem-modify", admins.RHSystemModify, methods=("GET", "POST")) # Announcement admin.add_url_rule("/announcement", "adminAnnouncement", announcement.RHAnnouncementModif) admin.add_url_rule("/announcement", "adminAnnouncement-save", announcement.RHAnnouncementModifSave, methods=("POST",)) # News
# 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 __future__ import unicode_literals from indico.modules.announcement.controllers import RHAnnouncement from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('announcement', __name__, template_folder='templates', virtual_template_folder='announcement') _bp.add_url_rule('/admin/announcement', 'manage', RHAnnouncement, methods=('GET', 'POST'))
# -*- coding: utf-8 -*- ## ## ## 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/>. import MaKaC.plugins.EPayment.chrome as handlers from indico.web.flask.wrappers import IndicoBlueprint blueprint = IndicoBlueprint('epayment', __name__, url_prefix='/epayment') blueprint.add_url_rule('/<path:filepath>', 'htdocs', handlers.RHEPaymentHtdocs)
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.events.features.controllers import RHFeatures, RHSwitchFeature from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('event_features', __name__, template_folder='templates', virtual_template_folder='events/features', url_prefix='/event/<confId>/manage/features') _bp.add_url_rule('/', 'index', RHFeatures) _bp.add_url_rule('/<feature>', 'switch', RHSwitchFeature, methods=('PUT', 'DELETE'))
from indico.modules.rb.controllers.admin import reservations as reservation_admin_handlers from indico.modules.rb.controllers.user import blockings as blocking_handlers from indico.modules.rb.controllers.user import index as index_handler from indico.modules.rb.controllers.user import photos as photo_handlers from indico.modules.rb.controllers.user import reservations as reservation_handlers from indico.modules.rb.controllers.user import rooms as room_handlers from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('rooms', __name__, template_folder='../templates', virtual_template_folder='rb', url_prefix='/rooms') # Photos _bp.add_url_rule('/room/<int:roomID>/photo.jpg', 'photo', photo_handlers.room_photo) # Home, map, lists, search _bp.add_url_rule('/', 'roomBooking', index_handler.RHRoomBookingWelcome) _bp.add_url_rule('/map', 'roomBooking-mapOfRooms', room_handlers.RHRoomBookingMapOfRooms) _bp.add_url_rule('/map/widget', 'roomBooking-mapOfRoomsWidget', room_handlers.RHRoomBookingMapOfRoomsWidget)
from flask import request from indico.modules.auth.controllers import (RHLogin, RHLoginForm, RHLogout, RHRegister, RHLinkAccount, RHResetPassword, RHAccounts, RHRemoveAccount) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('auth', __name__, template_folder='templates', virtual_template_folder='auth') _bp.add_url_rule('/login/', 'login', RHLogin, methods=('GET', 'POST')) _bp.add_url_rule('/login/<provider>/', 'login', RHLogin) _bp.add_url_rule('/login/<provider>/form', 'login_form', RHLoginForm) _bp.add_url_rule('/login/<provider>/link-account', 'link_account', RHLinkAccount, methods=('GET', 'POST')) _bp.add_url_rule('/logout/', 'logout', RHLogout, methods=('GET', 'POST')) _bp.add_url_rule('/register/', 'register', RHRegister, methods=('GET', 'POST'), defaults={'provider': None}) _bp.add_url_rule('/register/<provider>', 'register',
RHLegacyTimetableScheduleContribution, RHLegacyTimetableShiftEntries, RHLegacyTimetableSwapEntries) from indico.modules.events.timetable.controllers.manage import ( RHCloneContribution, RHManageSessionTimetable, RHManageTimetable, RHManageTimetableEntryInfo, RHTimetableREST) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('timetable', __name__, template_folder='templates', virtual_template_folder='events/timetable', url_prefix='/event/<confId>') # Management _bp.add_url_rule('/manage/timetable/', 'management', RHManageTimetable) _bp.add_url_rule('/manage/timetable/', 'timetable_rest', RHTimetableREST, methods=('POST', )) _bp.add_url_rule('/manage/timetable/<int:entry_id>', 'timetable_rest', RHTimetableREST, methods=('PATCH', 'DELETE')) _bp.add_url_rule('/manage/timetable/session/<int:session_id>/', 'manage_session', RHManageSessionTimetable) # Timetable legacy operations _bp.add_url_rule('/manage/timetable/add-session', 'add_session', RHLegacyTimetableAddSession,
# 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.web.flask.wrappers import IndicoBlueprint from indico.legacy.webinterface.rh import lang, resetTimezone, contact, errors misc = IndicoBlueprint('misc', __name__) misc.add_url_rule('/change-language', 'changeLang', lang.RHChangeLang, methods=('POST', )) misc.add_url_rule('/change-timezone', 'resetSessionTZ', resetTimezone.RHResetTZ, methods=('GET', 'POST')) misc.add_url_rule('/contact', 'contact', contact.RHContact) misc.add_url_rule('/report-error', 'errors', errors.RHErrorReporting, methods=('GET', 'POST'))
# LICENSE file for more details. from indico.modules.events.payment.controllers import ( RHPaymentAdminPluginSettings, RHPaymentAdminSettings, RHPaymentCheckout, RHPaymentConditions, RHPaymentForm, RHPaymentPluginEdit, RHPaymentSettings, RHPaymentSettingsEdit) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('payment', __name__, template_folder='templates', virtual_template_folder='events/payment') # Admin _bp.add_url_rule('/admin/payment/', 'admin_settings', RHPaymentAdminSettings, methods=('GET', 'POST')) _bp.add_url_rule('/admin/payment/<plugin>/', 'admin_plugin_settings', RHPaymentAdminPluginSettings, methods=('GET', 'POST')) # Event management _bp.add_url_rule('/event/<int:event_id>/manage/payments/', 'event_settings', RHPaymentSettings) _bp.add_url_rule('/event/<int:event_id>/manage/payments/settings', 'event_settings_edit', RHPaymentSettingsEdit, methods=('GET', 'POST')) _bp.add_url_rule('/event/<int:event_id>/manage/payments/method/<method>', 'event_plugin_edit',
## 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 welcome, helpDisplay, newsDisplay, payment, lang, resetTimezone, about, contact, \ JSContent, errors, materialDisplay from indico.web.flask.wrappers import IndicoBlueprint misc = IndicoBlueprint('misc', __name__) misc.add_url_rule('/', 'index', welcome.RHWelcome) misc.add_url_rule('/help', 'help', helpDisplay.RHHelp) misc.add_url_rule('/news', 'news', newsDisplay.RHNews) misc.add_url_rule('/payment', 'payment', payment.RHPaymentModule, methods=('GET', 'POST')) misc.add_url_rule('/change-language', 'changeLang', lang.RHChangeLang, methods=('GET', 'POST')) misc.add_url_rule('/change-timezone', 'resetSessionTZ', resetTimezone.RHResetTZ, methods=('GET', 'POST')) misc.add_url_rule('/about', 'about', about.RHAbout) misc.add_url_rule('/contact', 'contact', contact.RHContact) misc.add_url_rule('/vars.js', 'JSContent-getVars', JSContent.RHGetVarsJs) misc.add_url_rule('/report-error', 'errors', errors.RHErrorReporting, methods=('GET', 'POST')) misc.add_url_rule('/error-report/<report_id>/<filename>', 'error-report-download', errors.RHDownloadErrorReport) misc.add_url_rule('/conversion-finished', 'getConvertedFile', materialDisplay.RHMaterialAddConvertedFile, methods=('POST',))
def _redirect_event_creation(category_id, event_type): anchor = f'create-event:{event_type}:{category_id}' return redirect( url_for('.display', category_id=category_id, _anchor=anchor)) _bp = IndicoBlueprint('categories', __name__, template_folder='templates', virtual_template_folder='categories', url_prefix='/category/<int:category_id>') # Category management _bp.add_url_rule('/manage/', 'manage_content', RHManageCategoryContent) _bp.add_url_rule('/manage/delete', 'delete', RHDeleteCategory, methods=('POST', )) _bp.add_url_rule('/manage/icon', 'manage_icon', RHManageCategoryIcon, methods=('POST', 'DELETE')) _bp.add_url_rule('/manage/logo', 'manage_logo', RHManageCategoryLogo, methods=('POST', 'DELETE')) _bp.add_url_rule('/manage/move', 'move', RHMoveCategory, methods=('POST', )) _bp.add_url_rule('/manage/protection', 'manage_protection',
# 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 __future__ import unicode_literals from indico.modules.bootstrap.controllers import RHBootstrap from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('bootstrap', __name__, template_folder='templates', virtual_template_folder='bootstrap') _bp.add_url_rule('/bootstrap', 'index', RHBootstrap, methods=('GET', 'POST'))
# 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 __future__ import unicode_literals from indico.core.celery.controllers import RHCeleryTasks from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('celery', __name__, url_prefix='/admin/tasks', template_folder='templates', virtual_template_folder='celery') _bp.add_url_rule('/', 'index', RHCeleryTasks)
# 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.modules.legal.controllers import RHDisplayLegalMessages, RHManageLegalMessages from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('legal', __name__, template_folder='templates', virtual_template_folder='legal') _bp.add_url_rule('/admin/legal', 'manage', RHManageLegalMessages, methods=('GET', 'POST')) _bp.add_url_rule('/tos', 'display_tos', RHDisplayLegalMessages)
# Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.networks.controllers import (RHCreateNetworkGroup, RHDeleteNetworkGroup, RHEditNetworkGroup, RHManageNetworks) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('networks', __name__, template_folder='templates', virtual_template_folder='networks') _bp.add_url_rule('/admin/networks/', 'manage', RHManageNetworks) _bp.add_url_rule('/admin/networks/create', 'create_group', RHCreateNetworkGroup, methods=('GET', 'POST')) _bp.add_url_rule('/admin/networks/<int:network_group_id>/', 'edit_group', RHEditNetworkGroup, methods=('GET', 'POST')) _bp.add_url_rule('/admin/networks/<int:network_group_id>/delete', 'delete_group', RHDeleteNetworkGroup, methods=('GET', 'POST'))
# 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 __future__ import unicode_literals from indico.modules.events.static.controllers import RHStaticSiteBuild, RHStaticSiteDownload, RHStaticSiteList from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('static_site', __name__, template_folder='templates', virtual_template_folder='events/static', url_prefix='/event/<confId>/manage/tools/static-site') # Event management _bp.add_url_rule('/', 'list', RHStaticSiteList) _bp.add_url_rule('/<int:id>.zip', 'download', RHStaticSiteDownload) _bp.add_url_rule('/build', 'build', RHStaticSiteBuild, methods=('POST',))
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.logs.controllers import RHCategoryLogs, RHCategoryLogsJSON, RHEventLogs, RHEventLogsJSON from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('logs', __name__, template_folder='templates', virtual_template_folder='logs') # Events _bp.add_url_rule('/event/<int:event_id>/manage/logs/', 'event', RHEventLogs) _bp.add_url_rule('/event/<int:event_id>/manage/logs/api/logs', 'api_event_logs', RHEventLogsJSON) # Categories _bp.add_url_rule('/category/<int:category_id>/manage/logs/', 'category', RHCategoryLogs) _bp.add_url_rule('/category/<int:category_id>/manage/logs/api/logs', 'api_category_logs', RHCategoryLogsJSON)
# # 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.modules.events.tracks.controllers import (RHCreateTrack, RHDeleteTrack, RHDisplayTracks, RHEditProgram, RHEditTrack, RHManageTracks, RHSortTracks, RHTracksPDF) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('tracks', __name__, template_folder='templates', virtual_template_folder='events/tracks', url_prefix='/event/<confId>') _bp.add_url_rule('/manage/tracks/', 'manage', RHManageTracks) _bp.add_url_rule('/manage/tracks/program', 'edit_program', RHEditProgram, methods=('GET', 'POST')) _bp.add_url_rule('/manage/tracks/create', 'create_track', RHCreateTrack, methods=('GET', 'POST')) _bp.add_url_rule('/manage/tracks/sort', 'sort_tracks', RHSortTracks, methods=('POST',)) _bp.add_url_rule('/manage/tracks/<int:track_id>', 'edit_track', RHEditTrack, methods=('GET', 'POST')) _bp.add_url_rule('/manage/tracks/<int:track_id>', 'delete_track', RHDeleteTrack, methods=('DELETE',)) _bp.add_url_rule('/program', 'program', RHDisplayTracks) _bp.add_url_rule('/program.pdf', 'program_pdf', RHTracksPDF) _compat_bp = IndicoBlueprint('compat_tracks', __name__, url_prefix='/event/<int:confId>') _compat_bp.add_url_rule('/manage/program/tracks/<int:track_id>/contributions/', 'track_contribs', make_compat_redirect_func('contributions', 'contribution_list', view_args_conv={'track_id': None}))
# -*- coding: utf-8 -*- ## ## ## 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/>. import indico.ext.search.chrome as handlers from indico.web.flask.wrappers import IndicoBlueprint blueprint = IndicoBlueprint('search', __name__, url_prefix='/search') blueprint.add_url_rule('', 'search', handlers.RHSearchBase) blueprint.add_url_rule('/<path:filepath>', 'htdocs', handlers.RHSearchHtdocs)
RHMoveCategory, RHMoveEvents, RHMoveSubcategories, RHSortSubcategories, RHSplitCategory) from indico.web.flask.util import make_compat_redirect_func, redirect_view, url_for from indico.web.flask.wrappers import IndicoBlueprint def _redirect_event_creation(category_id, event_type): anchor = 'create-event:{}:{}'.format(event_type, category_id) return redirect(url_for('.display', category_id=category_id, _anchor=anchor)) _bp = IndicoBlueprint('categories', __name__, template_folder='templates', virtual_template_folder='categories', url_prefix='/category/<int:category_id>') # Category management _bp.add_url_rule('/manage/', 'manage_content', RHManageCategoryContent) _bp.add_url_rule('/manage/delete', 'delete', RHDeleteCategory, methods=('POST',)) _bp.add_url_rule('/manage/icon', 'manage_icon', RHManageCategoryIcon, methods=('POST', 'DELETE')) _bp.add_url_rule('/manage/logo', 'manage_logo', RHManageCategoryLogo, methods=('POST', 'DELETE')) _bp.add_url_rule('/manage/move', 'move', RHMoveCategory, methods=('POST',)) _bp.add_url_rule('/manage/protection', 'manage_protection', RHManageCategoryProtection, methods=('GET', 'POST')) _bp.add_url_rule('/manage/settings', 'manage_settings', RHManageCategorySettings, methods=('POST', 'GET')) # Event management _bp.add_url_rule('/manage/events/delete', 'delete_events', RHDeleteEvents, methods=('GET', 'POST')) _bp.add_url_rule('/manage/events/move', 'move_events', RHMoveEvents, methods=('POST',)) _bp.add_url_rule('/manage/events/split', 'split_category', RHSplitCategory, methods=('GET', 'POST')) # Subcategory management _bp.add_url_rule('/manage/subcategories/create', 'create_subcategory', RHCreateCategory, methods=('GET', 'POST')) _bp.add_url_rule('/manage/subcategories/delete', 'delete_subcategories', RHDeleteSubcategories, methods=('POST',))
RHAgreementForm, RHAgreementManager, RHAgreementManagerDetails, RHAgreementManagerDetailsDownloadAgreement, RHAgreementManagerDetailsRemind, RHAgreementManagerDetailsRemindAll, RHAgreementManagerDetailsSend, RHAgreementManagerDetailsSendAll, RHAgreementManagerDetailsSubmitAnswer, RHAgreementManagerDetailsToggleNotifications) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('agreements', __name__, template_folder='templates', virtual_template_folder='events/agreements', url_prefix='/event/<int:event_id>') # Event management _bp.add_url_rule('/manage/agreements/', 'event_agreements', RHAgreementManager) _bp.add_url_rule('/manage/agreements/<definition>/', 'event_agreements_details', RHAgreementManagerDetails) _bp.add_url_rule('/manage/agreements/<definition>/toggle-notifications', 'toggle_notifications', RHAgreementManagerDetailsToggleNotifications, methods=('POST', )) _bp.add_url_rule('/manage/agreements/<definition>/send', 'event_agreements_details_send', RHAgreementManagerDetailsSend, methods=('GET', 'POST')) _bp.add_url_rule('/manage/agreements/<definition>/remind', 'event_agreements_details_remind', RHAgreementManagerDetailsRemind, methods=('GET', 'POST')) _bp.add_url_rule('/manage/agreements/<definition>/send-all',
def view_func(**kwargs): return categ_view(**kwargs) if kwargs['object_type'] == 'category' else event_view(**kwargs) return view_func # Management items = itertools.chain(event_management_object_url_prefixes.iteritems(), [('category', ['/manage'])]) for object_type, prefixes in items: for prefix in prefixes: if object_type == 'category': prefix = '/category/<categId>' + prefix else: prefix = '/event/<confId>' + prefix _bp.add_url_rule(prefix + '/attachments/', 'management', _dispatch(RHManageEventAttachments, RHManageCategoryAttachments), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/add/files', 'upload', _dispatch(RHAddEventAttachmentFiles, RHAddCategoryAttachmentFiles), methods=('GET', 'POST'), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/add/link', 'add_link', _dispatch(RHAddEventAttachmentLink, RHAddCategoryAttachmentLink), methods=('GET', 'POST'), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/<int:folder_id>/<int:attachment_id>/', 'modify_attachment', _dispatch(RHEditEventAttachment, RHEditCategoryAttachment), methods=('GET', 'POST'), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/create-folder', 'create_folder', _dispatch(RHCreateEventFolder, RHCreateCategoryFolder), methods=('GET', 'POST'), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/<int:folder_id>/', 'edit_folder', _dispatch(RHEditEventFolder, RHEditCategoryFolder),
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.events.static.controllers import RHStaticSiteBuild, RHStaticSiteDownload, RHStaticSiteList from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('static_site', __name__, template_folder='templates', virtual_template_folder='events/static', url_prefix='/event/<confId>/manage/offline-copy') # Event management _bp.add_url_rule('/', 'list', RHStaticSiteList) _bp.add_url_rule('/<int:id>.zip', 'download', RHStaticSiteDownload) _bp.add_url_rule('/build', 'build', RHStaticSiteBuild, methods=('POST', ))
# 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 flask import request from indico.modules.auth.controllers import (RHLogin, RHLoginForm, RHLogout, RHRegister, RHLinkAccount, RHResetPassword, RHAccounts, RHRemoveAccount) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('auth', __name__, template_folder='templates', virtual_template_folder='auth') _bp.add_url_rule('/login/', 'login', RHLogin, methods=('GET', 'POST')) _bp.add_url_rule('/login/<provider>/', 'login', RHLogin) _bp.add_url_rule('/login/<provider>/form', 'login_form', RHLoginForm) _bp.add_url_rule('/login/<provider>/link-account', 'link_account', RHLinkAccount, methods=('GET', 'POST')) _bp.add_url_rule('/logout/', 'logout', RHLogout, methods=('GET', 'POST')) _bp.add_url_rule('/register/', 'register', RHRegister, methods=('GET', 'POST'), defaults={'provider': None}) _bp.add_url_rule('/register/<provider>', 'register', RHRegister, methods=('GET', 'POST')) _bp.add_url_rule('/reset-password/', 'resetpass', RHResetPassword, methods=('GET', 'POST')) with _bp.add_prefixed_rules('/user/<int:user_id>', '/user'): _bp.add_url_rule('/accounts/', 'accounts', RHAccounts, methods=('GET', 'POST')) _bp.add_url_rule('/accounts/<identity>/remove/', 'remove_account', RHRemoveAccount, methods=('POST',))
from __future__ import unicode_literals from indico.modules.events.registration import api from indico.modules.events.registration.controllers import display from indico.modules.events.registration.controllers.compat import compat_registration from indico.modules.events.registration.controllers.management import (fields, invitations, regforms, reglists, sections, tickets) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('event_registration', __name__, url_prefix='/event/<confId>', template_folder='templates', virtual_template_folder='events/registration', event_feature='registration') # Management _bp.add_url_rule('/manage/registration/', 'manage_regform_list', regforms.RHManageRegistrationForms) _bp.add_url_rule('/manage/registration/create', 'create_regform', regforms.RHRegistrationFormCreate, methods=('GET', 'POST')) _bp.add_url_rule('/manage/registration/display', 'manage_regforms_display', regforms.RHManageRegistrationFormsDisplay, methods=('GET', 'POST')) _bp.add_url_rule('/manage/registration/managers', 'manage_registration_managers', regforms.RHManageRegistrationManagers, methods=('GET', 'POST')) # Single registration form management _bp.add_url_rule('/manage/registration/<int:reg_form_id>/', 'manage_regform', regforms.RHRegistrationFormManage) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/edit', 'edit_regform', regforms.RHRegistrationFormEdit, methods=('GET', 'POST')) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/delete', 'delete_regform', regforms.RHRegistrationFormDelete, methods=('POST',)) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/open', 'open_regform', regforms.RHRegistrationFormOpen, methods=('POST',))
# 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.modules.rb.controllers.admin import index as index_handler from indico.modules.rb.controllers.admin import locations as location_handlers from indico.modules.rb.controllers.admin import rooms as room_handlers from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('rooms_admin', __name__, template_folder='../templates', virtual_template_folder='rb', url_prefix='/admin/rooms') # Main settings _bp.add_url_rule('/config/', 'settings', index_handler.RHRoomBookingSettings, methods=('GET', 'POST')) # Locations _bp.add_url_rule('/locations/', 'roomBooking-admin', location_handlers.RHRoomBookingAdmin) _bp.add_url_rule('/locations/delete', 'roomBooking-deleteLocation', location_handlers.RHRoomBookingDeleteLocation, methods=('POST',)) _bp.add_url_rule('/locations/add', 'roomBooking-saveLocation',
from indico.modules.rb.controllers.admin import (index as index_handler, locations as location_handlers, rooms as room_handlers) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('rooms_admin', __name__, template_folder='../templates', virtual_template_folder='rb', url_prefix='/admin/rooms') # Main settings _bp.add_url_rule('/config/', 'settings', index_handler.RHRoomBookingSettings, methods=('GET', 'POST')) # Locations _bp.add_url_rule('/locations/', 'roomBooking-admin', location_handlers.RHRoomBookingAdmin) _bp.add_url_rule('/locations/delete', 'roomBooking-deleteLocation', location_handlers.RHRoomBookingDeleteLocation, methods=('POST', )) _bp.add_url_rule('/locations/add', 'roomBooking-saveLocation', location_handlers.RHRoomBookingSaveLocation, methods=('POST', ))
RHManageContributionFields, RHCreateContributionField, RHEditContributionField, RHDeleteContributionField, RHSortContributionFields, RHManageDescriptionField, RHSortSubContributions, RHContributionACL, RHContributionACLMessage) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('contributions', __name__, template_folder='templates', virtual_template_folder='events/contributions', url_prefix='/event/<confId>') _bp.add_url_rule('/manage/contributions/', 'manage_contributions', RHContributions) _bp.add_url_rule('/manage/contributions/customize', 'customize_contrib_report', RHContributionsReportCustomize, methods=('GET', 'POST')) _bp.add_url_rule('/manage/contributions/static-url', 'generate_static_url', RHContributionsReportStaticURL, methods=('POST',)) _bp.add_url_rule('/manage/contributions/create', 'manage_create_contrib', RHCreateContribution, methods=('GET', 'POST')) _bp.add_url_rule('/manage/contributions/delete', 'manage_delete_contribs', RHDeleteContributions, methods=('POST',)) _bp.add_url_rule('/manage/contributions/person-list', 'person_list', RHContributionPersonList, methods=('POST',)) _bp.add_url_rule('/manage/contributions/material-package', 'material_package', RHContributionsMaterialPackage, methods=('POST',)) _bp.add_url_rule('/manage/contributions/contributions.csv', 'contributions_csv_export', RHContributionsExportCSV, methods=('POST',)) _bp.add_url_rule('/manage/contributions/contributions.xlsx', 'contributions_excel_export', RHContributionsExportExcel, methods=('POST',)) _bp.add_url_rule('/manage/contributions/contributions.pdf', 'contributions_pdf_export', RHContributionsExportPDF, methods=('POST',))
# LICENSE file for more details. from __future__ import unicode_literals from indico.modules.events.editing.controllers import frontend from indico.modules.events.editing.controllers.backend import common, editable_list, management, service, timeline from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('event_editing', __name__, url_prefix='/event/<confId>', template_folder='templates', virtual_template_folder='events/editing') # Frontend (management) _bp.add_url_rule('/manage/editing/', 'dashboard', frontend.RHEditingDashboard) _bp.add_url_rule('/manage/editing/tags', 'manage_tags', frontend.RHEditingDashboard) _bp.add_url_rule('/manage/editing/<any(paper,slides,poster):type>/', 'manage_editable_type', frontend.RHEditingDashboard) _bp.add_url_rule('/manage/editing/<any(paper,slides,poster):type>/list', 'manage_editable_type_list', frontend.RHEditingDashboard) _bp.add_url_rule('/manage/editing/<any(paper,slides,poster):type>/types', 'manage_file_types', frontend.RHEditingDashboard) _bp.add_url_rule( '/manage/editing/<any(paper,slides,poster):type>/review-conditions', 'manage_review_conditions', frontend.RHEditingDashboard) # Frontend (timeline) contrib_prefix = '/contributions/<int:contrib_id>/editing/<any(paper,slides,poster):type>' _bp.add_url_rule(contrib_prefix, 'editable', frontend.RHEditableTimeline)
RHRegistrationTogglePayment, RHRegistrationsPrintBadges, RHRegistrationApprove, RHRegistrationReject, RHRegistrationsModifyStatus, RHRegistrationsExportAttachments, RHRegistrationCheckIn, RHRegistrationBulkCheckIn) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('event_registration', __name__, url_prefix='/event/<confId>', template_folder='templates', virtual_template_folder='events/registration', event_feature='registration') # Management _bp.add_url_rule('/manage/registration/', 'manage_regform_list', RHManageRegistrationForms) _bp.add_url_rule('/manage/registration/create', 'create_regform', RHRegistrationFormCreate, methods=('GET', 'POST')) # Single registration form management _bp.add_url_rule('/manage/registration/<int:reg_form_id>/', 'manage_regform', RHRegistrationFormManage) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/edit', 'edit_regform', RHRegistrationFormEdit, methods=('GET', 'POST')) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/delete', 'delete_regform', RHRegistrationFormDelete, methods=('POST',)) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/open', 'open_regform', RHRegistrationFormOpen, methods=('POST',)) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/close', 'close_regform', RHRegistrationFormClose, methods=('POST',)) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/schedule', 'schedule_regform', RHRegistrationFormSchedule, methods=('GET', 'POST')) _bp.add_url_rule('/manage/registration/<int:reg_form_id>/form/', 'modify_regform', RHRegistrationFormModify)
return view_func # Management items = itertools.chain(event_management_object_url_prefixes.items(), [('category', ['/manage'])]) for object_type, prefixes in items: for prefix in prefixes: if object_type == 'category': prefix = '/category/<int:category_id>' + prefix else: prefix = '/event/<int:event_id>' + prefix _bp.add_url_rule(prefix + '/attachments/', 'management', _dispatch(RHManageEventAttachments, RHManageCategoryAttachments), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/info-column', 'management_info_column', RHAttachmentManagementInfoColumn, defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/add/files', 'upload', _dispatch(RHAddEventAttachmentFiles, RHAddCategoryAttachmentFiles), methods=('GET', 'POST'), defaults={'object_type': object_type}) _bp.add_url_rule(prefix + '/attachments/add/link', 'add_link', _dispatch(RHAddEventAttachmentLink,
## 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 materialDisplay, fileAccess from indico.web.flask.wrappers import IndicoBlueprint files = IndicoBlueprint("files", __name__) # Material (event) files.add_url_rule("/event/<confId>/material/<materialId>/", "materialDisplay", materialDisplay.RHMaterialDisplay) files.add_url_rule( "/event/<confId>/contribution/<contribId>/material/<materialId>/", "materialDisplay", materialDisplay.RHMaterialDisplay, ) files.add_url_rule( "/event/<confId>/session/<sessionId>/contribution/<contribId>/material/<materialId>/", "materialDisplay", materialDisplay.RHMaterialDisplay, ) files.add_url_rule( "/event/<confId>/material/<materialId>/accesskey", "materialDisplay-accessKey", materialDisplay.RHMaterialDisplayStoreAccessKey, methods=("POST",),
from indico.modules.api.controllers import (RHAPIAdminKeys, RHAPIAdminSettings, RHAPIBlockKey, RHAPICreateKey, RHAPIDeleteKey, RHAPITogglePersistent, RHAPIUserProfile) from indico.web.flask.wrappers import IndicoBlueprint from indico.web.http_api.handlers import handler as api_handler _bp = IndicoBlueprint('api', __name__, template_folder='templates', virtual_template_folder='api') # HTTP API _bp.add_url_rule('/export/<path:path>', view_func=api_handler, endpoint='httpapi', defaults={'prefix': 'export'}) _bp.add_url_rule('/api/<path:path>', view_func=api_handler, endpoint='httpapi', defaults={'prefix': 'api'}, methods=('POST', )) _bp.add_url_rule('/<any(api, export):prefix>', endpoint='httpapi', build_only=True) # Administration _bp.add_url_rule('/admin/api/', 'admin_settings', RHAPIAdminSettings, methods=('GET', 'POST'))
# -*- coding: utf-8 -*- ## ## ## 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/>. import indico.ext.importer.handlers as handlers from indico.web.flask.wrappers import IndicoBlueprint blueprint = IndicoBlueprint('importer', __name__, url_prefix='/importer') blueprint.add_url_rule('/<path:filepath>', 'htdocs', handlers.RHImporterHtdocs)
RHCreateSession, RHCreateSessionType, RHDeleteSessions, RHDeleteSessionType, RHEditSessionType, RHExportSessionsCSV, RHExportSessionsExcel, RHExportSessionsPDF, RHManageSessionBlock, RHManageSessionTypes, RHModifySession, RHSessionACL, RHSessionACLMessage, RHSessionBlocks, RHSessionPersonList, RHSessionProtection, RHSessionREST, RHSessionsList) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('sessions', __name__, template_folder='templates', virtual_template_folder='events/sessions', url_prefix='/event/<confId>') _bp.add_url_rule('/manage/sessions/', 'session_list', RHSessionsList) _bp.add_url_rule('/manage/sessions/create', 'create_session', RHCreateSession, methods=('GET', 'POST')) _bp.add_url_rule('/manage/sessions/delete', 'delete_sessions', RHDeleteSessions, methods=('POST', )) _bp.add_url_rule('/manage/sessions/sessions.csv', 'export_csv', RHExportSessionsCSV, methods=('POST', )) _bp.add_url_rule('/manage/sessions/sessions.xlsx', 'export_excel', RHExportSessionsExcel,
## 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 calendar, categoryDisplay from indico.web.flask.util import redirect_view from indico.web.flask.wrappers import IndicoBlueprint category = IndicoBlueprint('category', __name__, url_prefix='/category') # Short URLs category.add_url_rule('!/categ/<categId>', view_func=redirect_view('.categoryDisplay'), strict_slashes=False) category.add_url_rule('!/c/<categId>', view_func=redirect_view('.categoryDisplay'), strict_slashes=False) # Display category.add_url_rule('/<categId>/', 'categoryDisplay', categoryDisplay.RHCategoryDisplay) category.add_url_rule('/<categId>/events.atom', 'categoryDisplay-atom', categoryDisplay.RHCategoryToAtom) category.add_url_rule('/<categId>/events.rss', 'categoryDisplay-rss', categoryDisplay.RHCategoryToRSS) category.add_url_rule('/<categId>/events.ics', 'categoryDisplay-ical', categoryDisplay.RHCategoryToiCal) category.add_url_rule('/<categId>/icon', 'categoryDisplay-getIcon', categoryDisplay.RHCategoryGetIcon) category.add_url_rule('/<categId>/statistics', 'categoryStatistics', categoryDisplay.RHCategoryStatistics) # Overview category.add_url_rule('/<categId>/overview', 'categOverview', categoryDisplay.RHCategOverviewDisplay) category.add_url_rule('/<selCateg>/overview', 'categOverview', categoryDisplay.RHCategOverviewDisplay) category.add_url_rule('/overview', 'categOverview', categoryDisplay.RHCategOverviewDisplay) category.add_url_rule('/<categId>/overview.rss', 'categOverview-rss', categoryDisplay.RHTodayCategoryToRSS)
from __future__ import unicode_literals from flask import jsonify from indico.modules.rb_new.controllers.backend import admin, blockings, bookings, locations, misc, rooms from indico.modules.rb_new.controllers.frontend import RHLanding from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('rooms_new', __name__, template_folder='templates', virtual_template_folder='rb_new', url_prefix='/rooms-new') # Frontend _bp.add_url_rule('/', 'roombooking', RHLanding) _bp.add_url_rule('/<path:path>', 'roombooking', RHLanding) # Backend _bp.add_url_rule('/api/<path:path>', '404', lambda path: (jsonify(), 404)) _bp.add_url_rule('/api/config', 'config', misc.RHConfig) _bp.add_url_rule('/api/stats', 'stats', misc.RHStats) _bp.add_url_rule('/api/rooms/search', 'search_rooms', rooms.RHSearchRooms) _bp.add_url_rule('/api/rooms/', 'rooms', rooms.RHRooms) _bp.add_url_rule('/api/rooms/<int:room_id>/availability', 'room_availability', rooms.RHRoomAvailability) _bp.add_url_rule('/api/rooms/<int:room_id>/attributes', 'room_attributes', rooms.RHRoomAttributes) _bp.add_url_rule('/api/user/', 'user_info', misc.RHUserInfo) _bp.add_url_rule('/api/user/favorite-rooms/', 'favorite_rooms', rooms.RHRoomFavorites)
# 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.modules.networks.controllers import (RHCreateNetworkGroup, RHDeleteNetworkGroup, RHEditNetworkGroup, RHManageNetworks) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('networks', __name__, template_folder='templates', virtual_template_folder='networks') _bp.add_url_rule('/admin/networks/', 'manage', RHManageNetworks) _bp.add_url_rule('/admin/networks/create', 'create_group', RHCreateNetworkGroup, methods=('GET', 'POST')) _bp.add_url_rule('/admin/networks/<int:network_group_id>/', 'edit_group', RHEditNetworkGroup, methods=('GET', 'POST')) _bp.add_url_rule('/admin/networks/<int:network_group_id>/delete', 'delete_group', RHDeleteNetworkGroup, methods=('GET', 'POST'))
# along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.modules.rb_new.controllers import backend from indico.modules.rb_new.controllers.frontend import RHLanding from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('rooms_new', __name__, template_folder='templates', virtual_template_folder='rb_new', url_prefix='/rooms-new') # Frontend _bp.add_url_rule('/', 'roombooking', RHLanding) _bp.add_url_rule('/<path:path>', 'roombooking', RHLanding) # Backend _bp.add_url_rule('/api/rooms', 'available_rooms', backend.RHSearchRooms) _bp.add_url_rule('/api/room/<int:room_id>', 'room_details', backend.RHRoomDetails) _bp.add_url_rule('/api/map/rooms', 'map_rooms', backend.RHSearchMapRooms) _bp.add_url_rule('/api/user/', 'user_info', backend.RHUserInfo) _bp.add_url_rule('/api/user/favorite-rooms/', 'favorite_rooms', backend.RHRoomFavorites) _bp.add_url_rule('/api/user/favorite-rooms/<int:room_id>', 'favorite_rooms', backend.RHRoomFavorites, methods=('PUT', 'DELETE')) _bp.add_url_rule('/api/map/aspects', 'default_aspects', backend.RHAspects)
from __future__ import unicode_literals from indico.modules.events import event_management_object_url_prefixes from indico.modules.events.management.controllers import RHDeleteEvent, RHLockEvent, RHUnlockEvent, RHShowNonInheriting from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint( "event_management", __name__, template_folder="templates", virtual_template_folder="events/management", url_prefix="/event/<confId>/manage", ) _bp.add_url_rule("/delete", "delete", RHDeleteEvent, methods=("GET", "POST")) _bp.add_url_rule("/lock", "lock", RHLockEvent, methods=("GET", "POST")) _bp.add_url_rule("/unlock", "unlock", RHUnlockEvent, methods=("POST",)) for object_type, prefixes in event_management_object_url_prefixes.iteritems(): if object_type == "subcontribution": continue for prefix in prefixes: prefix = "!/event/<confId>" + prefix _bp.add_url_rule( prefix + "/show-non-inheriting", "show_non_inheriting", RHShowNonInheriting, defaults={"object_type": object_type}, )
# modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import current_app, g from indico.modules.events.papers.controllers import api, display, management, paper, templates from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('papers', __name__, url_prefix='/event/<confId>', template_folder='templates', virtual_template_folder='events/papers') # API _bp.add_url_rule('/papers/api/<int:contrib_id>', 'api_paper_details', api.RHPaperDetails) _bp.add_url_rule('/papers/api/<int:contrib_id>', 'api_reset_paper_state', api.RHResetPaperState, methods=('DELETE', )) _bp.add_url_rule('/papers/api/<int:contrib_id>/comment', 'api_create_comment', api.RHCreatePaperComment, methods=('POST', )) _bp.add_url_rule( '/papers/api/<int:contrib_id>/revision/<int:revision_id>/comment/<int:comment_id>', 'api_comment_actions', api.RHCommentActions, methods=('DELETE', 'PATCH')) _bp.add_url_rule('/papers/api/<int:contrib_id>/judge', 'api_judge_paper',
## 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 roomBookingPluginAdmin, roomBooking, roomMappers from indico.web.flask.wrappers import IndicoBlueprint rooms_admin = IndicoBlueprint('rooms_admin', __name__, url_prefix='/admin/rooms') # Main settings rooms_admin.add_url_rule('/config/', 'roomBookingPluginAdmin', roomBookingPluginAdmin.RHRoomBookingPluginAdmin) rooms_admin.add_url_rule('/config/toggle', 'roomBookingPluginAdmin-switchRoomBookingModuleActive', roomBookingPluginAdmin.RHSwitchRoomBookingModuleActive) rooms_admin.add_url_rule('/config/save-db', 'roomBookingPluginAdmin-zodbSave', roomBookingPluginAdmin.RHZODBSave, methods=('POST',)) # Locations rooms_admin.add_url_rule('/locations/', 'roomBooking-admin', roomBooking.RHRoomBookingAdmin) rooms_admin.add_url_rule('/locations/delete', 'roomBooking-deleteLocation', roomBooking.RHRoomBookingDeleteLocation, methods=('POST',)) rooms_admin.add_url_rule('/locations/add', 'roomBooking-saveLocation', roomBooking.RHRoomBookingSaveLocation, methods=('POST',)) rooms_admin.add_url_rule('/locations/set-default', 'roomBooking-setDefaultLocation', roomBooking.RHRoomBookingSetDefaultLocation, methods=('POST',)) rooms_admin.add_url_rule('/location/<locationId>/', 'roomBooking-adminLocation', roomBooking.RHRoomBookingAdminLocation)
## ## 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 login, users, api from indico.web.flask.wrappers import IndicoBlueprint user = IndicoBlueprint('user', __name__, url_prefix='/user') # Logout user.add_url_rule('/logout', 'logOut', login.RHSignOut) # Login user.add_url_rule('/login', 'signIn', login.RHSignIn, methods=('GET', 'POST')) user.add_url_rule('/login/sso', 'signIn-sso', login.RHSignInSSO, methods=('GET', 'POST')) user.add_url_rule('/login/sso/<authId>', 'signIn-sso', login.RHSignInSSO, methods=('GET', 'POST')) user.add_url_rule('/login/disabled', 'signIn-disabledAccount', login.RHDisabledAccount, methods=('GET', 'POST'))
from __future__ import unicode_literals from flask import jsonify, redirect from indico.modules.rb.controllers.backend import admin, blockings, bookings, locations, misc, rooms from indico.modules.rb.controllers.frontend import RHRoomBooking from indico.modules.rb.event import controllers as event from indico.web.flask.util import url_for from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('rb', __name__, template_folder='../rb/templates', virtual_template_folder='rb', url_prefix='/rooms') # Frontend _bp.add_url_rule('/', 'roombooking', RHRoomBooking) _bp.add_url_rule('/<path:path>', 'roombooking', RHRoomBooking) _bp.add_url_rule('/rooms-sprite-<version>.jpg', 'sprite', misc.RHRoomsSprite) _bp.add_url_rule('/rooms-sprite.jpg', 'sprite', misc.RHRoomsSprite) _bp.add_url_rule('/rooms/<int:room_id>.jpg', 'room_photo', rooms.RHRoomPhoto) # General backend _bp.add_url_rule('/api/<path:path>', '404', lambda path: (jsonify(), 404)) _bp.add_url_rule('/api/config', 'config', misc.RHConfig) _bp.add_url_rule('/api/stats', 'stats', misc.RHStats) _bp.add_url_rule('/api/map-areas', 'map_areas', misc.RHMapAreas) _bp.add_url_rule('/api/equipment', 'equipment_types', misc.RHEquipmentTypes) _bp.add_url_rule('/api/locations', 'locations', locations.RHLocations) _bp.add_url_rule('/api/link-info/<any(event,contribution,session_block):type>/<int:id>', 'linked_object_data', bookings.RHLinkedObjectData) _bp.add_url_rule('/api/events', 'events', bookings.RHMatchingEvents)
from indico.modules.events.layout.controllers.layout import ( RHLayoutEdit, RHLayoutCSSUpload, RHLayoutCSSDelete, RHLayoutLogoUpload, RHLayoutLogoDelete, RHLogoDisplay, RHLayoutCSSSaveTheme, RHLayoutCSSDisplay, RHLayoutCSSPreview, RHLayoutTimetableThemeForm) from indico.modules.events.layout.controllers.menu import ( RHMenuAddEntry, RHMenuDeleteEntry, RHMenuEdit, RHMenuToggleCustom, RHMenuEntryToggleEnabled, RHMenuEntryToggleDefault, RHMenuEntryEdit, RHMenuEntryPosition, RHPageDisplay) _bp = IndicoBlueprint('event_layout', __name__, template_folder='templates', virtual_template_folder='events/layout', url_prefix='/event/<confId>/manage/layout') _bp.add_url_rule('/', 'index', RHLayoutEdit, methods=('GET', 'POST')) _bp.add_url_rule('/timetable-theme-form', 'timetable_theme_form', RHLayoutTimetableThemeForm) _bp.add_url_rule('/menu/', 'menu', RHMenuEdit) _bp.add_url_rule('/menu/toggle-customize', 'menu_toggle_custom', RHMenuToggleCustom, methods=('POST', )) _bp.add_url_rule('/menu/<int:menu_entry_id>/', 'menu_entry_edit', RHMenuEntryEdit, methods=( 'GET', 'POST', )) _bp.add_url_rule('/menu/<int:menu_entry_id>/position',
RHDeleteSessions, RHDeleteSessionType, RHEditSessionType, RHExportSessionsCSV, RHExportSessionsExcel, RHExportSessionsPDF, RHManageSessionBlock, RHManageSessionTypes, RHModifySession, RHSessionACL, RHSessionACLMessage, RHSessionBlocks, RHSessionPersonList, RHSessionProtection, RHSessionREST, RHSessionsList) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('sessions', __name__, template_folder='templates', virtual_template_folder='events/sessions', url_prefix='/event/<confId>') _bp.add_url_rule('/manage/sessions/', 'session_list', RHSessionsList) _bp.add_url_rule('/manage/sessions/create', 'create_session', RHCreateSession, methods=('GET', 'POST')) _bp.add_url_rule('/manage/sessions/delete', 'delete_sessions', RHDeleteSessions, methods=('POST',)) _bp.add_url_rule('/manage/sessions/sessions.csv', 'export_csv', RHExportSessionsCSV, methods=('POST',)) _bp.add_url_rule('/manage/sessions/sessions.xlsx', 'export_excel', RHExportSessionsExcel, methods=('POST',)) _bp.add_url_rule('/manage/sessions/sessions.pdf', 'export_pdf', RHExportSessionsPDF, methods=('POST',)) _bp.add_url_rule('/manage/sessions/<int:session_id>', 'session_rest', RHSessionREST, methods=('PATCH', 'DELETE')) _bp.add_url_rule('/manage/sessions/<int:session_id>/blocks', 'session_blocks', RHSessionBlocks) _bp.add_url_rule('/manage/sessions/<int:session_id>/modify', 'modify_session', RHModifySession, methods=('GET', 'POST')) _bp.add_url_rule('/manage/sessions/person-list/', 'person_list', RHSessionPersonList, methods=('POST',)) _bp.add_url_rule('/manage/sessions/<int:session_id>/protection', 'session_protection', RHSessionProtection, methods=('GET', 'POST')) _bp.add_url_rule('/manage/sessions/<int:session_id>/blocks/<int:block_id>', 'manage_session_block', RHManageSessionBlock, methods=('GET', 'POST')) _bp.add_url_rule('/manage/sessions/<int:session_id>/acl', 'acl', RHSessionACL) _bp.add_url_rule('/manage/sessions/<int:session_id>/acl-message', 'acl_message', RHSessionACLMessage)
# # 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.modules.events.reminders.controllers import (RHListReminders, RHDeleteReminder, RHEditReminder, RHAddReminder, RHPreviewReminder) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('event_reminders', __name__, template_folder='templates', virtual_template_folder='events/reminders', url_prefix='/event/<confId>/manage/reminders') _bp.add_url_rule('/', 'list', RHListReminders) _bp.add_url_rule('/add', 'add', RHAddReminder, methods=('GET', 'POST')) _bp.add_url_rule('/preview', 'preview', RHPreviewReminder, methods=('POST', )) _bp.add_url_rule('/<int:reminder_id>/', 'edit', RHEditReminder, methods=('GET', 'POST')) _bp.add_url_rule('/<int:reminder_id>/delete', 'delete', RHDeleteReminder, methods=('POST', ))
# # 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.fileAccess import RHFileAccess from indico.web.flask.wrappers import IndicoBlueprint files = IndicoBlueprint('files', __name__) # TODO: Remove when reviewing is rewritten. files.add_url_rule( '/event/<confId>/session/<sessionId>/contribution/<contribId>/material-old/<materialId>/<resId>.<fileExt>', 'getFile-access', RHFileAccess) files.add_url_rule('/event/<confId>/contribution/<contribId>/material-old/<materialId>/<resId>.<fileExt>', 'getFile-access', RHFileAccess) # TODO: Remove when the registration form is rewritten files.add_url_rule('/event/<confId>/registration/attachments/<registrantId>-<resId>.<fileExt>', 'getFile-access', RHFileAccess)
RHPersonalData, RHRegistrationRequestList, RHRejectRegistrationRequest, RHUserBlock, RHUserDashboard, RHUserEmails, RHUserEmailsDelete, RHUserEmailsSetPrimary, RHUserEmailsVerify, RHUserFavorites, RHUserFavoritesCategoryAPI, RHUserFavoritesUserRemove, RHUserFavoritesUsersAdd, RHUserPreferences, RHUsersAdmin, RHUsersAdminCreate, RHUsersAdminMerge, RHUsersAdminMergeCheck, RHUsersAdminSettings, RHUserSearch, RHUserSearchInfo, RHUserSuggestionsRemove) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('users', __name__, template_folder='templates', virtual_template_folder='users', url_prefix='/user') # Admins _bp.add_url_rule('!/admin/admins', 'admins', RHAdmins, methods=('GET', 'POST')) # User management _bp.add_url_rule('!/admin/users/', 'users_admin', RHUsersAdmin, methods=('GET', 'POST')) _bp.add_url_rule('!/admin/users/settings', 'users_admin_settings', RHUsersAdminSettings, methods=('GET', 'POST')) _bp.add_url_rule('!/admin/users/create/', 'users_create', RHUsersAdminCreate, methods=('GET', 'POST')) _bp.add_url_rule('!/admin/users/merge/', 'users_merge', RHUsersAdminMerge, methods=('GET', 'POST')) _bp.add_url_rule('!/admin/users/merge/check/', 'users_merge_check', RHUsersAdminMergeCheck) _bp.add_url_rule('!/admin/users/registration-requests/', 'registration_request_list', RHRegistrationRequestList) _bp.add_url_rule('!/admin/users/registration-requests/<int:request_id>/accept', 'accept_registration_request', RHAcceptRegistrationRequest, methods=('POST',)) _bp.add_url_rule('!/admin/users/registration-requests/<int:request_id>/reject', 'reject_registration_request', RHRejectRegistrationRequest, methods=('POST',)) # User profile with _bp.add_prefixed_rules('/<int:user_id>'):
## 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 categoryMod from indico.web.flask.wrappers import IndicoBlueprint category_mgmt = IndicoBlueprint('category_mgmt', __name__, url_prefix='/category/<categId>/manage') # Creation category_mgmt.add_url_rule('!/category/<categId>/create/subcategory', 'categoryCreation', categoryMod.RHCategoryCreation, methods=('GET', 'POST')) category_mgmt.add_url_rule('!/category/<categId>/create/subcategory/save', 'categoryCreation-create', categoryMod.RHCategoryPerformCreation, methods=('POST',)) # Event creation is in event.creation # General settings category_mgmt.add_url_rule('/', 'categoryModification', categoryMod.RHCategoryModification) category_mgmt.add_url_rule('/data', 'categoryDataModification', categoryMod.RHCategoryDataModif, methods=('GET', 'POST')) category_mgmt.add_url_rule('/data/save', 'categoryDataModification-modify', categoryMod.RHCategoryPerformModification, methods=('POST',)) category_mgmt.add_url_rule('/settings/tasks', 'categoryDataModification-tasksOption', categoryMod.RHCategoryTaskOption, methods=('GET', 'POST')) category_mgmt.add_url_rule('/events', 'categoryModification-actionConferences', categoryMod.RHCategoryActionConferences, methods=('GET', 'POST')) category_mgmt.add_url_rule('/subcategories', 'categoryModification-actionSubCategs',
@memoize def _dispatch(event_rh, category_rh): event_view = make_view_func(event_rh) categ_view = make_view_func(category_rh) def view_func(**kwargs): return categ_view( **kwargs) if kwargs['object_type'] == 'category' else event_view( **kwargs) return view_func _bp.add_url_rule( '/category/<int:category_id>/manage/designer/<int:template_id>/toggle-default-ticket', 'toggle_category_default_ticket', RHToggleTicketDefaultOnCategory, methods=('POST', )) _bp.add_url_rule( '/category/<int:category_id>/manage/designer/<int:template_id>/toggle-default-badge', 'toggle_category_default_badge', RHToggleBadgeDefaultOnCategory, methods=('POST', )) for object_type in ('event', 'category'): if object_type == 'category': prefix = '/category/<int:category_id>' else: prefix = '/event/<int:confId>' prefix += '/manage/designer' _bp.add_url_rule(prefix + '/',
from indico.modules.rb.controllers.admin import ( index as index_handler, locations as location_handlers, mappers as mapper_handlers, rooms as room_handlers ) from indico.web.flask.wrappers import IndicoBlueprint rooms_admin = IndicoBlueprint('rooms_admin', __name__, url_prefix='/admin/rooms') # Main settings rooms_admin.add_url_rule('/config/', 'settings', index_handler.RHRoomBookingSettings, methods=('GET', 'POST')) # Locations rooms_admin.add_url_rule('/locations/', 'roomBooking-admin', location_handlers.RHRoomBookingAdmin) rooms_admin.add_url_rule('/locations/delete', 'roomBooking-deleteLocation', location_handlers.RHRoomBookingDeleteLocation, methods=('POST',)) rooms_admin.add_url_rule('/locations/add', 'roomBooking-saveLocation',
## 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.services.interface.rpc.json import process as jsonrpc_handler from indico.web.flask.wrappers import IndicoBlueprint from indico.web.http_api.handlers import handler as api_handler api = IndicoBlueprint('api', __name__) api.add_url_rule('/services/json-rpc', view_func=jsonrpc_handler, endpoint='jsonrpc', methods=('POST',)) api.add_url_rule('/api/<path:path>', view_func=api_handler, endpoint='httpapi', defaults={'prefix': 'api'}, methods=('POST', )) api.add_url_rule('/export/<path:path>', view_func=api_handler, endpoint='httpapi', defaults={'prefix': 'export'}) api.add_url_rule('/<any(api, export):prefix>', endpoint='httpapi',
from indico.modules.events.layout.controllers.layout import (RHLayoutCSSDelete, RHLayoutCSSDisplay, RHLayoutCSSPreview, RHLayoutCSSSaveTheme, RHLayoutCSSUpload, RHLayoutEdit, RHLayoutLogoDelete, RHLayoutLogoUpload, RHLayoutTimetableThemeForm, RHLogoDisplay) from indico.modules.events.layout.controllers.menu import (RHMenuAddEntry, RHMenuDeleteEntry, RHMenuEdit, RHMenuEntryEdit, RHMenuEntryPosition, RHMenuEntryToggleDefault, RHMenuEntryToggleEnabled, RHMenuToggleCustom, RHPageDisplay) from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('event_layout', __name__, template_folder='templates', virtual_template_folder='events/layout', url_prefix='/event/<confId>/manage/layout') _bp.add_url_rule('/', 'index', RHLayoutEdit, methods=('GET', 'POST')) _bp.add_url_rule('/timetable-theme-form', 'timetable_theme_form', RHLayoutTimetableThemeForm) _bp.add_url_rule('/menu/', 'menu', RHMenuEdit) _bp.add_url_rule('/menu/toggle-customize', 'menu_toggle_custom', RHMenuToggleCustom, methods=('POST',)) _bp.add_url_rule('/menu/<int:menu_entry_id>/', 'menu_entry_edit', RHMenuEntryEdit, methods=('GET', 'POST')) _bp.add_url_rule('/menu/<int:menu_entry_id>/position', 'menu_entry_position', RHMenuEntryPosition, methods=('POST',)) _bp.add_url_rule('/menu/<int:menu_entry_id>/toggle-enabled', 'menu_entry_toggle_enabled', RHMenuEntryToggleEnabled, methods=('POST',)) _bp.add_url_rule('/menu/<int:menu_entry_id>/toggle-default', 'menu_entry_toggle_default', RHMenuEntryToggleDefault, methods=('POST',)) _bp.add_url_rule('/menu/<int:menu_entry_id>/delete', 'menu_delete_entry', RHMenuDeleteEntry, methods=('DELETE',)) _bp.add_url_rule('/menu/add', 'menu_add_entry', RHMenuAddEntry, methods=('GET', 'POST')) _bp.add_url_rule('/theme/save', 'css_save_theme', RHLayoutCSSSaveTheme, methods=('POST',)) _bp.add_url_rule('/theme/preview', 'css_preview', RHLayoutCSSPreview) _bp.add_url_rule('/css', 'upload_css', RHLayoutCSSUpload, methods=('POST',)) _bp.add_url_rule('/css', 'delete_css', RHLayoutCSSDelete, methods=('DELETE',))
# modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from indico.modules.events.requests.controllers import ( RHRequestsEventRequestDetails, RHRequestsEventRequestProcess, RHRequestsEventRequests, RHRequestsEventRequestWithdraw) from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('requests', __name__, template_folder='templates', virtual_template_folder='events/requests', url_prefix='/event/<confId>/manage/requests') # Event management _bp.add_url_rule('/', 'event_requests', RHRequestsEventRequests) _bp.add_url_rule('/<type>/', 'event_requests_details', RHRequestsEventRequestDetails, methods=('GET', 'POST')) _bp.add_url_rule('/<type>/withdraw', 'event_requests_withdraw', RHRequestsEventRequestWithdraw, methods=('POST', )) _bp.add_url_rule('/<type>/process', 'event_requests_process', RHRequestsEventRequestProcess, methods=('POST', ))