Example #1
0
    def update(self):
        if 'remove' in self.request and utils.is_uuid(self.request['remove']):
            self.remove_reservation(self.request['remove'])

            self.request.response.redirect(self.context.absolute_url())

        super(YourReservations, self).update()
Example #2
0
    def highlight_group(self):
        """ Returns the group id to highlight when hovering over any result.
        As there is no reservation view with multiple groups, only one result
        can be returned.

        """
        if hasattr(self, 'group'):
            if utils.is_uuid(self.group):
                return utils.string_uuid(self.group)
        return u''
Example #3
0
    def highlight_group(self):
        """ Returns the group id to highlight when hovering over any result.
        As there is no reservation view with multiple groups, only one result
        can be returned.

        """
        if hasattr(self, 'group'):
            if utils.is_uuid(self.group):
                return utils.string_uuid(self.group)
        return u''
Example #4
0
 def get_object(obj):
     if is_uuid(obj):
         return UUID(obj), get_resource_by_uuid(obj)
     else:
         return UUID(obj.uuid()), obj
Example #5
0
 def body_classes(self):
     if utils.is_uuid(self.reservation):
         return ["single-reservation-view"]
 def transform_uuid(target):
     if utils.is_uuid(target):
         return utils.string_uuid(target)
     else:
         return target
 def transform_uuid(target):
     if utils.is_uuid(target):
         return utils.string_uuid(target)
     else:
         return target
Example #8
0
 def body_classes(self):
     if utils.is_uuid(self.reservation):
         return ['single-reservation-view']