add resources in demo data
authorCornelius Weiß <c.weiss@metaways.de>
Thu, 8 Oct 2015 16:45:31 +0000 (18:45 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 14 Oct 2015 10:06:18 +0000 (12:06 +0200)
... and remove requirement of HR in CRM and Timetracker demo data

Change-Id: Id0a07b9bbbb8be98ef1913cc7fdb16c05f35bae5
Reviewed-on: http://gerrit.tine20.com/customers/2265
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/Setup/DemoData.php
tine20/Crm/Setup/DemoData.php
tine20/Timetracker/Setup/DemoData.php

index a40b3a7..41a503f 100644 (file)
@@ -127,6 +127,20 @@ class Calendar_Setup_DemoData extends Tinebase_Setup_DemoData_Abstract
         Tinebase_Container::getInstance()->addGrants($this->sharedCalendar->getId(), 'group', $group->getId(), $this->_userGrants, true);
         Tinebase_Container::getInstance()->addGrants($this->sharedCalendar->getId(), 'user', $this->_personas['sclever']->getId(), $this->_secretaryGrants, true);
 
+        // create some resorces as well
+        $this->_ressources = array();
+        $this->_ressources[] = Calendar_Controller_Resource::getInstance()->create(new Calendar_Model_Resource(array(
+            'name'                 => static::$_de ? 'Besprechnungsraum Mars (1.OG)' : 'Meeting Room Mars (first floor)',
+            'description'          => static::$_de ? 'Bis zu 10 Personen' : 'Up to 10 people',
+            'email'                => 'mars@tin20.com',
+            'is_location'          => TRUE,
+        )));
+        $this->_ressources[] = Calendar_Controller_Resource::getInstance()->create(new Calendar_Model_Resource(array(
+            'name'                 => static::$_de ? 'Besprechnungsraum Venus (2.OG)' : 'Meeting Room Venus (second floor)',
+            'description'          => static::$_de ? 'Bis zu 14 Personen' : 'Up to 14 people',
+            'email'                => 'venus@tin20.com',
+            'is_location'          => TRUE,
+        )));
     }
     
     /**
index 270dd03..e78d867 100644 (file)
@@ -41,7 +41,7 @@ class Crm_Setup_DemoData extends Tinebase_Setup_DemoData_Abstract
      * required apps
      * @var array
      */
-    protected static $_requiredApplications = array('Admin', 'Addressbook', 'Sales', 'HumanResources');
+    protected static $_requiredApplications = array('Admin', 'Addressbook', 'Sales');
         
     /**
      * private containers
index 8a9a1ea..36f5c09 100644 (file)
@@ -21,7 +21,7 @@ class Timetracker_Setup_DemoData extends Tinebase_Setup_DemoData_Abstract
      * 
      * @var array
      */
-    protected static $_requiredApplications = array('Admin', 'Sales', 'HumanResources');
+    protected static $_requiredApplications = array('Admin', 'Sales');
     
     /**
      * holds the instance of the singleton