def getVars(self): wvars = WTemplated.getVars(self) wvars['standalone'] = self._standalone room = wvars['room'] wvars['attrs'] = {attr.attribute.name: attr for attr in room.attributes if not attr.attribute.is_hidden or session.user.isRBAdmin()} wvars['owner_name'] = room.owner.getFullName() wvars['bookable_hours'] = room.bookable_hours.all() wvars['nonbookable_periods'] = room.nonbookable_periods.all() # URLs wvars['stats_url'] = UH.UHRoomBookingRoomStats.getURL(room) wvars['delete_room_url'] = url_for('rooms_admin.delete_room', room) wvars['modify_room_url'] = url_for('rooms_admin.modify_room', room) if not self._standalone: wvars['conference'] = self._rh._conf room_mapper = RoomMapperHolder().match({'placeName': self._rh._location.name}, exact=True) if room_mapper: wvars['show_on_map'] = room_mapper[0].getMapURL(self._rh._room.name) else: wvars['show_on_map'] = UH.UHRoomBookingMapOfRooms.getURL(roomID=self._rh._room.id) return wvars
def getURL(self, room, location=None): if location is not None and room is not None: res = RoomMapperHolder().match({"name": location.getName()}, exact=True) if res != []: return res[0].getMapURL(room.getName()) return ""
def _performSearch(self, criteria): return RoomMapperHolder().match(criteria)