class WPRoomBookingEventBase(WPEventManagementLegacy): sidemenu_option = 'room_booking' def getJSFiles(self): return WPEventManagementLegacy.getJSFiles( self) + self._includeJSPackage('RoomBooking') def _createTabCtrl(self): self._tabCtrl = TabControl() self._tabExistBookings = self._tabCtrl.newTab( 'existing', 'Existing Bookings', url_for('event_mgmt.rooms_booking_list', self.event)) self._tabNewBooking = self._tabCtrl.newTab( 'new', 'New Booking', url_for('event_mgmt.rooms_choose_event', self.event)) if not Reservation.query.with_parent(self.event).has_rows(): self._tabExistBookings.setEnabled(False) self._setActiveTab() def _getPageContent(self, params): self._createTabCtrl() params['event'] = self.event return WTabControl(self._tabCtrl).getHTML(self._getTabContent(params)) def _getTabContent(self, params): raise NotImplementedError
def _createTabCtrl(self): self._tabCtrl = TabControl() if session.user.is_admin: self._subTabRoomBooking = self._tabCtrl.newTab( 'booking', _('Room Booking'), url_for('rooms_admin.settings') ) self._subTabMain = self._subTabRoomBooking.newSubTab( 'settings', _('Settings'), url_for('rooms_admin.settings') ) else: self._subTabRoomBooking = self._tabCtrl.newTab( 'booking', _('Room Booking'), url_for('rooms_admin.roomBooking-admin') ) self._subTabConfig = self._subTabRoomBooking.newSubTab( 'management', _('Management'), url_for('rooms_admin.roomBooking-admin') )
class WPRoomsBase(WPAdminsBase): sidemenu_option = 'rb' def _createTabCtrl(self): self._tabCtrl = TabControl() if session.user.is_admin: self._subTabRoomBooking = self._tabCtrl.newTab( 'booking', _('Room Booking'), url_for('rooms_admin.settings') ) self._subTabMain = self._subTabRoomBooking.newSubTab( 'settings', _('Settings'), url_for('rooms_admin.settings') ) else: self._subTabRoomBooking = self._tabCtrl.newTab( 'booking', _('Room Booking'), url_for('rooms_admin.roomBooking-admin') ) self._subTabConfig = self._subTabRoomBooking.newSubTab( 'management', _('Management'), url_for('rooms_admin.roomBooking-admin') ) def _getPageContent(self, params): return WTabControl(self._tabCtrl).getHTML(self._getTabContent(params))
class WPRoomBookingEventBase(WPEventManagementLegacy): sidemenu_option = 'room_booking' bundles = ('module_rb.js', ) def _createTabCtrl(self): self._tabCtrl = TabControl() self._tabExistBookings = self._tabCtrl.newTab( 'existing', 'Existing Bookings', url_for('event_mgmt.rooms_booking_list', self.event)) self._tabNewBooking = self._tabCtrl.newTab( 'new', 'New Booking', url_for('event_mgmt.rooms_choose_event', self.event)) if not Reservation.query.with_parent(self.event).has_rows(): self._tabExistBookings.setEnabled(False) self._setActiveTab() def _getPageContent(self, params): self._createTabCtrl() params['event'] = self.event params['sprite_url'] = url_for( 'rooms_new.sprite', {'version': _cache.get('rooms-sprite-token')}) return WTabControl(self._tabCtrl).getHTML(self._getTabContent(params)) def _getTabContent(self, params): raise NotImplementedError
def _createTabCtrl(self): self._tabCtrl = TabControl() self._tabExistBookings = self._tabCtrl.newTab('existing', 'Existing Bookings', url_for('event_mgmt.rooms_booking_list', self.event)) self._tabNewBooking = self._tabCtrl.newTab('new', 'New Booking', url_for('event_mgmt.rooms_choose_event', self.event)) if not Reservation.query.with_parent(self.event).has_rows(): self._tabExistBookings.setEnabled(False) self._setActiveTab()
class WPRoomBookingEventBase(WPEventManagementLegacy): sidemenu_option = 'room_booking' def _createTabCtrl(self): self._tabCtrl = TabControl() self._tabExistBookings = self._tabCtrl.newTab('existing', 'Existing Bookings', url_for('event_mgmt.rooms_booking_list', self.event)) self._tabNewBooking = self._tabCtrl.newTab('new', 'New Booking', url_for('event_mgmt.rooms_choose_event', self.event)) if not Reservation.query.with_parent(self.event).has_rows(): self._tabExistBookings.setEnabled(False) self._setActiveTab() def _getPageContent(self, params): self._createTabCtrl() params['event'] = self.event params['sprite_url'] = url_for('rooms_new.sprite', {'version': _cache.get('rooms-sprite-token')}) return WTabControl(self._tabCtrl).getHTML(self._getTabContent(params)) def _getTabContent(self, params): raise NotImplementedError
class WPRoomBookingEventBase(WPEventManagementLegacy): sidemenu_option = 'room_booking' def getJSFiles(self): return WPEventManagementLegacy.getJSFiles(self) + self._includeJSPackage('RoomBooking') def _createTabCtrl(self): self._tabCtrl = TabControl() self._tabExistBookings = self._tabCtrl.newTab('existing', 'Existing Bookings', url_for('event_mgmt.rooms_booking_list', self.event)) self._tabNewBooking = self._tabCtrl.newTab('new', 'New Booking', url_for('event_mgmt.rooms_choose_event', self.event)) if not Reservation.query.with_parent(self.event).has_rows(): self._tabExistBookings.setEnabled(False) self._setActiveTab() def _getPageContent(self, params): self._createTabCtrl() params['event'] = self.event return WTabControl(self._tabCtrl).getHTML(self._getTabContent(params)) def _getTabContent(self, params): raise NotImplementedError