# 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'))
# 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.cephalopod.controllers import RHCephalopod, RHCephalopodSync, RHSystemInfo from indico.web.flask.wrappers import IndicoBlueprint cephalopod_blueprint = _bp = IndicoBlueprint( 'cephalopod', __name__, template_folder='templates', virtual_template_folder='cephalopod') _bp.add_url_rule('/admin/community-hub/', 'index', RHCephalopod, methods=('GET', 'POST')) _bp.add_url_rule('/admin/community-hub/sync', 'sync', RHCephalopodSync, methods=('POST', )) _bp.add_url_rule('/system-info', 'system-info', RHSystemInfo)
# 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.web.flask.wrappers import IndicoBlueprint event_mgmt = IndicoBlueprint('event_mgmt', __name__, url_prefix='/event/<confId>/manage') import indico.web.flask.blueprints.event.management.rooms
# 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.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)
## 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 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',
RHCreateCategoryFolder, RHDeleteCategoryAttachment, RHDeleteCategoryFolder, RHEditCategoryAttachment, RHEditCategoryFolder, RHManageCategoryAttachments) from indico.modules.attachments.controllers.management.event import ( RHAddEventAttachmentFiles, RHAddEventAttachmentLink, RHAttachmentManagementInfoColumn, RHCreateEventFolder, RHDeleteEventAttachment, RHDeleteEventFolder, RHEditEventAttachment, RHEditEventFolder, RHManageEventAttachments, RHPackageEventAttachmentsManagement) from indico.modules.events import event_management_object_url_prefixes, event_object_url_prefixes from indico.util.caching import memoize from indico.web.flask.util import make_compat_redirect_func, make_view_func from indico.web.flask.wrappers import IndicoBlueprint _bp = IndicoBlueprint('attachments', __name__, template_folder='templates', virtual_template_folder='attachments') @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
import sentry_sdk from flask import current_app, g, jsonify, request, session from itsdangerous import BadData from marshmallow import ValidationError from sqlalchemy.exc import DatabaseError from werkzeug.exceptions import BadRequestKeyError, Forbidden, HTTPException, UnprocessableEntity from indico.core.errors import IndicoError, get_error_description from indico.core.logger import Logger from indico.modules.auth.util import redirect_to_login from indico.util.i18n import _ from indico.web.errors import render_error from indico.web.flask.wrappers import IndicoBlueprint from indico.web.util import ExpectedError errors_bp = IndicoBlueprint('errors', __name__) @errors_bp.app_errorhandler(Forbidden) def handle_forbidden(exc): if exc.response: return exc if (session.user is None and not request.is_xhr and not request.is_json and request.blueprint != 'auth' and not g.get('get_request_user_failed')): return redirect_to_login( reason=_('Please log in to access this page.')) return render_error(exc, _('Access Denied'), get_error_description(exc), exc.code)
# This file is part of Indico. # 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 __future__ import unicode_literals from indico.web.flask.wrappers import IndicoBlueprint event_registration_blueprint = _bp = IndicoBlueprint( 'event_registration', __name__, template_folder='templates')
# 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)
# -*- 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)
RHMoveSubcategories, RHRemoveCategoryRoleMember, RHSortSubcategories, RHSplitCategory) from indico.modules.users import User 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 = 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',
# 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'),
# 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.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)
RHLegacyTimetableBreakREST, RHLegacyTimetableDeleteEntry, RHLegacyTimetableEditEntry, RHLegacyTimetableEditEntryDateTime, RHLegacyTimetableEditEntryTime, RHLegacyTimetableEditSession, RHLegacyTimetableFitBlock, RHLegacyTimetableGetUnscheduledContributions, RHLegacyTimetableMoveEntry, RHLegacyTimetableReschedule, 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)
# 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.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',
# 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.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 - 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 __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',
# 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 indico.web.flask.wrappers import IndicoBlueprint event = IndicoBlueprint('event', __name__, url_prefix='/event/<confId>') import indico.web.flask.blueprints.event.display.main import indico.web.flask.blueprints.event.display.abstracts import indico.web.flask.blueprints.event.display.paperreviewing import indico.web.flask.blueprints.event.display.contributions import indico.web.flask.blueprints.event.display.schedule import indico.web.flask.blueprints.event.display.misc
# 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 flask import request 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)
import binascii import os from flask import current_app, json, session, render_template, Response from werkzeug.exceptions import NotFound from indico.core.config import Config from indico.core.plugins import plugin_engine from indico.modules.users.util import serialize_user from indico.util.caching import make_hashable from indico.util.i18n import po_to_json from indico.web.flask.util import send_file from indico.web.flask.wrappers import IndicoBlueprint from indico.web.assets.vars_js import generate_global_file assets_blueprint = IndicoBlueprint('assets', __name__, url_prefix='/assets') @assets_blueprint.route('/js-vars/global.js') def js_vars_global(): """ Provides a JS file with global definitions (all users) Useful for server-wide config options, URLs, etc... """ config = Config.getInstance() config_hash = binascii.crc32( repr(make_hashable(sorted(config._configVars.items())))) & 0xffffffff cache_file = os.path.join(config.getXMLCacheDir(), 'assets_global_{}.js'.format(config_hash)) if not os.path.exists(cache_file):
from indico.modules.events.sessions.controllers.display import ( RHDisplaySession, RHDisplaySessionList, RHExportSessionTimetableToPDF, RHExportSessionToICAL) from indico.modules.events.sessions.controllers.management.sessions import ( 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,
# -*- 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)
# 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 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>',
# 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.agreements.controllers import ( 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'))
from indico.web.flask.util import make_compat_redirect_func from indico.web.flask.wrappers import IndicoBlueprint from indico.modules.events.layout.compat import compat_page, compat_image from indico.modules.events.layout.controllers.images import RHImageDelete, RHImageDisplay, RHImageUpload, RHImages 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=(
# 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 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 MIT License; see the # LICENSE file for more details. 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,
from flask import request from indico.modules.users.api import RHUserFavoritesAPI, fetch_authenticated_user from indico.modules.users.controllers import (RHAcceptRegistrationRequest, RHAdmins, RHExportDashboardICS, 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',))
# 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.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)