More additions based on some discussion with Gunnar in IRC:
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 12 Sep 2009 15:06:36 +0000 (11:06 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 29 Sep 2009 20:54:00 +0000 (16:54 -0400)
 - Allow specifying if a resource is required or optional
 - Add a response_type property to resources. Specifies if REQUESTS are
   either always accepted, always denied, automatically accepted/denied
   based on actual availability, handled manually (still todo), or simply
   ignored (set response to NONE).

Also, try to clean up the implementation - trying to make it more likely
to be able to be extened for kolab. No idea if this helps of not though ;)

kronolith/lib/Resource/Base.php
kronolith/scripts/upgrades/2009-08-17_add_resources.sql

index 29ba9fc..0c82585 100644 (file)
@@ -12,17 +12,11 @@ abstract class Kronolith_Resource_Base
      *
      *   name        - Display name of resource.
      *   calendar    - The calendar associated with this resource.
-<<<<<<< HEAD
-     *
      *   description -
      *   email       -
      *   response_type - a RESPONSETYPE_* constant
-=======
      *   category    - The category of this resource...an arbitrary label used
      *                 to group multiple resources for the resource_group implementation
-     *   description -
->>>>>>> Lots of stuff:
-     *
      * @var array
      */
     protected $_params = array();
@@ -54,15 +48,9 @@ abstract class Kronolith_Resource_Base
     }
 
     /**
-<<<<<<< HEAD
      * Obtain the resource's internal identifier.
      *
      * @return mixed The id.
-=======
-     * Obtain the resource's internal id.
-     *
-     * @return integer  The id.
->>>>>>> Lots of stuff:
      */
     public function getId()
     {
index bc22852..a66d24a 100644 (file)
@@ -6,6 +6,8 @@ CREATE TABLE kronolith_resources (
     resource_calendar VARCHAR(255),
     resource_description TEXT,
     resource_category VARCHAR(255),
+    resource_response_type INT DEFAULT 0,
+    resource_max_reservations INT DEFAULT 1,
     
     PRIMARY KEY (resource_id)
 );