fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16300] Syncromind: Merge 16189:16299 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [16300] Syncromind: Merge 16189:16299 from trunk
Date: Mon, 13 Feb 2017 10:29:59 -0500 (EST)

Revision: 16300
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16300
Author:   sigurdne
Date:     2017-02-13 10:29:58 -0500 (Mon, 13 Feb 2017)
Log Message:
-----------
Syncromind: Merge 16189:16299 from trunk

Modified Paths:
--------------
    
branches/dev-syncromind-2/activitycalendarfrontend/inc/class.hook_helper.inc.php
    branches/dev-syncromind-2/admin/inc/class.uiaccounts.inc.php
    branches/dev-syncromind-2/bookingfrontend/inc/class.hook_helper.inc.php
    branches/dev-syncromind-2/controller/templates/base/css/base.css
    branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.sovendor.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php
    branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php
    branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang
    branches/dev-syncromind-2/eventplanner/setup/setup.inc.php
    branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
    branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
    branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
    branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
    branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
    branches/dev-syncromind-2/eventplannerfrontend/home.php
    branches/dev-syncromind-2/eventplannerfrontend/inc/class.bouser.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/inc/class.hook_helper.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/inc/class.menu.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/inc/class.uibooking.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/inc/class.uivendor.inc.php
    
branches/dev-syncromind-2/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
    branches/dev-syncromind-2/eventplannerfrontend/inc/hook_config.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/index.php
    branches/dev-syncromind-2/eventplannerfrontend/login.php
    branches/dev-syncromind-2/eventplannerfrontend/setup/default_records.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/setup/setup.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/setup/tables_update.inc.php
    
branches/dev-syncromind-2/eventplannerfrontend/templates/base/application.xsl
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/booking.xsl
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/config.tpl
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/customer.xsl
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/events.xsl
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/vendor.xsl
    branches/dev-syncromind-2/helpdesk/inc/class.uitts.inc.php
    branches/dev-syncromind-2/helpdesk/templates/base/config.tpl
    branches/dev-syncromind-2/logistic/templates/base/css/base.css
    branches/dev-syncromind-2/mobilefrontend/inc/class.hook_helper.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/auth/class.auth_customsso.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.acl.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.locations.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.login.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.sessions.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.socommon.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.uicommon.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
    branches/dev-syncromind-2/phpgwapi/js/jquery/common.js
    
branches/dev-syncromind-2/phpgwapi/js/jquery/mmenu/core/css/jquery.mmenu.all.css
    branches/dev-syncromind-2/phpgwapi/setup/setup.inc.php
    branches/dev-syncromind-2/phpgwapi/setup/tables_current.inc.php
    branches/dev-syncromind-2/phpgwapi/setup/tables_update.inc.php
    branches/dev-syncromind-2/phpgwapi/templates/base/datatable_jquery.xsl
    branches/dev-syncromind-2/phpgwapi/templates/portico/js/base.js
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/HISTORY.md
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/LICENSE.md
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/README.md
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/base-context-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/base-context.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/base-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/base.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/buttons-core-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/buttons-core.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/buttons-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/buttons.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/forms-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/forms-nr-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/forms-nr.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/forms.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/global.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-core-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-core.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-min.css
    
branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-responsive-min.css
    
branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-responsive-old-ie-min.css
    
branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-responsive-old-ie.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-responsive.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-units-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids-units.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/grids.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-core-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-core.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-dropdown-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-dropdown.css
    
branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-horizontal-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-horizontal.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-min.css
    
branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-scrollable-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-scrollable.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-skin-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus-skin.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/menus.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure-nr-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure-nr.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/pure.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/tables-min.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/css/tables.css
    branches/dev-syncromind-2/phpgwapi/templates/pure/head.tpl
    branches/dev-syncromind-2/phpgwapi/templates/pure/navbar.inc.php
    branches/dev-syncromind-2/property/inc/class.botts.inc.php
    branches/dev-syncromind-2/property/inc/class.boworkorder.inc.php
    branches/dev-syncromind-2/property/inc/class.soXport.inc.php
    branches/dev-syncromind-2/property/inc/class.solocation.inc.php
    branches/dev-syncromind-2/property/inc/class.sotts.inc.php
    branches/dev-syncromind-2/property/inc/class.soworkorder.inc.php
    branches/dev-syncromind-2/property/inc/class.uiagreement.inc.php
    branches/dev-syncromind-2/property/inc/class.uientity.inc.php
    branches/dev-syncromind-2/property/inc/class.uigeneric.inc.php
    branches/dev-syncromind-2/property/inc/class.uiinvoice.inc.php
    branches/dev-syncromind-2/property/inc/class.uiinvoice2.inc.php
    branches/dev-syncromind-2/property/inc/class.uilocation.inc.php
    branches/dev-syncromind-2/property/inc/class.uiproject.inc.php
    branches/dev-syncromind-2/property/inc/class.uirequest.inc.php
    branches/dev-syncromind-2/property/inc/class.uis_agreement.inc.php
    branches/dev-syncromind-2/property/inc/class.uitts.inc.php
    branches/dev-syncromind-2/property/inc/class.uiwo_hour.inc.php
    branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
    
branches/dev-syncromind-2/property/inc/cron/default/Import_fra_agresso_X205.php
    
branches/dev-syncromind-2/property/inc/cron/default/Import_fra_agresso_X205_BK.php
    
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
    
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
    
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
    branches/dev-syncromind-2/property/js/portico/tts.view.js
    branches/dev-syncromind-2/property/js/portico/workorder.edit.js
    branches/dev-syncromind-2/property/setup/phpgw_no.lang
    branches/dev-syncromind-2/property/setup/tables_current.inc.php
    branches/dev-syncromind-2/property/templates/base/config.tpl
    branches/dev-syncromind-2/property/templates/base/css/base.css
    branches/dev-syncromind-2/property/templates/base/project.xsl
    branches/dev-syncromind-2/property/templates/base/workorder.xsl
    branches/dev-syncromind-2/registration/inc/class.boreg.inc.php
    branches/dev-syncromind-2/registration/inc/class.uireg.inc.php
    branches/dev-syncromind-2/registration/setup/phpgw_no.lang
    branches/dev-syncromind-2/registration/setup/setup.inc.php
    branches/dev-syncromind-2/registration/templates/base/config.tpl
    branches/dev-syncromind-2/registration/templates/base/fields.tpl
    branches/dev-syncromind-2/registration/templates/base/layout.tpl
    branches/dev-syncromind-2/registration/templates/base/lostpw_select.tpl
    branches/dev-syncromind-2/registration/templates/base/personal_info.tpl
    branches/dev-syncromind-2/registration/templates/base/tos.tpl
    branches/dev-syncromind-2/rental/inc/class.socomposite.inc.php
    branches/dev-syncromind-2/rental/inc/class.uicomposite.inc.php
    branches/dev-syncromind-2/rental/inc/class.uicontract.inc.php
    branches/dev-syncromind-2/rental/inc/class.uimovein.inc.php
    branches/dev-syncromind-2/rental/inc/model/class.composite.inc.php
    branches/dev-syncromind-2/rental/js/rental/party.edit.js
    branches/dev-syncromind-2/rental/setup/default_records.inc.php
    branches/dev-syncromind-2/rental/setup/phpgw_no.lang
    branches/dev-syncromind-2/rental/setup/setup.inc.php
    branches/dev-syncromind-2/rental/setup/tables_current.inc.php
    branches/dev-syncromind-2/rental/setup/tables_update.inc.php
    branches/dev-syncromind-2/rental/templates/base/composite.xsl
    branches/dev-syncromind-2/rental/templates/base/party.xsl

Added Paths:
-----------
    branches/dev-syncromind-2/eventplanner/inc/class.bocustomer_report.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.boevents.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.socustomer_report.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.soevents.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php
    
branches/dev-syncromind-2/eventplanner/inc/model/class.customer_report.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.events.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.permission.inc.php
    branches/dev-syncromind-2/eventplanner/js/portico/permission.edit.js
    branches/dev-syncromind-2/eventplanner/templates/base/permission.xsl
    branches/dev-syncromind-2/eventplanner/templates/base/report.xsl
    
branches/dev-syncromind-2/eventplannerfrontend/inc/class.uiapplication.inc.php
    
branches/dev-syncromind-2/eventplannerfrontend/inc/class.uicustomer_report.inc.php
    
branches/dev-syncromind-2/eventplannerfrontend/inc/class.uimetasettings.inc.php
    branches/dev-syncromind-2/eventplannerfrontend/inc/model/
    branches/dev-syncromind-2/eventplannerfrontend/session.php
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/css/
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/home.xsl
    
branches/dev-syncromind-2/eventplannerfrontend/templates/base/metasettings.xsl
    branches/dev-syncromind-2/eventplannerfrontend/templates/base/report.xsl
    branches/dev-syncromind-2/phpgwapi/templates/frontend/
    
branches/dev-syncromind-2/property/inc/cron/default/Import_fra_agresso_X205_BK_vedlegg.php
    
branches/dev-syncromind-2/registration/templates/base/css/rainbow_baby-blue.css

Removed Paths:
-------------
    branches/dev-syncromind-2/eventplanner/inc/class.boresource.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.soresource.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php
    branches/dev-syncromind-2/eventplanner/inc/model/class.resource.inc.php
    branches/dev-syncromind-2/eventplanner/templates/base/vendor_report.xsl
    branches/dev-syncromind-2/eventplannerfrontend/css/
    
branches/dev-syncromind-2/eventplannerfrontend/inc/custom/default/Altinn_Bergen_kommune.php
    
branches/dev-syncromind-2/eventplannerfrontend/templates/base/vendor_report.xsl
    branches/dev-syncromind-2/registration/templates/base/css/base.css

Property Changed:
----------------
    branches/dev-syncromind-2/
    branches/dev-syncromind-2/bookingfrontend/

Index: branches/dev-syncromind-2
===================================================================
--- branches/dev-syncromind-2   2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2   2017-02-13 15:29:58 UTC (rev 16300)

Property changes on: branches/dev-syncromind-2
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind:13653
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128,16131-16187
\ No newline at end of property
+/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128,16131-16187,16190-16299
\ No newline at end of property
Modified: 
branches/dev-syncromind-2/activitycalendarfrontend/inc/class.hook_helper.inc.php
===================================================================
--- 
branches/dev-syncromind-2/activitycalendarfrontend/inc/class.hook_helper.inc.php
    2017-02-13 11:21:25 UTC (rev 16299)
+++ 
branches/dev-syncromind-2/activitycalendarfrontend/inc/class.hook_helper.inc.php
    2017-02-13 15:29:58 UTC (rev 16300)
@@ -30,23 +30,34 @@
         */
        class activitycalendarfrontend_hook_helper
        {
+               private $perform_action = false;
 
-               public function set_cookie_domain()
+               public function __construct()
                {
                        $script_path = 
dirname(phpgw::get_var('SCRIPT_FILENAME', 'string', 'SERVER'));
-                       
+
                        if(preg_match('/activitycalendarfrontend/', 
$script_path))
                        {
-                               //get from local config
-                               $config = CreateObject('phpgwapi.config', 
'activitycalendarfrontend');
-                               $config->read();
+                               $this->perform_action = true;
+                       }
+               }
 
-                               
$GLOBALS['phpgw_info']['server']['cookie_domain'] = 
!empty($GLOBALS['phpgw_info']['server']['cookie_domain']) ? 
$GLOBALS['phpgw_info']['server']['cookie_domain'] : '';
+               public function set_cookie_domain()
+               {
+                       if(!$this->perform_action)
+                       {
+                               return;
+                       }
 
-                               if 
(!empty($config->config_data['cookie_domain']))
-                               {
-                                       
$GLOBALS['phpgw_info']['server']['cookie_domain'] = 
$config->config_data['cookie_domain'];
-                               }
-                       }
+                       //get from local config
+                       $config = CreateObject('phpgwapi.config', 
'activitycalendarfrontend');
+                       $config->read();
+
+                       $GLOBALS['phpgw_info']['server']['cookie_domain'] = 
!empty($GLOBALS['phpgw_info']['server']['cookie_domain']) ? 
$GLOBALS['phpgw_info']['server']['cookie_domain'] : '';
+
+                       if (!empty($config->config_data['cookie_domain']))
+                       {
+                               
$GLOBALS['phpgw_info']['server']['cookie_domain'] = 
$config->config_data['cookie_domain'];
+                       }                       
                }
        }
\ No newline at end of file

Modified: branches/dev-syncromind-2/admin/inc/class.uiaccounts.inc.php
===================================================================
--- branches/dev-syncromind-2/admin/inc/class.uiaccounts.inc.php        
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/admin/inc/class.uiaccounts.inc.php        
2017-02-13 15:29:58 UTC (rev 16300)
@@ -108,7 +108,7 @@
                                && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::EDIT, 'admin')
                                && 
!$GLOBALS['phpgw']->acl->check('group_access', phpgwapi_acl::PRIV, 'admin') )
                        {
-                               return;
+                               return $this->jquery_results(array('results' => 
array(), 'total_records' => 0));
                        }
 
                        $type = phpgw::get_var('type');

Index: branches/dev-syncromind-2/bookingfrontend
===================================================================
--- branches/dev-syncromind-2/bookingfrontend   2017-02-13 11:21:25 UTC (rev 
16299)
+++ branches/dev-syncromind-2/bookingfrontend   2017-02-13 15:29:58 UTC (rev 
16300)

Property changes on: branches/dev-syncromind-2/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
 /branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997,16131-16187
\ No newline at end of property
+/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997,16131-16187,16190-16299
\ No newline at end of property
Modified: 
branches/dev-syncromind-2/bookingfrontend/inc/class.hook_helper.inc.php
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/inc/class.hook_helper.inc.php     
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/bookingfrontend/inc/class.hook_helper.inc.php     
2017-02-13 15:29:58 UTC (rev 16300)
@@ -31,23 +31,33 @@
        class bookingfrontend_hook_helper
        {
 
+               private $perform_action = false;
 
-               public function set_cookie_domain()
+               public function __construct()
                {
                        $script_path = 
dirname(phpgw::get_var('SCRIPT_FILENAME', 'string', 'SERVER'));
-                       
+
                        if(preg_match('/bookingfrontend/', $script_path))
                        {
-                               //get from local config
-                               $config = CreateObject('phpgwapi.config', 
'bookingfrontend');
-                               $config->read();
+                               $this->perform_action = true;
+                       }
+               }
 
-                               
$GLOBALS['phpgw_info']['server']['cookie_domain'] = 
!empty($GLOBALS['phpgw_info']['server']['cookie_domain']) ? 
$GLOBALS['phpgw_info']['server']['cookie_domain'] : '';
+               public function set_cookie_domain()
+               {
+                       if(!$this->perform_action)
+                       {
+                               return;
+                       }
+                       //get from local config
+                       $config = CreateObject('phpgwapi.config', 
'bookingfrontend');
+                       $config->read();
 
-                               if 
(!empty($config->config_data['cookie_domain']))
-                               {
-                                       
$GLOBALS['phpgw_info']['server']['cookie_domain'] = 
$config->config_data['cookie_domain'];
-                               }
+                       $GLOBALS['phpgw_info']['server']['cookie_domain'] = 
!empty($GLOBALS['phpgw_info']['server']['cookie_domain']) ? 
$GLOBALS['phpgw_info']['server']['cookie_domain'] : '';
+
+                       if (!empty($config->config_data['cookie_domain']))
+                       {
+                               
$GLOBALS['phpgw_info']['server']['cookie_domain'] = 
$config->config_data['cookie_domain'];
                        }
                }
        }
\ No newline at end of file

Modified: branches/dev-syncromind-2/controller/templates/base/css/base.css
===================================================================
--- branches/dev-syncromind-2/controller/templates/base/css/base.css    
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/controller/templates/base/css/base.css    
2017-02-13 15:29:58 UTC (rev 16300)
@@ -1552,7 +1552,6 @@
 
 #queryForm {
   clear: both;
-  margin: 20px;
   overflow: hidden;
 }
 

Copied: 
branches/dev-syncromind-2/eventplanner/inc/class.bocustomer_report.inc.php 
(from rev 16299, trunk/eventplanner/inc/class.bocustomer_report.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bocustomer_report.inc.php  
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bocustomer_report.inc.php  
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,112 @@
+<?php
+       /**
+        * phpGroupWare
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License v2 or later
+        * @internal
+        * @package eventplanner
+        * @subpackage customer_report
+        * @version $Id:$
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU Lesser General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+       phpgw::import_class('phpgwapi.bocommon');
+       phpgw::import_class('eventplanner.socustomer_report');
+
+       include_class('eventplanner', 'customer_report', 'inc/model/');
+
+       class eventplanner_bocustomer_report extends phpgwapi_bocommon
+       {
+               protected static
+                       $bo,
+                       $fields,
+                       $acl_location;
+
+               public $cats;
+
+               public function __construct()
+               {
+                       $this->fields = 
eventplanner_customer_report::get_fields();
+                       $this->acl_location = 
eventplanner_customer_report::acl_location;
+                       $this->cats = CreateObject('phpgwapi.categories', -1, 
'eventplanner', $this->acl_location);
+                       $this->cats->supress_info = true;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       if (self::$bo == null)
+                       {
+                               self::$bo = new 
eventplanner_bocustomer_report();
+                       }
+                       return self::$bo;
+               }
+
+               public function store($object)
+               {
+                       $this->store_pre_commit($object);
+                       $ret = 
eventplanner_socustomer_report::get_instance()->store($object);
+                       $this->store_post_commit($object);
+                       return $ret;
+               }
+
+               public function read($params)
+               {
+                       if (isset($params['filters']['category_id']) && 
$params['filters']['category_id'] > 0)
+                       {
+                               $category_id = 
$params['filters']['category_id'];
+                               $cat_list = $this->cats->return_sorted_array(0, 
false, '', '', '', false, $category_id, false);
+                               $cat_filter = array($category_id);
+                               foreach ($cat_list as $_category)
+                               {
+                                       $cat_filter[] = $_category['id'];
+                               }
+                               $params['filters']['category_id'] = $cat_filter;
+                       }
+
+                       $values =  
eventplanner_socustomer_report::get_instance()->read($params);
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       foreach ($values['results'] as &$entry)
+                       {
+                               $entry['created'] = 
$GLOBALS['phpgw']->common->show_date($entry['created']);
+                               $entry['modified'] = 
$GLOBALS['phpgw']->common->show_date($entry['modified']);
+                               $entry['date_start'] = 
$GLOBALS['phpgw']->common->show_date($entry['date_start'], $dateformat);
+                               $entry['date_end'] = 
$GLOBALS['phpgw']->common->show_date($entry['date_end'], $dateformat);
+                       }
+                       return $values;
+               }
+
+               public function read_single($id, $return_object = true)
+               {
+                       if ($id)
+                       {
+                               $values = 
eventplanner_socustomer_report::get_instance()->read_single($id, 
$return_object);
+                       }
+                       else
+                       {
+                               $values = new eventplanner_customer_report();
+                       }
+
+                       return $values;
+               }
+       }
\ No newline at end of file

Copied: branches/dev-syncromind-2/eventplanner/inc/class.boevents.inc.php (from 
rev 16299, trunk/eventplanner/inc/class.boevents.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.boevents.inc.php           
                (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.boevents.inc.php   
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,115 @@
+<?php
+       /**
+        * phpGroupWare
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License v2 or later
+        * @internal
+        * @package eventplanner
+        * @subpackage application
+        * @version $Id:$
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU Lesser General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+       phpgw::import_class('phpgwapi.bocommon');
+       phpgw::import_class('eventplanner.soevents');
+
+       include_class('eventplanner', 'application', 'inc/model/');
+
+       class eventplanner_boevents extends phpgwapi_bocommon
+       {
+               protected static
+                       $bo,
+                       $fields,
+                       $acl_location;
+
+               public $cats;
+
+               public function __construct()
+               {
+                       $this->fields = eventplanner_application::get_fields();
+                       $this->acl_location = 
eventplanner_application::acl_location;
+                       $this->cats = CreateObject('phpgwapi.categories', -1, 
'eventplanner', $this->acl_location);
+                       $this->cats->supress_info = true;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       if (self::$bo == null)
+                       {
+                               self::$bo = new eventplanner_boevents();
+                       }
+                       return self::$bo;
+               }
+
+               /**
+                * Nothing to store - just reporting
+                * @param type $object
+                */
+               public function store($object)
+               {
+               }
+
+               public function read($params)
+               {
+                       if (isset($params['filters']['category_id']) && 
$params['filters']['category_id'] > 0)
+                       {
+                               $category_id = 
$params['filters']['category_id'];
+                               $cat_list = $this->cats->return_sorted_array(0, 
false, '', '', '', false, $category_id, false);
+                               $cat_filter = array($category_id);
+                               foreach ($cat_list as $_category)
+                               {
+                                       $cat_filter[] = $_category['id'];
+                               }
+                               $params['filters']['category_id'] = $cat_filter;
+                       }
+
+                       $values =  
eventplanner_soevents::get_instance()->read($params);
+                       $status_text = 
eventplanner_application::get_status_list();
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       foreach ($values['results'] as &$entry)
+                       {
+                               $entry['status'] = 
$status_text[$entry['status']];
+                               $entry['created'] = 
$GLOBALS['phpgw']->common->show_date($entry['created']);
+                               $entry['modified'] = 
$GLOBALS['phpgw']->common->show_date($entry['modified']);
+                               $entry['date_start'] = 
$GLOBALS['phpgw']->common->show_date($entry['date_start'], $dateformat);
+                               $entry['date_end'] = 
$GLOBALS['phpgw']->common->show_date($entry['date_end'], $dateformat);
+                               $entry['case_officer_id'] = 
$entry['case_officer_id'] ? 
$GLOBALS['phpgw']->accounts->get($entry['case_officer_id'])->__toString() : '';
+                       }
+                       return $values;
+               }
+
+               public function read_single($id, $return_object = true)
+               {
+                       if ($id)
+                       {
+                               $values = 
eventplanner_soevents::get_instance()->read_single($id, $return_object);
+                       }
+                       else
+                       {
+                               $values = new eventplanner_application();
+                       }
+
+                       return $values;
+               }
+       }
\ No newline at end of file

Copied: branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php 
(from rev 16299, trunk/eventplanner/inc/class.bopermission.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php       
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php       
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,123 @@
+<?php
+       /**
+        * phpGroupWare
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License v2 or later
+        * @internal
+        * @package eventplanner
+        * @subpackage permission
+        * @version $Id:$
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU Lesser General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+       phpgw::import_class('phpgwapi.bocommon');
+       phpgw::import_class('eventplanner.sopermission');
+
+       include_class('eventplanner', 'permission', 'inc/model/');
+
+       class eventplanner_bopermission extends phpgwapi_bocommon
+       {
+               protected static
+                       $bo,
+                       $fields,
+                       $acl_location;
+
+               public function __construct()
+               {
+                       $this->fields = eventplanner_permission::get_fields();
+                       $this->acl_location = 
eventplanner_permission::acl_location;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       if (self::$bo == null)
+                       {
+                               self::$bo = new eventplanner_bopermission();
+                       }
+                       return self::$bo;
+               }
+
+               public function store($object)
+               {
+                       $this->store_pre_commit($object);
+                       $ret = 
eventplanner_sopermission::get_instance()->store($object);
+                       $this->store_post_commit($object);
+                       return $ret;
+               }
+
+               public function read($params)
+               {
+                       if(empty($params['filters']['active']))
+                       {
+                               $params['filters']['active'] = 1;
+                       }
+                       else
+                       {
+                               unset($params['filters']['active']);
+                       }
+
+                       $organization_number = 
phpgw::get_var('organization_number', 'bool');
+                       $values =  
eventplanner_sopermission::get_instance()->read($params);
+       //              $status_text = 
eventplanner_permission::get_status_list();
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       foreach ($values['results'] as &$entry)
+                       {
+       //                              $entry['status'] = 
$status_text[$entry['status']];
+                                       if($organization_number)
+                                       {
+                                               $entry['name'] .= " 
[{$entry['organization_number']}]";
+                                       }
+                                       $entry['created'] = 
$GLOBALS['phpgw']->common->show_date($entry['created']);
+                                       $entry['modified'] = 
$GLOBALS['phpgw']->common->show_date($entry['modified']);
+                       }
+                       return $values;
+               }
+
+               public function read_single($id, $return_object = true)
+               {
+                       phpgw::import_class('eventplanner.sovendor');
+                       phpgw::import_class('eventplanner.socustomer');
+
+                       if ($id)
+                       {
+                               $values = 
eventplanner_sopermission::get_instance()->read_single($id, $return_object);
+                               //Temporary hack...
+                               if($values->object_type == 'vendor')
+                               {
+                                       $object = 
eventplanner_sovendor::get_instance()->read_single($values->object_id, 
$return_object);
+                               }
+                               if($values->object_type == 'customer')
+                               {
+                                       $object = 
eventplanner_socustomer::get_instance()->read_single($values->object_id, 
$return_object);
+                               }
+                               $values->object_name = $object->name;
+                       }
+                       else
+                       {
+                               $values = new eventplanner_permission();
+                       }
+
+                       return $values;
+               }
+       }
\ No newline at end of file

Deleted: branches/dev-syncromind-2/eventplanner/inc/class.boresource.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.boresource.inc.php 
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.boresource.inc.php 
2017-02-13 15:29:58 UTC (rev 16300)
@@ -1,98 +0,0 @@
-<?php
-       /**
-        * phpGroupWare
-        *
-        * @author Sigurd Nes <address@hidden>
-        * @copyright Copyright (C) 2016 Free Software Foundation 
http://www.fsf.org/
-        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License v2 or later
-        * @internal
-        * @package eventplanner
-        * @subpackage resource
-        * @version $Id:$
-        */
-
-       /*
-          This program is free software: you can redistribute it and/or modify
-          it under the terms of the GNU General Public License as published by
-          the Free Software Foundation, either version 2 of the License, or
-          (at your option) any later version.
-
-          This program is distributed in the hope that it will be useful,
-          but WITHOUT ANY WARRANTY; without even the implied warranty of
-          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-          GNU Lesser General Public License for more details.
-
-          You should have received a copy of the GNU General Public License
-          along with this program.  If not, see <http://www.gnu.org/licenses/>.
-        */
-
-       phpgw::import_class('phpgwapi.bocommon');
-       phpgw::import_class('eventplanner.soresource');
-
-       include_class('eventplanner', 'resource', 'inc/model/');
-
-       class eventplanner_boresource extends phpgwapi_bocommon
-       {
-               protected static
-                       $bo,
-                       $fields,
-                       $acl_location;
-
-               public function __construct()
-               {
-                       $this->fields = eventplanner_resource::get_fields();
-                       $this->acl_location = 
eventplanner_resource::acl_location;
-               }
-
-               /**
-                * Implementing classes must return an instance of itself.
-                *
-                * @return the class instance.
-                */
-               public static function get_instance()
-               {
-                       if (self::$bo == null)
-                       {
-                               self::$bo = new eventplanner_boresource();
-                       }
-                       return self::$bo;
-               }
-
-               public function store($object)
-               {
-                       $this->store_pre_commit($object);
-                       $ret = 
eventplanner_soresource::get_instance()->store($object);
-                       $this->store_post_commit($object);
-                       return $ret;
-               }
-
-               public function read($params)
-               {
-                       $values =  
eventplanner_soresource::get_instance()->read($params);
-                       $status_text = eventplanner_resource::get_status_list();
-                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-                       foreach ($values['results'] as &$entry)
-                       {
-                                       $entry['status'] = 
$status_text[$entry['status']];
-                                       $entry['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['entry_date']);
-                                       $entry['date_start'] = 
$GLOBALS['phpgw']->common->show_date($entry['date_start'], $dateformat);
-                                       $entry['date_end'] = 
$GLOBALS['phpgw']->common->show_date($entry['date_end'], $dateformat);
-                                       $entry['executive_officer'] = 
$entry['executive_officer'] ? 
$GLOBALS['phpgw']->accounts->get($entry['executive_officer'])->__toString() : 
'';
-                       }
-                       return $values;
-               }
-
-               public function read_single($id, $return_object = true)
-               {
-                       if ($id)
-                       {
-                               $values = 
eventplanner_soresource::get_instance()->read_single($id, $return_object);
-                       }
-                       else
-                       {
-                               $values = new eventplanner_resource();
-                       }
-
-                       return $values;
-               }
-       }
\ No newline at end of file

Modified: branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php       
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php       
2017-02-13 15:29:58 UTC (rev 16300)
@@ -73,6 +73,11 @@
                                                'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'preferences.uiadmin_acl.list_acl',
                                                        'acl_app' => 
'eventplanner'))
                                        ),
+                                       'permission'    => array
+                                       (
+                                               'text'  => lang('permission'),
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'eventplanner.uipermission.index') )
+                                       ),
                                        'list_atrribs' => array(
                                                'text' => 
$GLOBALS['phpgw']->translation->translate('custom fields', array(), true),
                                                'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'admin.ui_custom.list_attribute',

Modified: branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php      
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php      
2017-02-13 15:29:58 UTC (rev 16300)
@@ -37,6 +37,7 @@
                {
                        parent::__construct('eventplanner_application', 
eventplanner_application::get_fields());
                        $this->acl_location = 
eventplanner_application::acl_location;
+                       $this->use_acl = true;
                        $this->cats = CreateObject('phpgwapi.categories', -1, 
'eventplanner', $this->acl_location);
                        $this->cats->supress_info = true;
                }
@@ -55,7 +56,76 @@
                        return self::$so;
                }
 
+               public function _get_cols_and_joins( $filters = array() )
+               {
+                       $cols_joins = parent::_get_cols_and_joins($filters);
 
+                       $cols = $cols_joins[0];
+                       $joins = $cols_joins[1];
+
+                       $joins[] = " JOIN eventplanner_vendor on 
eventplanner_vendor.id=eventplanner_application.vendor_id";
+
+                       return array($cols, $joins);
+               }
+
+
+               function get_acl_condition( )
+               {
+                       $clause = '';
+
+                       if($this->use_acl && $this->currentapp && 
$this->acl_location)
+                       {
+                               $paranthesis = false;
+
+                               $grants = 
$this->acl->get_grants2($this->currentapp, $this->acl_location);
+                               $public_user_list = array();
+                               if (is_array($grants['accounts']) && 
$grants['accounts'])
+                               {
+                                       foreach($grants['accounts'] as $user => 
$_right)
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       unset($user);
+                                       reset($public_user_list);
+                                       $clause .= 
"({$this->table_name}.owner_id IN(" . implode(',', $public_user_list) . ")";
+                                       $paranthesis = true;
+                               }
+
+                               $public_group_list = array();
+                               if (is_array($grants['groups']) && 
$grants['groups'])
+                               {
+                                       foreach($grants['groups'] as $user => 
$_right)
+                                       {
+                                               $public_group_list[] = $user;
+                                       }
+                                       unset($user);
+                                       reset($public_group_list);
+                                       $where = $public_user_list ? 'OR' : 
'AND';
+                                       if(!$paranthesis)
+                                       {
+                                               $clause .='(';
+                                       }
+                                       $clause .= " $where 
phpgw_group_map.group_id IN(" . implode(',', $public_group_list) . ")";
+
+                                       $paranthesis = true;
+                               }
+
+                               if($this->currentapp == 'eventplannerfrontend')
+                               {
+                                       $where = $clause ? 'OR' : 'AND';
+                                       $org_id = 
phpgw::get_var('org_id','string' , 'SESSION', -1);
+                                       $clause .= " {$where} 
eventplanner_vendor.organization_number = '{$org_id}'";
+                               }
+
+                               if($paranthesis)
+                               {
+                                       $clause .=')';
+                               }
+                       }
+
+                       return $clause;
+               }
+
                protected function populate( array $data )
                {
                        $object = new eventplanner_application();

Modified: branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php 
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php 
2017-02-13 15:29:58 UTC (rev 16300)
@@ -27,6 +27,7 @@
         * @version $Id: $
         */
        phpgw::import_class('phpgwapi.socommon');
+       include_class('eventplanner', 'customer', 'inc/model/');
 
        class eventplanner_socustomer extends phpgwapi_socommon
        {
@@ -36,6 +37,8 @@
                public function __construct()
                {
                        parent::__construct('eventplanner_customer', 
eventplanner_customer::get_fields());
+                       $this->acl_location = 
eventplanner_customer::acl_location;
+                       $this->use_acl = true;
                }
 
                /**

Copied: 
branches/dev-syncromind-2/eventplanner/inc/class.socustomer_report.inc.php 
(from rev 16299, trunk/eventplanner/inc/class.socustomer_report.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.socustomer_report.inc.php  
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.socustomer_report.inc.php  
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,138 @@
+<?php
+       /**
+        * phpGroupWare - property: a part of a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage customer_report
+        * @version $Id: $
+        */
+       phpgw::import_class('phpgwapi.socommon');
+
+       class eventplanner_socustomer_report extends phpgwapi_socommon
+       {
+
+               protected static $so;
+
+               public function __construct()
+               {
+                       
parent::__construct('eventplanner_booking_customer_report', 
eventplanner_customer_report::get_fields());
+                       $this->acl_location = 
eventplanner_customer_report::acl_location;
+                       $this->cats = CreateObject('phpgwapi.categories', -1, 
'eventplanner', $this->acl_location);
+                       $this->cats->supress_info = true;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       if (self::$so == null)
+                       {
+                               self::$so = 
CreateObject('eventplanner.socustomer_report');
+                       }
+                       return self::$so;
+               }
+
+
+               protected function populate( array $data )
+               {
+                       $object = new eventplanner_customer_report();
+                       foreach ($this->fields as $field => $field_info)
+                       {
+                               $object->set_field($field, $data[$field]);
+                       }
+
+                       return $object;
+               }
+
+               function get_category_name( $cat_id )
+               {
+                       static $category_name = array();
+
+                       if (!isset($category_name[$cat_id]))
+                       {
+                               $category = $this->cats->return_single($cat_id);
+                               $category_name[$cat_id] = $category[0]['name'];
+                       }
+                       return $category_name[$cat_id];
+               }
+
+               protected function update( $object )
+               {
+                       $this->db->transaction_begin();
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+
+                       $original = 
$this->read_single($object->get_id());//returned as array()
+                       foreach ($this->fields as $field => $params)
+                       {
+                               $new_value = $object->$field;
+                               $old_value = $original[$field];
+                               if (!empty($params['history']) && ($new_value 
!= $old_value))
+                               {
+                                       $label = !empty($params['label']) ? 
lang($params['label']) : $field;
+                                       switch ($field)
+                                       {
+                                               case 'status':
+                                                       $old_value = 
$status_text[$old_value];
+                                                       $new_value = 
$status_text[$new_value];
+                                                       break;
+                                               case 'date_start':
+                                               case 'date_end':
+                                                       $old_value = 
$GLOBALS['phpgw']->common->show_date($old_value, $dateformat);
+                                                       $new_value = 
$GLOBALS['phpgw']->common->show_date($new_value, $dateformat);
+
+                                                       break;
+                                               case 'case_officer_id':
+                                                       $old_value = $old_value 
? $GLOBALS['phpgw']->accounts->get($old_value)->__toString() : '';
+                                                       $new_value = $new_value 
? $GLOBALS['phpgw']->accounts->get($new_value)->__toString() : '';
+                                                       break;
+                                               case 'category_id':
+                                                       $old_value = $old_value 
? $this->get_category_name($old_value) : '';
+                                                       $new_value = $new_value 
? $this->get_category_name($new_value) : '';
+                                                       break;
+                                               default:
+                                                       break;
+                                       }
+                                       $value_set = array
+                                       (
+                                               'customer_report_id'    => 
$object->get_id(),
+                                               'time'          => time(),
+                                               'author'        => 
$GLOBALS['phpgw_info']['user']['fullname'],
+                                               'comment'       => $label . ':: 
' . lang('old value') . ': ' . $this->db->db_addslashes($old_value) . ', ' 
.lang('new value') . ': ' . $this->db->db_addslashes($new_value),
+                                               'type'  => 'history',
+                                       );
+
+                                       $this->db->query( 'INSERT INTO 
eventplanner_customer_report_comment (' .  implode( ',', array_keys( $value_set 
) )   . ') VALUES ('
+                                       . $this->db->validate_insert( 
array_values( $value_set ) ) . ')',__LINE__,__FILE__);
+                               }
+
+                       }
+
+                       parent::update($object);
+
+                       return  $this->db->transaction_commit();
+               }
+
+       }
\ No newline at end of file

Copied: branches/dev-syncromind-2/eventplanner/inc/class.soevents.inc.php (from 
rev 16299, trunk/eventplanner/inc/class.soevents.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.soevents.inc.php           
                (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.soevents.inc.php   
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,63 @@
+<?php
+       /**
+        * phpGroupWare - property: a part of a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage application
+        * @version $Id: $
+        */
+       phpgw::import_class('eventplanner.soapplication');
+
+       class eventplanner_soevents extends eventplanner_soapplication
+       {
+
+               protected static $so;
+
+               public function __construct()
+               {
+                       parent::__construct();
+                       $this->use_acl = false;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       if (self::$so == null)
+                       {
+                               self::$so = 
CreateObject('eventplanner.soevents');
+                       }
+                       return self::$so;
+               }
+
+
+
+
+               protected function update( $object )
+               {
+                       //nothing;
+               }
+       }
\ No newline at end of file

Copied: branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php 
(from rev 16299, trunk/eventplanner/inc/class.sopermission.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php       
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php       
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,116 @@
+<?php
+       /**
+        * phpGroupWare - property: a part of a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage permission
+        * @version $Id: $
+        */
+       phpgw::import_class('phpgwapi.socommon');
+
+       class eventplanner_sopermission extends phpgwapi_socommon
+       {
+
+               protected static $so;
+
+               public function __construct()
+               {
+                       parent::__construct('eventplanner_permission', 
eventplanner_permission::get_fields());
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       if (self::$so == null)
+                       {
+                               self::$so = 
CreateObject('eventplanner.sopermission');
+                       }
+                       return self::$so;
+               }
+
+
+               protected function populate( array $data )
+               {
+                       $object = new eventplanner_permission();
+                       foreach ($this->fields as $field => $field_info)
+                       {
+                               $object->set_field($field, $data[$field]);
+                       }
+
+                       return $object;
+               }
+
+               protected function update( $object )
+               {
+                       $this->db->transaction_begin();
+       //              $status_text = 
eventplanner_permission::get_status_list();
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       $lang_active = lang('active');
+                       $lang_inactive = lang('inactive');
+
+                       $original = 
$this->read_single($object->get_id());//returned as array()
+                       foreach ($this->fields as $field => $params)
+                       {
+                               $new_value = $object->$field;
+                               $old_value = $original[$field];
+                               if (!empty($params['history']) && ($new_value 
!= $old_value))
+                               {
+                                       $label = !empty($params['label']) ? 
lang($params['label']) : $field;
+                                       switch ($field)
+                                       {
+                                               case 'status':
+                                                       $old_value = 
$status_text[$old_value];
+                                                       $new_value = 
$status_text[$new_value];
+                                                       break;
+                                               case 'active':
+                                                       $old_value = $old_value 
? $lang_active : $lang_inactive;
+                                                       $new_value = $new_value 
? $lang_active : $lang_inactive;
+                                                       break;
+                                               default:
+                                                       break;
+                                       }
+                                       $value_set = array
+                                       (
+                                               'permission_id' => 
$object->get_id(),
+                                               'time'          => time(),
+                                               'author'        => 
$GLOBALS['phpgw_info']['user']['fullname'],
+                                               'comment'       => $label . ':: 
' . lang('old value') . ': ' . $this->db->db_addslashes($old_value) . ', ' 
.lang('new value') . ': ' . $this->db->db_addslashes($new_value),
+                                               'type'  => 'history',
+                                       );
+
+                                       $this->db->query( 'INSERT INTO 
eventplanner_permission_comment (' .  implode( ',', array_keys( $value_set ) )  
 . ') VALUES ('
+                                       . $this->db->validate_insert( 
array_values( $value_set ) ) . ')',__LINE__,__FILE__);
+                               }
+
+                       }
+
+                       parent::update($object);
+
+                       return  $this->db->transaction_commit();
+               }
+
+       }
\ No newline at end of file

Deleted: branches/dev-syncromind-2/eventplanner/inc/class.soresource.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.soresource.inc.php 
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.soresource.inc.php 
2017-02-13 15:29:58 UTC (rev 16300)
@@ -1,120 +0,0 @@
-<?php
-       /**
-        * phpGroupWare - property: a part of a Facilities Management System.
-        *
-        * @author Sigurd Nes <address@hidden>
-        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
-        * This file is part of phpGroupWare.
-        *
-        * phpGroupWare is free software; you can redistribute it and/or modify
-        * it under the terms of the GNU General Public License as published by
-        * the Free Software Foundation; either version 2 of the License, or
-        * (at your option) any later version.
-        *
-        * phpGroupWare is distributed in the hope that it will be useful,
-        * but WITHOUT ANY WARRANTY; without even the implied warranty of
-        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-        * GNU General Public License for more details.
-        *
-        * You should have received a copy of the GNU General Public License
-        * along with phpGroupWare; if not, write to the Free Software
-        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
-        *
-        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-        * @internal Development of this resource was funded by 
http://www.bergen.kommune.no/
-        * @package eventplanner
-        * @subpackage resource
-        * @version $Id: $
-        */
-       phpgw::import_class('phpgwapi.socommon');
-
-       class eventplanner_soresource extends phpgwapi_socommon
-       {
-
-               protected static $so;
-
-               public function __construct()
-               {
-                       parent::__construct('eventplanner_resource', 
eventplanner_resource::get_fields());
-               }
-
-               /**
-                * Implementing classes must return an instance of itself.
-                *
-                * @return the class instance.
-                */
-               public static function get_instance()
-               {
-                       if (self::$so == null)
-                       {
-                               self::$so = 
CreateObject('eventplanner.soresource');
-                       }
-                       return self::$so;
-               }
-
-
-               protected function populate( array $data )
-               {
-                       $object = new eventplanner_resource();
-                       foreach ($this->fields as $field => $field_info)
-                       {
-                               $object->set_field($field, $data[$field]);
-                       }
-
-                       return $object;
-               }
-
-               protected function update( $object )
-               {
-                       $this->db->transaction_begin();
-                       $status_text = eventplanner_resource::get_status_list();
-                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-
-                       $original = 
$this->read_single($object->get_id());//returned as array()
-                       foreach ($this->fields as $field => $params)
-                       {
-                               $new_value = $object->$field;
-                               $old_value = $original[$field];
-                               if (!empty($params['history']) && ($new_value 
!= $old_value))
-                               {
-                                       $label = !empty($params['label']) ? 
lang($params['label']) : $field;
-                                       switch ($field)
-                                       {
-                                               case 'status':
-                                                       $old_value = 
$status_text[$old_value];
-                                                       $new_value = 
$status_text[$new_value];
-                                                       break;
-                                               case 'date_start':
-                                               case 'date_end':
-                                                       $old_value = 
$GLOBALS['phpgw']->common->show_date($old_value, $dateformat);
-                                                       $new_value = 
$GLOBALS['phpgw']->common->show_date($new_value, $dateformat);
-
-                                                       break;
-                                               case 'executive_officer':
-                                                       $old_value = $old_value 
? $GLOBALS['phpgw']->accounts->get($old_value)->__toString() : '';
-                                                       $new_value = $new_value 
? $GLOBALS['phpgw']->accounts->get($new_value)->__toString() : '';
-                                                       break;
-                                               default:
-                                                       break;
-                                       }
-                                       $value_set = array
-                                       (
-                                               'resource_id'   => 
$object->get_id(),
-                                               'time'          => time(),
-                                               'author'        => 
$GLOBALS['phpgw_info']['user']['fullname'],
-                                               'comment'       => $label . ':: 
' . lang('old value') . ': ' . $this->db->db_addslashes($old_value) . ', ' 
.lang('new value') . ': ' . $this->db->db_addslashes($new_value),
-                                               'type'  => 'history',
-                                       );
-
-                                       $this->db->query( 'INSERT INTO 
eventplanner_resource_comment (' .  implode( ',', array_keys( $value_set ) )   
. ') VALUES ('
-                                       . $this->db->validate_insert( 
array_values( $value_set ) ) . ')',__LINE__,__FILE__);
-                               }
-
-                       }
-
-                       parent::update($object);
-
-                       return  $this->db->transaction_commit();
-               }
-
-       }
\ No newline at end of file

Modified: branches/dev-syncromind-2/eventplanner/inc/class.sovendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.sovendor.inc.php   
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.sovendor.inc.php   
2017-02-13 15:29:58 UTC (rev 16300)
@@ -36,6 +36,8 @@
                public function __construct()
                {
                        parent::__construct('eventplanner_vendor', 
eventplanner_vendor::get_fields());
+                       $this->acl_location = eventplanner_vendor::acl_location;
+                       $this->use_acl = true;
                }
 
                /**

Modified: branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php      
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php      
2017-02-13 15:29:58 UTC (rev 16300)
@@ -46,17 +46,19 @@
 
                protected
                        $fields,
-                       $permissions;
+                       $permissions,
+                       $currentapp;
 
                public function __construct()
                {
                        parent::__construct();
-                       self::set_active_menu('eventplanner::application');
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('application');
                        $this->bo = createObject('eventplanner.boapplication');
                        $this->cats = & $this->bo->cats;
                        $this->fields = eventplanner_application::get_fields();
                        $this->permissions = 
eventplanner_application::get_instance()->get_permission_array();
+                       $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       
self::set_active_menu("{$this->currentapp}::application");
                }
 
                private function get_status_options( $selected = 0 )
@@ -81,7 +83,7 @@
                        $combos[] = array(
                                'type' => 'autocomplete',
                                'name' => 'vendor',
-                               'app' => 'eventplanner',
+                               'app' => $this->currentapp,
                                'ui' => 'vendor',
                                'function' => 'get_list',
                                'label_attr' => 'name',
@@ -147,11 +149,11 @@
                                ),
                                'datatable' => array(
                                        'source' => self::link(array(
-                                               'menuaction' => 
'eventplanner.uiapplication.index',
+                                               'menuaction' => 
"{$this->currentapp}.uiapplication.index",
                                                'phpgw_return_as' => 'json'
                                        )),
                                        'allrows' => true,
-                                       'new_item' => 
self::link(array('menuaction' => 'eventplanner.uiapplication.add')),
+                                       'new_item' => 
self::link(array('menuaction' => "{$this->currentapp}.uiapplication.add")),
                                        'editor_action' => '',
                                        'field' => parent::_get_fields()
                                )
@@ -179,7 +181,7 @@
                                'text' => lang('show'),
                                'action' => self::link( array
                                        (
-                                       'menuaction' => 
'eventplanner.uiapplication.view'
+                                       'menuaction' => 
"{$this->currentapp}.uiapplication.view"
                                )),
                                'parameters' => json_encode($parameters)
                        );
@@ -190,12 +192,12 @@
                                'text' => lang('edit'),
                                'action' => self::link(array
                                        (
-                                       'menuaction' => 
'eventplanner.uiapplication.edit'
+                                       'menuaction' => 
"{$this->currentapp}.uiapplication.edit"
                                )),
                                'parameters' => json_encode($parameters)
                        );
 
-                       self::add_javascript('eventplanner', 'portico', 
'application.index.js');
+                       self::add_javascript('eventplannerfrontend', 'portico', 
'application.index.js');
                        phpgwapi_jquery::load_widget('numberformat');
 
                        self::render_template_xsl('datatable_jquery', $data);
@@ -335,7 +337,7 @@
 
                        $datatable_def[] = array(
                                'container' => 'datatable-container_1',
-                               'requestUrl' => 
json_encode(self::link(array('menuaction' => 'eventplanner.uibooking.query',
+                               'requestUrl' => 
json_encode(self::link(array('menuaction' => 
"{$this->currentapp}.uibooking.query_relaxed",
                                        'filter_application_id' => $id,
                                        'filter_active' => 1,
                                        'phpgw_return_as' => 'json'))),
@@ -385,10 +387,10 @@
 //                     die();
                        $data = array(
                                'datatable_def' => $datatable_def,
-                               'form_action' => self::link(array('menuaction' 
=> 'eventplanner.uiapplication.save')),
-                               'cancel_url' => self::link(array('menuaction' 
=> 'eventplanner.uiapplication.index',)),
+                               'form_action' => self::link(array('menuaction' 
=> "{$this->currentapp}.uiapplication.save")),
+                               'cancel_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uiapplication.index",)),
                                'application' => $application,
-                               'new_vendor_url' => 
self::link(array('menuaction' => 'eventplanner.uivendor.add')),
+                               'new_vendor_url' => 
self::link(array('menuaction' => "{$this->currentapp}.uivendor.add")),
                                'list_case_officer' => array('options' => 
$case_officer_options),
                                'cat_select' => 
$this->cats->formatted_xslt_list(array(
                                        'select_name' => 'category_id',

Modified: branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php  
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php  
2017-02-13 15:29:58 UTC (rev 16300)
@@ -38,6 +38,7 @@
                        'add' => true,
                        'index' => true,
                        'query' => true,
+                       'query_relaxed'=> true,
                        'get_list'=> true,
                        'view' => true,
                        'edit' => true,
@@ -54,12 +55,12 @@
                public function __construct()
                {
                        parent::__construct();
-                       self::set_active_menu('eventplanner::booking');
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('booking');
                        $this->bo = createObject('eventplanner.bobooking');
                        $this->fields = eventplanner_booking::get_fields();
                        $this->permissions = 
eventplanner_booking::get_instance()->get_permission_array();
                        $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       self::set_active_menu("{$this->currentapp}::booking");
                }
 
                public function index()

Modified: branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php 
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php 
2017-02-13 15:29:58 UTC (rev 16300)
@@ -52,12 +52,12 @@
                public function __construct()
                {
                        parent::__construct();
-                       self::set_active_menu('eventplanner::customer');
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('customer');
                        $this->bo = createObject('eventplanner.bocustomer');
                        $this->fields = eventplanner_customer::get_fields();
                        $this->permissions = 
eventplanner_customer::get_instance()->get_permission_array();
                        $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       self::set_active_menu("{$this->currentapp}::customer");
                }
 
                private function get_category_options( $selected = 0 )
@@ -109,7 +109,7 @@
                                                                'list' =>  
$this->get_category_options()
                                                        ),
                                                        array(
-                                                               'type' => 
'checkbox',
+                                                               'type' =>  
$this->currentapp == 'eventplanner' ? 'checkbox' : 'hidden',
                                                                'name' => 
'filter_active',
                                                                'text' => 
lang('showall'),
                                                                'value' =>  1,

Copied: 
branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php 
(from rev 16299, trunk/eventplanner/inc/class.uicustomer_report.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php  
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php  
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,263 @@
+<?php
+/**
+        * phpGroupWare - eventplanner: a part of a Facilities Management 
System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage customer_report
+        * @version $Id: $
+        */
+       phpgw::import_class('phpgwapi.uicommon');
+       phpgw::import_class('phpgwapi.datetime');
+
+//     include_class('eventplanner', 'customer_report', 'inc/model/');
+
+       class eventplanner_uicustomer_report extends phpgwapi_uicommon
+       {
+
+               public $public_functions = array(
+                       'add' => true,
+                       'index' => true,
+                       'query' => true,
+                       'view' => true,
+                       'edit' => true,
+                       'save' => true,
+               );
+
+               protected
+                       $fields,
+                       $permissions,
+                       $custom_fields,
+                       $currentapp;
+
+               public function __construct()
+               {
+                       parent::__construct();
+                       $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('customer report');
+                       $this->bo = 
createObject('eventplanner.bocustomer_report');
+                       $this->cats = & $this->bo->cats;
+                       $this->fields = 
eventplanner_customer_report::get_fields();
+                       $this->permissions = 
eventplanner_customer_report::get_instance()->get_permission_array();
+                       $this->custom_fields = 
eventplanner_customer_report::get_instance()->get_custom_fields();
+                       $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       
self::set_active_menu("{$this->currentapp}::customer_report");
+               }
+
+
+               private function _get_filters()
+               {
+                       $combos = array();
+                       $combos[] = array(
+                               'type' => 'autocomplete',
+                               'name' => 'customer',
+                               'app' => 'eventplanner',
+                               'ui' => 'customer',
+                               'label_attr' => 'name',
+                               'text' => lang('customer') . ':',
+                               'requestGenerator' => 'requestWithVendorFilter'
+                       );
+
+                       return $combos;
+
+               }
+               public function index()
+               {
+                       if (empty($this->permissions[PHPGW_ACL_READ]))
+                       {
+                               phpgw::no_access();
+                       }
+
+                       if (phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               return $this->query();
+                       }
+
+                       phpgwapi_jquery::load_widget('autocomplete');
+
+                       $function_msg = lang('customer report');
+
+                       $data = array(
+                               'datatable_name' => $function_msg,
+                               'form' => array(
+                                       'toolbar' => array(
+                                               'item' => array(
+                                               )
+                                       )
+                               ),
+                               'datatable' => array(
+                                       'source' => self::link(array(
+                                               'menuaction' => 
"{$this->currentapp}.uicustomer_report.index",
+                                               'phpgw_return_as' => 'json'
+                                       )),
+                                       'allrows' => true,
+       //                              'new_item' => 
self::link(array('menuaction' => 'eventplanner.uicustomer_report.add')),
+                                       'editor_action' => '',
+                                       'field' => parent::_get_fields()
+                               )
+                       );
+
+                       $filters = $this->_get_filters();
+
+                       foreach ($filters as $filter)
+                       {
+                               array_unshift($data['form']['toolbar']['item'], 
$filter);
+                       }
+
+                       $parameters = array(
+                               'parameter' => array(
+                                       array(
+                                               'name' => 'id',
+                                               'source' => 'id'
+                                       )
+                               )
+                       );
+
+                       $data['datatable']['actions'][] = array
+                               (
+                               'my_name' => 'view',
+                               'text' => lang('show'),
+                               'action' => self::link(array
+                                       (
+                                       'menuaction' => 
"{$this->currentapp}.uicustomer_report.view"
+                               )),
+                               'parameters' => json_encode($parameters)
+                       );
+
+                       $data['datatable']['actions'][] = array
+                               (
+                               'my_name' => 'edit',
+                               'text' => lang('edit'),
+                               'action' => self::link(array
+                                       (
+                                       'menuaction' => 
"{$this->currentapp}.uicustomer_report.edit"
+                               )),
+                               'parameters' => json_encode($parameters)
+                       );
+
+                       self::add_javascript('eventplanner', 'portico', 
'customer_report.index.js');
+                       phpgwapi_jquery::load_widget('numberformat');
+
+                       self::render_template_xsl('datatable_jquery', $data);
+               }
+
+               /*
+                * Edit the price item with the id given in the http variable 
'id'
+                */
+
+               public function edit( $values = array(), $mode = 'edit' )
+               {
+                       $active_tab = !empty($values['active_tab']) ? 
$values['active_tab'] : phpgw::get_var('active_tab', 'string', 'REQUEST', 
'first_tab');
+                       $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('edit');
+                       if (empty($this->permissions[PHPGW_ACL_ADD]))
+                       {
+                               phpgw::no_access();
+                       }
+
+                       if (!empty($values['object']))
+                       {
+                               $customer_report = $values['object'];
+                       }
+                       else
+                       {
+                               $id = !empty($values['id']) ? $values['id'] : 
phpgw::get_var('id', 'int');
+                               $customer_report = $this->bo->read_single($id);
+                       }
+
+                       $booking_id = $customer_report->booking_id ? 
$customer_report->booking_id : phpgw::get_var('booking_id', 'int');
+                       $booking = 
createObject('eventplanner.bobooking')->read_single($booking_id);
+
+                       $application = 
createObject('eventplanner.boapplication')->read_single($booking->application_id);
+                       $application_type_list = 
execMethod('eventplanner.bogeneric.get_list', array('type' => 
'application_type'));
+                       $types = (array)$application->types;
+                       if($types)
+                       {
+                               foreach ($application_type_list as 
&$application_type)
+                               {
+                                       foreach ($types as $type)
+                                       {
+                                               if((!empty($type['type_id']) && 
$type['type_id'] == $application_type['id']) || ($type == 
$application_type['id']))
+                                               {
+                                                       
$application_type['selected'] = 1;
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+
+                       $custom_values = $customer_report->json_representation 
? $customer_report->json_representation : array();
+                       $custom_fields = 
createObject('booking.custom_fields','eventplanner');
+                       $fields = $this->custom_fields;
+                       foreach ($fields as $attrib_id => &$attrib)
+                       {
+                               $attrib['value'] = 
isset($custom_values[$attrib['name']]) ? $custom_values[$attrib['name']] : null;
+
+                               if (isset($attrib['choice']) && 
is_array($attrib['choice']) && $attrib['value'])
+                               {
+                                       foreach ($attrib['choice'] as &$choice)
+                                       {
+                                               if (is_array($attrib['value']))
+                                               {
+                                                       $choice['selected'] = 
in_array($choice['id'], $attrib['value']) ? 1 : 0;
+                                               }
+                                               else
+                                               {
+                                                       $choice['selected'] = 
$choice['id'] == $attrib['value'] ? 1 : 0;
+                                               }
+                                       }
+                               }
+                       }
+//                     _debug_array($fields);
+                       $organized_fields = 
$custom_fields->organize_fields(eventplanner_customer_report::acl_location, 
$fields);
+
+                       $tabs = array();
+                       $tabs['first_tab'] = array(
+                               'label' => lang('customer report'),
+                               'link' => '#first_tab',
+                               'function' => "set_tab('first_tab')"
+                       );
+
+                       $data = array(
+                               'form_action' => self::link(array('menuaction' 
=> "{$this->currentapp}.uicustomer_report.save")),
+                               'cancel_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uicustomer_report.index",)),
+                               'report' => $customer_report,
+                               'booking'               => $booking,
+                               'application'   => $application,
+                               'application_type_list' => 
$application_type_list,
+                               'booking_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uibooking.edit", 'id' => $booking->id, 'active_tab' => 
'reports')),
+                               'mode' => $mode,
+                               'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+                               'value_active_tab' => $active_tab,
+                               'attributes_group' => $organized_fields,
+                       );
+                       phpgwapi_jquery::formvalidator_generate(array('date', 
'security', 'file'));
+                       phpgwapi_jquery::load_widget('autocomplete');
+               //      self::add_javascript('eventplanner', 'portico', 
'customer_report.edit.js');
+                       
self::render_template_xsl(array('report','application_info', 
'datatable_inline', 'attributes_form'), array($mode => $data));
+               }
+
+               
+               public function save()
+               {
+                       parent::save();
+               }
+
+       }
\ No newline at end of file

Modified: branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php   
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php   
2017-02-13 15:29:58 UTC (rev 16300)
@@ -29,7 +29,7 @@
        phpgw::import_class('phpgwapi.uicommon');
        phpgw::import_class('phpgwapi.datetime');
 
-       include_class('eventplanner', 'application', 'inc/model/');
+       include_class('eventplanner', 'events', 'inc/model/');
 
        class eventplanner_uievents extends phpgwapi_uicommon
        {
@@ -47,24 +47,23 @@
                public function __construct()
                {
                        parent::__construct();
-                       self::set_active_menu('eventplanner::uievents');
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('events');
-                       $this->bo = createObject('eventplanner.boapplication');
+                       $this->bo = createObject('eventplanner.boevents');
                        $this->cats = & $this->bo->cats;
-                       $this->fields = eventplanner_application::get_fields();
+                       $this->fields = eventplanner_events::get_fields();
                        unset($this->fields['modified']);
                        unset($this->fields['created']);
                        unset($this->fields['contact_email']);
                        unset($this->fields['case_officer_name']);
-                       $this->permissions = 
eventplanner_application::get_instance()->get_permission_array();
+                       $this->permissions = 
eventplanner_events::get_instance()->get_permission_array();
                        $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-
+                       self::set_active_menu("{$this->currentapp}::events");
                }
 
                private function get_status_options( $selected = 0 )
                {
                        $status_options = array();
-                       $status_list = 
eventplanner_application::get_status_list();
+                       $status_list = eventplanner_events::get_status_list();
 
                        foreach ($status_list as $_key => $_value)
                        {
@@ -271,7 +270,7 @@
                public function query()
                {
                        $params = $this->bo->build_default_read_params();
-                       $params['filters']['status'] = 
eventplanner_application::STATUS_APPROVED;
+                       $params['filters']['status'] = 
eventplanner_events::STATUS_APPROVED;
                        $values = $this->bo->read($params);
                        array_walk($values["results"], array($this, 
"_add_links"), 
"{$this->called_class_arr[0]}.{$this->called_class_arr[1]}.edit");
 

Copied: branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php 
(from rev 16299, trunk/eventplanner/inc/class.uipermission.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php       
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php       
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,233 @@
+<?php
+/**
+        * phpGroupWare - eventplanner: a part of a Facilities Management 
System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this permission was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage permission
+        * @version $Id: $
+        */
+       phpgw::import_class('phpgwapi.uicommon');
+       phpgw::import_class('phpgwapi.datetime');
+
+       include_class('eventplanner', 'permission', 'inc/model/');
+
+       class eventplanner_uipermission extends phpgwapi_uicommon
+       {
+
+               public $public_functions = array(
+                       'add' => true,
+                       'index' => true,
+                       'query' => true,
+                       'view' => true,
+                       'edit' => true,
+                       'save' => true,
+                       'object'        => true
+               );
+
+               protected
+                       $fields,
+                       $permissions,
+                       $currentapp;
+
+               public function __construct()
+               {
+                       parent::__construct();
+                       $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('permission');
+                       $this->bo = createObject('eventplanner.bopermission');
+                       $this->fields = eventplanner_permission::get_fields();
+                       $this->permissions = 
eventplanner_permission::get_instance()->get_permission_array();
+                       $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       
self::set_active_menu("{$this->currentapp}::permission");
+               }
+
+               private function get_category_options( $selected = 0 )
+               {
+                       $category_list = array();
+                       $category_list[] = array('id' => '','name' => 
lang('select'));
+                       $category_list[] = array('id' => 'customer', 'name' => 
lang('customer'));
+       //              $category_list[] = array('id' => 'vendor', 'name' => 
lang('vendor'));
+
+                       foreach ($category_list as $option)
+                       {
+                               $options['selected'] = $option['id'] == 
$selected ? 1 : 0;
+                       }
+                       return $category_list;
+               }
+
+               public function index()
+               {
+                       if (empty($this->permissions[PHPGW_ACL_READ]))
+                       {
+                               phpgw::no_access();
+                       }
+
+                       if (phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               return $this->query();
+                       }
+
+                       phpgwapi_jquery::load_widget('autocomplete');
+
+                       $function_msg = lang('permission');
+
+                       $data = array(
+                               'datatable_name' => $function_msg,
+                               'form' => array(
+                                       'toolbar' => array(
+                                               'item' => array(
+                                                       array(
+                                                               'type' => 
'filter',
+                                                               'name' => 
'filter_object_type',
+                                                               'text' => 
lang('category'),
+                                                               'list' =>  
$this->get_category_options()
+                                                       )
+                                               )
+                                       )
+                               ),
+                               'datatable' => array(
+                                       'source' => self::link(array(
+                                               'menuaction' => 
"{$this->currentapp}.uipermission.index",
+                                               'phpgw_return_as' => 'json'
+                                       )),
+                                       'allrows' => true,
+                                       'new_item' => 
self::link(array('menuaction' => "{$this->currentapp}.uipermission.add")),
+                                       'editor_action' => '',
+                                       'field' => parent::_get_fields()
+                               )
+                       );
+
+                       $parameters = array(
+                               'parameter' => array(
+                                       array(
+                                               'name' => 'id',
+                                               'source' => 'id'
+                                       )
+                               )
+                       );
+
+                       $data['datatable']['actions'][] = array
+                               (
+                               'my_name' => 'edit',
+                               'text' => lang('edit'),
+                               'action' => self::link(array
+                                       (
+                                       'menuaction' => 
"{$this->currentapp}.uipermission.edit"
+                               )),
+                               'parameters' => json_encode($parameters)
+                       );
+
+                       self::add_javascript('eventplanner', 'portico', 
'permission.index.js');
+                       phpgwapi_jquery::load_widget('numberformat');
+
+                       self::render_template_xsl('datatable_jquery', $data);
+               }
+
+               /*
+                * Edit the price item with the id given in the http variable 
'id'
+                */
+
+               public function edit( $values = array(), $mode = 'edit' )
+               {
+                       $active_tab = !empty($values['active_tab']) ? 
$values['active_tab'] : phpgw::get_var('active_tab', 'string', 'REQUEST', 
'first_tab');
+                       $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('edit');
+                       if (empty($this->permissions[PHPGW_ACL_ADD]))
+                       {
+                               phpgw::no_access();
+                       }
+
+                       if (!empty($values['object']))
+                       {
+                               $permission = $values['object'];
+                       }
+                       else
+                       {
+                               $id = !empty($values['id']) ? $values['id'] : 
phpgw::get_var('id', 'int');
+                               $permission = $this->bo->read_single($id);
+                       }
+
+                       $tabs = array();
+                       $tabs['first_tab'] = array(
+                               'label' => lang('permission'),
+                               'link' => '#first_tab'
+                       );
+
+                       $category_list = $this->get_category_options( 
$permission->object_type );
+                       unset($category_list[0]);
+
+                       $data = array(
+                               'form_action' => self::link(array('menuaction' 
=> "{$this->currentapp}.uipermission.save")),
+                               'cancel_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uipermission.index",)),
+                               'permission' => $permission,
+                               'object_type_list' => array('options' => 
$category_list),
+                               'subject_list' => array('options' => 
$this->get_subjet($permission->subject_id)),
+                               'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+                               'value_active_tab' => $active_tab
+                       );
+
+                       phpgwapi_jquery::load_widget('autocomplete');
+                       phpgwapi_jquery::formvalidator_generate(array());
+                       self::add_javascript('eventplanner', 'portico', 
'permission.edit.js');
+                       self::render_template_xsl(array('permission'), 
array('edit' => $data));
+               }
+               
+               public function save()
+               {
+                       parent::save();
+               }
+
+               public function object()
+               {
+                       $object_type = phpgw::get_var('object_type');
+
+                       switch ($object_type)
+                       {
+                               case 'customer':
+                                       return 
createObject('eventplanner.uicustomer')->get_list();
+                                       break;
+                               case 'vendor':
+                                       return 
createObject('eventplanner.uivendor')->get_list();
+                                       break;
+                               default:
+                                       break;
+                       }
+               }
+
+               public function get_subjet($selected = 0)
+               {
+                       $users = 
(array)$GLOBALS['phpgw']->acl->get_user_list_right(PHPGW_ACL_READ, 'run', 
'eventplanner');
+
+                       $user_list = array();
+                       $user_list[] = array('id' => '','name' => 
lang('select'));
+                       foreach ($users as $user)
+                       {
+                               $name = (isset($user['account_lastname']) ? 
$user['account_lastname'] . ' ' : '') . $user['account_firstname'];
+                               $user_list[] = array
+                               (
+                                       'id' => $user['account_id'],
+                                       'name' => $name,
+                                       'selected' => $user['account_id'] == 
$selected ? 1 : 0
+                               );
+                       }
+                       return $user_list;
+               }
+       }
\ No newline at end of file

Deleted: branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php 
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uiresource.inc.php 
2017-02-13 15:29:58 UTC (rev 16300)
@@ -1,312 +0,0 @@
-<?php
-/**
-        * phpGroupWare - eventplanner: a part of a Facilities Management 
System.
-        *
-        * @author Sigurd Nes <address@hidden>
-        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
-        * This file is part of phpGroupWare.
-        *
-        * phpGroupWare is free software; you can redistribute it and/or modify
-        * it under the terms of the GNU General Public License as published by
-        * the Free Software Foundation; either version 2 of the License, or
-        * (at your option) any later version.
-        *
-        * phpGroupWare is distributed in the hope that it will be useful,
-        * but WITHOUT ANY WARRANTY; without even the implied warranty of
-        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-        * GNU General Public License for more details.
-        *
-        * You should have received a copy of the GNU General Public License
-        * along with phpGroupWare; if not, write to the Free Software
-        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
-        *
-        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
-        * @package eventplanner
-        * @subpackage resource
-        * @version $Id: $
-        */
-       phpgw::import_class('phpgwapi.uicommon');
-       phpgw::import_class('phpgwapi.datetime');
-
-       include_class('eventplanner', 'resource', 'inc/model/');
-       use eventplanner_resource;
-
-       class eventplanner_uiresource extends phpgwapi_uicommon
-       {
-
-               public $public_functions = array(
-                       'add' => true,
-                       'index' => true,
-                       'query' => true,
-                       'view' => true,
-                       'edit' => true,
-                       'save' => true,
-               );
-
-               protected
-                       $fields,
-                       $composite_types,
-                       $payment_methods,
-                       $permissions;
-
-               public function __construct()
-               {
-                       parent::__construct();
-                       self::set_active_menu('eventplanner::resource');
-                       $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('resource');
-                       $this->bo = createObject('eventplanner.boresource');
-                       $this->fields = eventplanner_resource::get_fields();
-                       $this->permissions = 
eventplanner_resource::get_instance()->get_permission_array();
-               }
-
-               private function get_status_options( $selected = 0 )
-               {
-                       $status_options = array();
-                       $status_list = eventplanner_resource::get_status_list();
-
-                       $status_options[] = array(
-                               'id' => '',
-                               'name' => lang('all')
-                       );
-
-                       foreach ($status_list as $_key => $_value)
-                       {
-                               $status_options[] = array(
-                                       'id' => $_key,
-                                       'name' => $_value,
-                                       'selected' => $_key == $selected ? 1 : 0
-                               );
-                       }
-                       return $status_options;
-               }
-
-
-               public function index()
-               {
-                       if (empty($this->permissions[PHPGW_ACL_READ]))
-                       {
-                               phpgw::no_access();
-                       }
-
-                       if (phpgw::get_var('phpgw_return_as') == 'json')
-                       {
-                               return $this->query();
-                       }
-
-                       phpgwapi_jquery::load_widget('autocomplete');
-
-                       $status_options = $this->get_status_options();
-                       $function_msg = lang('resource');
-
-                       $data = array(
-                               'datatable_name' => $function_msg,
-                               'form' => array(
-                                       'toolbar' => array(
-                                               'item' => array(
-                                                       array(
-                                                               'type' => 
'filter',
-                                                               'name' => 
'filter_status',
-                                                               'text' => 
lang('status'),
-                                                               'list' => 
$status_options
-                                                       ),
-                                                       array('type' => 
'autocomplete',
-                                                               'name' => 
'ecodimb',
-                                                               'app' => 
'property',
-                                                               'ui' => 
'generic',
-                                                               'label_attr' => 
'descr',
-                                               //              'show_id'=> 
true,
-                                                               'text' => 
lang('dimb') . ':',
-                                                               
'requestGenerator' => 'requestWithDimbFilter',
-                                                       ),
-                                               )
-                                       )
-                               ),
-                               'datatable' => array(
-                                       'source' => self::link(array(
-                                               'menuaction' => 
'eventplanner.uiresource.index',
-                                               'phpgw_return_as' => 'json'
-                                       )),
-                                       'allrows' => true,
-                                       'new_item' => 
self::link(array('menuaction' => 'eventplanner.uiresource.add')),
-                                       'editor_action' => '',
-                                       'field' => parent::_get_fields()
-                               )
-                       );
-
-                       $parameters = array(
-                               'parameter' => array(
-                                       array(
-                                               'name' => 'id',
-                                               'source' => 'id'
-                                       )
-                               )
-                       );
-
-                       $data['datatable']['actions'][] = array
-                               (
-                               'my_name' => 'view',
-                               'text' => lang('show'),
-                               'action' => self::link(array
-                                       (
-                                       'menuaction' => 
'eventplanner.uiresource.view'
-                               )),
-                               'parameters' => json_encode($parameters)
-                       );
-
-                       $data['datatable']['actions'][] = array
-                               (
-                               'my_name' => 'edit',
-                               'text' => lang('edit'),
-                               'action' => self::link(array
-                                       (
-                                       'menuaction' => 
'eventplanner.uiresource.edit'
-                               )),
-                               'parameters' => json_encode($parameters)
-                       );
-
-                       self::add_javascript('eventplanner', 'portico', 
'resource.index.js');
-                       phpgwapi_jquery::load_widget('numberformat');
-
-                       self::render_template_xsl('datatable_jquery', $data);
-               }
-
-               /*
-                * Edit the price item with the id given in the http variable 
'id'
-                */
-
-               public function edit( $values = array(), $mode = 'edit' )
-               {
-                       $active_tab = !empty($values['active_tab']) ? 
$values['active_tab'] : phpgw::get_var('active_tab', 'string', 'REQUEST', 
'first_tab');
-                       $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('edit');
-                       if (empty($this->permissions[PHPGW_ACL_ADD]))
-                       {
-                               phpgw::no_access();
-                       }
-
-                       if (!empty($values['object']))
-                       {
-                               $resource = $values['object'];
-                       }
-                       else
-                       {
-                               $id = !empty($values['id']) ? $values['id'] : 
phpgw::get_var('id', 'int');
-                               $resource = $this->bo->read_single($id);
-                       }
-
-                       if (empty($this->permissions[PHPGW_ACL_EDIT]))
-                       {
-                               $step = 1;
-                       }
-                       else if ($resource->get_id())
-                       {
-                               $step = 2;
-                       }
-
-                       $tabs = array();
-                       $tabs['first_tab'] = array(
-                               'label' => lang('resource'),
-                               'link' => '#first_tab',
-                               'function' => "set_tab('first_tab')"
-                       );
-                       $tabs['party'] = array(
-                               'label' => lang('party'),
-                               'link' => '#party',
-                               'function' => "set_tab('party')"
-                               );
-                       if($step > 1)
-                       {
-                               $tabs['assignment'] = array(
-                                       'label' => lang('assignment'),
-                                       'link' => '#assignment',
-                                       'function' => "set_tab('assignment')"
-                               );
-                       }
-
-                       $composite_types = array();
-                       foreach ($this->composite_types as $_key => $_value)
-                       {
-                               $composite_types[] = array('id' => $_key, 
'name' => $_value);
-                       }
-
-                       $payment_methods = array();
-                       foreach ($this->payment_methods as $_key => $_value)
-                       {
-                               $payment_methods[] = array('id' => $_key, 
'name' => $_value);
-                       }
-
-                       $bocommon = CreateObject('property.bocommon');
-
-                       $GLOBALS['phpgw']->jqcal->add_listener('date_start');
-                       $GLOBALS['phpgw']->jqcal->add_listener('date_end');
-                       
$GLOBALS['phpgw']->jqcal->add_listener('assign_date_start');
-                       
$GLOBALS['phpgw']->jqcal->add_listener('assign_date_end');
-
-                       $accounts = 
$GLOBALS['phpgw']->acl->get_user_list_right(PHPGW_ACL_EDIT, '.resource', 
'eventplanner');
-                       $executive_officer_options[] = array('id' => '', 'name' 
=> lang('nobody'), 'selected' => 0);
-                       foreach ($accounts as $account)
-                       {
-                               $executive_officer_options[] = array(
-                                       'id' => $account['account_id'],
-                                       'name' => 
$GLOBALS['phpgw']->accounts->get($account['account_id'])->__toString(),
-                                       'selected' => ($account['account_id'] 
== $resource->executive_officer) ? 1 : 0
-                               );
-                       }
-                       $comments = (array)$resource->comments;
-                       foreach ($comments as $key => &$comment)
-                       {
-                               $comment['value_count'] = $key +1;
-                               $comment['value_date'] = 
$GLOBALS['phpgw']->common->show_date($comment['time']);
-                       }
-
-                       $comments_def = array(
-                               array('key' => 'value_count', 'label' => '#', 
'sortable' => true, 'resizeable' => true),
-                               array('key' => 'value_date', 'label' => 
lang('Date'), 'sortable' => true, 'resizeable' => true),
-                               array('key' => 'author', 'label' => 
lang('User'), 'sortable' => true, 'resizeable' => true),
-                               array('key' => 'comment', 'label' => 
lang('Note'), 'sortable' => true, 'resizeable' => true)
-                       );
- 
-                       $datatable_def[] = array(
-                               'container' => 'datatable-container_0',
-                               'requestUrl' => "''",
-                               'ColumnDefs' => $comments_def,
-                               'data' => json_encode($comments),
-                               'config' => array(
-                                       array('disableFilter' => true),
-                                       array('disablePagination' => true)
-                               )
-                       );
-
-                       $data = array(
-                               'datatable_def' => $datatable_def,
-                               'form_action' => self::link(array('menuaction' 
=> 'eventplanner.uiresource.save')),
-                               'cancel_url' => self::link(array('menuaction' 
=> 'eventplanner.uiresource.index',)),
-                               'resource' => $resource,//->toArray(),
-                               'list_executive_officer' => array('options' => 
$executive_officer_options),
-                               'step'          => $step,
-                               'value_ecodimb_descr' => 
ExecMethod('property.bogeneric.get_single_attrib_value', array(
-                                       'type' => 'dimb',
-                                       'id' => $resource->ecodimb_id,
-                                       'attrib_name' => 'descr')
-                               ),
-                               'district_list' => array('options' => 
$bocommon->select_district_list('', $resource->district_id)),
-                               'composite_type_list' => array('options' => 
$bocommon->select_list($resource->composite_type_id, $composite_types)),
-                               'payment_method_list' => array('options' => 
$bocommon->select_list($resource->payment_method, $payment_methods)),
-                               'status_list' => array('options' => 
$this->get_status_options($resource->status)),
-                               'mode' => $mode,
-                               'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
-                               'value_active_tab' => $active_tab
-                       );
-                       phpgwapi_jquery::formvalidator_generate(array('date', 
'security', 'file'));
-                       phpgwapi_jquery::load_widget('autocomplete');
-                       self::add_javascript('eventplanner', 'portico', 
'resource.edit.js');
-                       self::render_template_xsl(array('resource', 
'datatable_inline'), array($mode => $data));
-               }
-
-               
-//             public function save()
-//             {
-//                     parent::save();
-//             }
-
-       }
\ No newline at end of file

Modified: branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php   
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php   
2017-02-13 15:29:58 UTC (rev 16300)
@@ -52,12 +52,12 @@
                public function __construct()
                {
                        parent::__construct();
-                       self::set_active_menu('eventplanner::vendor');
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('vendor');
                        $this->bo = createObject('eventplanner.bovendor');
                        $this->fields = eventplanner_vendor::get_fields();
                        $this->permissions = 
eventplanner_vendor::get_instance()->get_permission_array();
                        $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       self::set_active_menu("{$this->currentapp}::vendor");
                }
 
                private function get_category_options( $selected = 0 )
@@ -109,7 +109,7 @@
                                                                'list' =>  
$this->get_category_options()
                                                        ),
                                                        array(
-                                                               'type' => 
'checkbox',
+                                                               'type' =>  
$this->currentapp == 'eventplanner' ? 'checkbox' : 'hidden',
                                                                'name' => 
'filter_active',
                                                                'text' => 
lang('showall'),
                                                                'value' =>  1,

Modified: 
branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php    
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php    
2017-02-13 15:29:58 UTC (rev 16300)
@@ -46,12 +46,12 @@
                protected
                        $fields,
                        $permissions,
-                       $custom_fields;
+                       $custom_fields,
+                       $currentapp;
 
                public function __construct()
                {
                        parent::__construct();
-                       self::set_active_menu('eventplanner::vendor_report');
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' . 
lang('vendor report');
                        $this->bo = 
createObject('eventplanner.bovendor_report');
                        $this->cats = & $this->bo->cats;
@@ -58,6 +58,8 @@
                        $this->fields = 
eventplanner_vendor_report::get_fields();
                        $this->permissions = 
eventplanner_vendor_report::get_instance()->get_permission_array();
                        $this->custom_fields = 
eventplanner_vendor_report::get_instance()->get_custom_fields();
+                       $this->currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       
self::set_active_menu("{$this->currentapp}::vendor_report");
                }
 
 
@@ -103,7 +105,7 @@
                                ),
                                'datatable' => array(
                                        'source' => self::link(array(
-                                               'menuaction' => 
'eventplanner.uivendor_report.index',
+                                               'menuaction' => 
"{$this->currentapp}.uivendor_report.index",
                                                'phpgw_return_as' => 'json'
                                        )),
                                        'allrows' => true,
@@ -135,7 +137,7 @@
                                'text' => lang('show'),
                                'action' => self::link(array
                                        (
-                                       'menuaction' => 
'eventplanner.uivendor_report.view'
+                                       'menuaction' => 
"{$this->currentapp}.uivendor_report.view"
                                )),
                                'parameters' => json_encode($parameters)
                        );
@@ -146,7 +148,7 @@
                                'text' => lang('edit'),
                                'action' => self::link(array
                                        (
-                                       'menuaction' => 
'eventplanner.uivendor_report.edit'
+                                       'menuaction' => 
"{$this->currentapp}.uivendor_report.edit"
                                )),
                                'parameters' => json_encode($parameters)
                        );
@@ -234,13 +236,13 @@
                        );
 
                        $data = array(
-                               'form_action' => self::link(array('menuaction' 
=> 'eventplanner.uivendor_report.save')),
-                               'cancel_url' => self::link(array('menuaction' 
=> 'eventplanner.uivendor_report.index',)),
-                               'vendor_report' => $vendor_report,
+                               'form_action' => self::link(array('menuaction' 
=> "{$this->currentapp}.uivendor_report.save")),
+                               'cancel_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uivendor_report.index",)),
+                               'report' => $vendor_report,
                                'booking'               => $booking,
                                'application'   => $application,
                                'application_type_list' => 
$application_type_list,
-                               'booking_url' => self::link(array('menuaction' 
=> 'eventplanner.uibooking.edit', 'id' => $booking->id, 'active_tab' => 
'reports')),
+                               'booking_url' => self::link(array('menuaction' 
=> "{$this->currentapp}.uibooking.edit", 'id' => $booking->id, 'active_tab' => 
'reports')),
                                'mode' => $mode,
                                'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
                                'value_active_tab' => $active_tab,
@@ -248,8 +250,8 @@
                        );
                        phpgwapi_jquery::formvalidator_generate(array('date', 
'security', 'file'));
                        phpgwapi_jquery::load_widget('autocomplete');
-                       self::add_javascript('eventplanner', 'portico', 
'vendor_report.edit.js');
-                       
self::render_template_xsl(array('vendor_report','application_info', 
'datatable_inline', 'attributes_form'), array($mode => $data));
+               //      self::add_javascript('eventplanner', 'portico', 
'vendor_report.edit.js');
+                       
self::render_template_xsl(array('report','application_info', 
'datatable_inline', 'attributes_form'), array($mode => $data));
                }
 
                

Modified: 
branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php  
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php  
2017-02-13 15:29:58 UTC (rev 16300)
@@ -122,7 +122,9 @@
 
                public static function get_fields($debug = true)
                {
-                        $fields = array(
+                       $currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+
+                       $fields = array(
                                'id' => array('action'=> PHPGW_ACL_READ,
                                        'type' => 'int',
                                        'label' => 'id',
@@ -129,11 +131,6 @@
                                        'sortable'=> true,
                                        'formatter' => 
'JqueryPortico.formatLink',
                                        ),
-                               'active' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'int',
-                                       'label' => 'active',
-                                       'history' => true,
-                                       ),
                                'display_in_dashboard' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'bool'),
                                'category_id' => array('action'=> PHPGW_ACL_ADD 
| PHPGW_ACL_EDIT,
@@ -140,11 +137,6 @@
                                        'type' => 'int',
                                        'label' => 'category',
                                        'history' => true),
-                               'status' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'int',
-                                       'label' => 'status',
-                                       'history' => true
-                                       ),
                                'num_granted_events' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'int',
                                        'label' => 'number of granted events',
@@ -165,8 +157,6 @@
                                        'label' => 'secret',
                                        'sortable' => false,
                                        ),
-/*                             'frontend_modified' => array('action'=> 
PHPGW_ACL_READ,
-                                       'type' => 'date'),*/
                                'owner_id' => array('action'=> PHPGW_ACL_ADD,
                                        'type' => 'int',
                                        'required' => false
@@ -233,24 +223,6 @@
                                                'column' => 'name'
                                                )
                                        ),
-                               'case_officer_id' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
-                                       'type' => 'int',
-                                       'required' => true,
-                                       'label' => 'case officer',
-                                       'sortable' => true,
-                                       'history' => true,
-                                       ),
-                               'case_officer_name' => array('action'=>  
PHPGW_ACL_READ,
-                                       'type' => 'string',
-                                       'query' => true,
-                                       'label' => 'case officer',
-                                       'join' => array(
-                                               'table' => 'phpgw_accounts',
-                                               'fkey' => 'case_officer_id',
-                                               'key' => 'account_id',
-                                               'column' => 'account_lid'
-                                               )
-                                       ),
                                'types' => array(
                                        'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
                                        'type' => 'int', 'required' => true,
@@ -260,21 +232,6 @@
                                                'column' => array(
                                                        'type_id' => 
array('type' => 'int', 'required' => true)),
                                        )),
-                               'comments' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'manytomany' => array(
-                                               'input_field' => 
'comment_input',
-                                               'table' => 
'eventplanner_application_comment',
-                                               'key' => 'application_id',
-                                               'column' => array('time', 
'author', 'comment', 'type'),
-                                               'order' => array('sort' => 
'time', 'dir' => 'ASC')
-                                       )),
-                               'comment' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'related' => true,
-                                       ),
                                'date_start' => array('action'=> PHPGW_ACL_READ 
| PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'date',
                                        'label' => 'date start',
@@ -382,15 +339,64 @@
                                'raider' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
                                        'type' => 'string',
                                        'required' => false,
-                                       ),
-/*
-                               'company_name' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'required' => true,
-                                       )*/
+                                       )
                        );
 
+                       if($currentapp == 'eventplanner')
+                       {
+                               $backend_fields = array(
+                                       'case_officer_id' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                               'type' => 'int',
+                                               'required' => true,
+                                               'label' => 'case officer',
+                                               'sortable' => true,
+                                               'history' => true,
+                                               ),
+                                       'case_officer_name' => array('action'=> 
 PHPGW_ACL_READ,
+                                               'type' => 'string',
+                                               'query' => true,
+                                               'label' => 'case officer',
+                                               'join' => array(
+                                                       'table' => 
'phpgw_accounts',
+                                                       'fkey' => 
'case_officer_id',
+                                                       'key' => 'account_id',
+                                                       'column' => 
'account_lid'
+                                                       )
+                                               ),
+                                       'active' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                               'type' => 'int',
+                                               'label' => 'active',
+                                               'history' => true,
+                                               ),
+                                       'status' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                               'type' => 'int',
+                                               'label' => 'status',
+                                               'history' => true
+                                               ),
+                                       'comments' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'string',
+                                               'manytomany' => array(
+                                                       'input_field' => 
'comment_input',
+                                                       'table' => 
'eventplanner_application_comment',
+                                                       'key' => 
'application_id',
+                                                       'column' => 
array('time', 'author', 'comment', 'type'),
+                                                       'order' => array('sort' 
=> 'time', 'dir' => 'ASC')
+                                               )),
+                                       'comment' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'string',
+                                               'related' => true,
+                                               ),
+                                       );
+
+                               foreach ($backend_fields as $key => $field_info)
+                               {
+                                       $fields[$key] = $field_info;
+                               }
+                       }
+
+
                        if($debug)
                        {
                                foreach ($fields as $field => $field_info)

Modified: branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php      
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php      
2017-02-13 15:29:58 UTC (rev 16300)
@@ -42,6 +42,7 @@
 
                protected
                        $id,
+                       $owner_id,
                        $active,
                        $completed,
                        $cost,
@@ -95,7 +96,12 @@
                                        'label' => 'id',
                                        'sortable'=> true,
                                        'formatter' => 
'JqueryPortico.formatLink',
+                                       'public'        => true
                                        ),
+                               'owner_id' => array('action'=> PHPGW_ACL_ADD,
+                                       'type' => 'int',
+                                       'required' => false
+                                       ),
                                'active' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
                                        'type' => 'int',
                                        'history'       => true
@@ -112,6 +118,7 @@
                                        'label' => 'from',
                                        'history' => true,
                                        'required' => true,
+                                       'public'        => true
                                        ),
                                'to_' => array('action'=> PHPGW_ACL_READ | 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'date',
@@ -118,6 +125,7 @@
                                        'label' => 'to',
                                        'history' => true,
                                        'required' => true,
+                                       'public'        => true
                                ),
                                'application_id' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'int',
@@ -124,11 +132,13 @@
                                        'label' => 'application',
                                        'sortable' => true,
                                        'required' => true,
+                                       'public'        => true
                                        ),
                                'application_name' => array('action'=>  
PHPGW_ACL_READ,
                                        'type' => 'string',
                                        'query' => true,
                                        'label' => 'application',
+                                       'public'        => true,
                                        'join' => array(
                                                'table' => 
'eventplanner_application',
                                                'fkey' => 'application_id',
@@ -141,11 +151,13 @@
                                        'label' => 'customer',
                                        'sortable' => true,
                                        'history' => true,
+                                       'public'        => true
                                        ),
                                'customer_name' => array('action'=>  
PHPGW_ACL_READ,
                                        'type' => 'string',
                                        'query' => true,
                                        'label' => 'customer',
+                                       'public'        => true,
                                        'join' => array(
                                                'table' => 
'eventplanner_customer',
                                                'fkey' => 'customer_id',
@@ -185,6 +197,7 @@
                                        'query' => true,
                                        'label' => 'location',
                                        'history' => true,
+                                       'public'        => true
                                        ),
                                'comments' => array(
                                        'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
@@ -241,6 +254,7 @@
                        {
                                $entity->status = 
eventplanner_booking::STATUS_REGISTERED;
                                $entity->secret = self::generate_secret();
+                               $entity->owner_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        }
 
                        if (empty($entity->completed))
@@ -268,11 +282,11 @@
 
                        $bookings =  
eventplanner_sobooking::get_instance()->read($params);
 
-                       if($entity->customer_id)
+                       if($entity->customer_id) // update
                        {
                                $test_total_tecords = 
(int)$bookings['total_records'];
                        }
-                       else
+                       else // new entry
                        {
                                $test_total_tecords = 
(int)$bookings['total_records'] + 1;
                        }

Modified: 
branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php     
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php     
2017-02-13 15:29:58 UTC (rev 16300)
@@ -42,6 +42,7 @@
 
                protected
                        $id,
+                       $owner_id,
                        $active,
                        $category_id,
                        $created,
@@ -56,6 +57,11 @@
                        $contact_name,
                        $contact_email,
                        $contact_phone,
+                       $contact2_name,
+                       $contact2_email,
+                       $contact2_phone,
+                       $number_of_users,
+                       $max_events,
                        $account_number,
                        $description,
                        $remark,
@@ -92,7 +98,9 @@
 
                public static function get_fields($debug = true)
                {
-                        $fields = array(
+                       $currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+
+                       $fields = array(
                                'id' => array('action'=> PHPGW_ACL_READ,
                                        'type' => 'int',
                                        'label' => 'id',
@@ -99,9 +107,9 @@
                                        'sortable'=> true,
                                        'formatter' => 
'JqueryPortico.formatLink',
                                        ),
-                               'active' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                               'owner_id' => array('action'=> PHPGW_ACL_ADD,
                                        'type' => 'int',
-                                       'history'       => true
+                                       'required' => false
                                        ),
                                'category_id' => array('action'=>  
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'int'
@@ -143,7 +151,7 @@
                                        'required' => true),
                                'account_number' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'string',
-                                       'required' => true),
+                                       'required' => false),
                                'description' => array('action'=> PHPGW_ACL_ADD 
| PHPGW_ACL_EDIT,
                                        'type' => 'string',
                                        'label' => 'description',
@@ -177,31 +185,82 @@
                                        'query' => true,
                                        'label' => 'contact phone',
                                        ),
-                               'organization_number' => array(
+                               'contact2_name' => array(
+                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                       'type' => 'string',
+                                       'required' => false,
+                                       'query' => true,
+                                       'label' => 'contact name 2',
+                                       ),
+                               'contact2_email' => array(
                                        'action'=> PHPGW_ACL_READ | 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'string',
-                                       'required' => true,
+                                       'required' => false,
                                        'query' => true,
-                                       'sf_validator' => 
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), 
array('invalid' => '%field% is invalid')),
-                                       'label' => 'organization number'
+                                       'sf_validator' => 
createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% 
is invalid')),
+                                       'label' => 'contact email 2',
                                        ),
-                               'comments' => array(
+                               'contact2_phone' => array(
                                        'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
                                        'type' => 'string',
-                                       'manytomany' => array(
-                                               'input_field' => 
'comment_input',
-                                               'table' => 
'eventplanner_customer_comment',
-                                               'key' => 'customer_id',
-                                               'column' => array('time', 
'author', 'comment', 'type'),
-                                               'order' => array('sort' => 
'time', 'dir' => 'ASC')
-                                       )),
-                               'comment' => array(
+                                       'required' => false,
+                                       'query' => true,
+                                       'label' => 'contact phone 2',
+                                       ),
+                               'number_of_users' => array(
                                        'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                       'type' => 'int',
+                                       'required' => true,
+                                       'query' => true,
+                                       'label' => 'number of users',
+                                       ),
+                               'organization_number' => array(
+                                       'action'=> PHPGW_ACL_READ | 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'string',
-                                       'related' => true,
+                                       'required' => true,
+                                       'query' => true,
+                                       'sf_validator' => 
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), 
array('invalid' => '%field% is invalid')),
+                                       'label' => 'organization number'
                                        )
                        );
 
+                       if($currentapp == 'eventplanner')
+                       {
+                               $backend_fields = array(
+                                       'active' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                               'type' => 'int',
+                                               'history'       => true
+                                               ),
+                                       'comments' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'string',
+                                               'manytomany' => array(
+                                                       'input_field' => 
'comment_input',
+                                                       'table' => 
'eventplanner_vendor_comment',
+                                                       'key' => 'vendor_id',
+                                                       'column' => 
array('time', 'author', 'comment', 'type'),
+                                                       'order' => array('sort' 
=> 'time', 'dir' => 'ASC')
+                                               )),
+                                       'comment' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'string',
+                                               'related' => true,
+                                               ),
+                                       'max_events' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'int',
+                                               'required' => true,
+                                               'query' => false,
+                                               'label' => 'maximum number of 
events',
+                                               ),
+                                       );
+
+                               foreach ($backend_fields as $key => $field_info)
+                               {
+                                       $fields[$key] = $field_info;
+                               }
+                       }
+
                        if($debug)
                        {
                                foreach ($fields as $field => $field_info)
@@ -238,13 +297,11 @@
                        $entity->modified = time();
                        $entity->active = (int)$entity->active;
 
-                       if($entity->get_id())
+                       if(!$entity->get_id())
                        {
-                       }
-                       else
-                       {
                                $entity->status = 
eventplanner_customer::STATUS_REGISTERED;
                                $entity->secret = self::generate_secret();
+                               $entity->owner_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        }
                }
 

Copied: 
branches/dev-syncromind-2/eventplanner/inc/model/class.customer_report.inc.php 
(from rev 16299, trunk/eventplanner/inc/model/class.customer_report.inc.php)
===================================================================
--- 
branches/dev-syncromind-2/eventplanner/inc/model/class.customer_report.inc.php  
                            (rev 0)
+++ 
branches/dev-syncromind-2/eventplanner/inc/model/class.customer_report.inc.php  
    2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,181 @@
+<?php
+       /**
+        * phpGroupWare - eventplanner: a part of a Facilities Management 
System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage customer_report
+        * @version $Id: $
+        */
+       phpgw::import_class('eventplanner.bocustomer_report');
+
+       include_class('phpgwapi', 'model', 'inc/model/');
+
+       class eventplanner_customer_report extends phpgwapi_model
+       {
+
+               const acl_location = '.customer_report';
+
+               protected
+                       $id,
+                       $owner_id,
+                       $booking_id,
+                       $booking_location,
+                       $created,
+                       $json_representation;
+               static $custom_fields = array();
+               protected $field_of_responsibility_name = '.customer_report';
+
+               public function __construct( int $id = null )
+               {
+                       parent::__construct((int)$id);
+                       $this->field_of_responsibility_name = 
self::acl_location;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       return new eventplanner_customer_report();
+               }
+
+               public static function get_custom_fields()
+               {
+                       static $custom_fields = array();
+                       if(!$custom_fields)
+                       {
+                               $custom_fields = 
$GLOBALS['phpgw']->custom_fields->find('eventplanner', self::acl_location, 0, 
'', 'ASC', 'attrib_sort', true, true);
+                       }
+                       return $custom_fields;
+               }
+
+               public function get_organized_fields()
+               {
+                       if (!$this->custom_fields)
+                       {
+                               $this->custom_fields = 
createObject('booking.custom_fields', 
'eventplanner')->get_organized_fields(self::acl_location);
+                       }
+                       return $this->custom_fields;
+               }
+
+               public static function get_fields( $debug = true )
+               {
+                       $fields = array(
+                               'id' => array('action' => PHPGW_ACL_READ,
+                                       'type' => 'int',
+                                       'label' => 'id',
+                                       'sortable' => true,
+                                       'formatter' => 
'JqueryPortico.formatLink',
+                               ),
+                               'owner_id' => array('action'=> PHPGW_ACL_ADD,
+                                       'type' => 'int',
+                                       'required' => false
+                                       ),
+                               'booking_id' => array('action' => PHPGW_ACL_ADD 
| PHPGW_ACL_EDIT,
+                                       'type' => 'int',
+                                       'label' => 'booking',
+                                       'sortable' => true,
+                                       'required' => true,
+                               ),
+                               'booking_location' => array('action' => 
PHPGW_ACL_READ,
+                                       'type' => 'string',
+                                       'query' => true,
+                                       'label' => 'location',
+                                       'join' => array(
+                                               'table' => 
'eventplanner_booking',
+                                               'fkey' => 'booking_id',
+                                               'key' => 'id',
+                                               'column' => 'location'
+                                       )
+                               ),
+                               'created' => array('action' => PHPGW_ACL_READ | 
PHPGW_ACL_ADD,
+                                       'type' => 'date',
+                                       'label' => 'created',
+                                       'sortable' => true,
+                               ),
+                               'json_representation' => array('action' => 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                       'type' => 'json',
+                                       'sortable' => false,
+                               ),
+                       );
+
+                       if ($debug)
+                       {
+                               foreach ($fields as $field => $field_info)
+                               {
+                                       if 
(!property_exists('eventplanner_customer_report', $field))
+                                       {
+                                               phpgwapi_cache::message_set('$' 
. "{$field},", 'error');
+                                       }
+                               }
+                       }
+                       return $fields;
+               }
+
+               /**
+                * Implement in subclasses to perform actions on entity before 
validation
+                */
+               protected function preValidate( &$entity )
+               {
+                       if (!empty($entity->comment))
+                       {
+                               $entity->comment_input = array(
+                                       'time' => time(),
+                                       'author' => 
$GLOBALS['phpgw_info']['user']['fullname'],
+                                       'comment' => $entity->comment,
+                                       'type' => 'comment'
+                               );
+                       }
+                       $entity->modified = time();
+                       $entity->active = (int)$entity->active;
+
+                       if (!$entity->get_id())
+                       {
+                               $entity->created = time();
+                               $entity->secret = self::generate_secret();
+                               $entity->owner_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
+                       }
+               }
+
+               protected function generate_secret( $length = 10 )
+               {
+                       return substr(base64_encode(rand(1000000000, 
9999999999)), 0, $length);
+               }
+
+               public function serialize()
+               {
+                       return self::toArray();
+               }
+
+               public function store()
+               {
+                       return 
eventplanner_bocustomer_report::get_instance()->store($this);
+               }
+
+               public function read_single( $id )
+               {
+                       return 
eventplanner_bocustomer_report::get_instance()->read_single($id, true);
+               }
+       }
\ No newline at end of file

Copied: branches/dev-syncromind-2/eventplanner/inc/model/class.events.inc.php 
(from rev 16299, trunk/eventplanner/inc/model/class.events.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.events.inc.php       
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.events.inc.php       
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,54 @@
+<?php
+       /**
+        * phpGroupWare - eventplanner: a part of a Facilities Management 
System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage application
+        * @version $Id: $
+        */
+
+       include_class('eventplanner', 'application', 'inc/model/');
+
+       class eventplanner_events extends eventplanner_application
+       {
+
+               const acl_location = '.events';
+
+               protected $field_of_responsibility_name = '.events';
+
+               public function __construct( int $id = null )
+               {
+                       parent::__construct((int)$id);
+                       $this->field_of_responsibility_name = 
self::acl_location;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       return new eventplanner_events();
+               }
+       }

Copied: 
branches/dev-syncromind-2/eventplanner/inc/model/class.permission.inc.php (from 
rev 16299, trunk/eventplanner/inc/model/class.permission.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.permission.inc.php   
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.permission.inc.php   
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,157 @@
+<?php
+       /**
+        * phpGroupWare - eventplanner: a part of a Facilities Management 
System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2017 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package eventplanner
+        * @subpackage permission
+        * @version $Id: $
+        */
+
+       phpgw::import_class('eventplanner.bopermission');
+
+       include_class('phpgwapi', 'model', 'inc/model/');
+
+       class eventplanner_permission extends phpgwapi_model
+       {
+
+               const acl_location = '.admin';
+
+               protected
+                       $id,
+                       $subject_id,
+                       $object_id,
+                       $object_type,
+                       $permission,
+                       $subject_name;
+
+               protected $field_of_responsibility_name = '.admin';
+
+               public function __construct( int $id = null )
+               {
+                       parent::__construct((int)$id);
+                       $this->field_of_responsibility_name = 
self::acl_location;
+               }
+
+               /**
+                * Implementing classes must return an instance of itself.
+                *
+                * @return the class instance.
+                */
+               public static function get_instance()
+               {
+                       return new eventplanner_permission();
+               }
+
+               public static function get_status_list()
+               {
+               }
+
+               public static function get_fields($debug = true)
+               {
+
+                       $fields = array(
+                               'id' => array('action'=> PHPGW_ACL_READ,
+                                       'type' => 'int',
+                                       'label' => 'id',
+                                       'sortable'=> true,
+                                       'formatter' => 
'JqueryPortico.formatLink',
+                               ),
+                               'subject_id' => array('action'=> PHPGW_ACL_ADD,
+                                       'type' => 'int',
+                                       'required' => true
+                               ),
+                               'object_id' => array('action'=>  PHPGW_ACL_READ 
| PHPGW_ACL_ADD,
+                                       'type' => 'int',
+                                       'label' => 'object id',
+                                       'required' => true
+                               ),
+                               'object_type' => array('action'=>  
PHPGW_ACL_READ | PHPGW_ACL_ADD,
+                                       'type' => 'string',
+                                       'label' => 'object type',
+                                       'required' => true,
+                                       'query' => true,
+                               ),
+                               'permission' => array('action'=>  
PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                       'type' => 'int',
+                                       'label' => 'permission',
+                                       'required' => true,
+                                       'query' => true,
+                               ),
+                               'subject_name' => array('action'=>  
PHPGW_ACL_READ,
+                                       'type' => 'string',
+                                       'query' => true,
+                                       'label' => 'user',
+                                       'join' => array(
+                                               'table' => 'phpgw_accounts',
+                                               'fkey' => 'subject_id',
+                                               'key' => 'account_id',
+                                               'column' => 'account_lid'
+                                       )
+                               )
+                       );
+
+
+                       if($debug)
+                       {
+                               foreach ($fields as $field => $field_info)
+                               {
+                                       
if(!property_exists('eventplanner_permission', $field))
+                                       {
+                                          
phpgwapi_cache::message_set('$'."{$field},", 'error');
+                                       }
+
+                               }
+                       }
+                       return $fields;
+               }
+
+               /**
+                * Implement in subclasses to perform actions on entity before 
validation
+                */
+               protected function preValidate( &$entity )
+               {
+                       $permission = (array) phpgw::get_var('permission', 
'int');
+
+                       $entity->permission = 0;//reset
+                       foreach ($permission as $key => $value)
+                       {
+                               $entity->permission += $value;
+                       }
+               }
+
+
+               public function serialize()
+               {
+                       return self::toArray();
+               }
+
+               public function store()
+               {
+                       return 
eventplanner_bopermission::get_instance()->store($this);
+               }
+
+               public function read_single($id)
+               {
+                       return 
eventplanner_bopermission::get_instance()->read_single($id, true);
+               }
+       }

Deleted: branches/dev-syncromind-2/eventplanner/inc/model/class.resource.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.resource.inc.php     
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.resource.inc.php     
2017-02-13 15:29:58 UTC (rev 16300)
@@ -1,197 +0,0 @@
-<?php
-       /**
-        * phpGroupWare - eventplanner: a part of a Facilities Management 
System.
-        *
-        * @author Sigurd Nes <address@hidden>
-        * @copyright Copyright (C) 2016 Free Software Foundation, Inc. 
http://www.fsf.org/
-        * This file is part of phpGroupWare.
-        *
-        * phpGroupWare is free software; you can redistribute it and/or modify
-        * it under the terms of the GNU General Public License as published by
-        * the Free Software Foundation; either version 2 of the License, or
-        * (at your option) any later version.
-        *
-        * phpGroupWare is distributed in the hope that it will be useful,
-        * but WITHOUT ANY WARRANTY; without even the implied warranty of
-        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-        * GNU General Public License for more details.
-        *
-        * You should have received a copy of the GNU General Public License
-        * along with phpGroupWare; if not, write to the Free Software
-        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
-        *
-        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
-        * @package eventplanner
-        * @subpackage resource
-        * @version $Id: $
-        */
-
-       phpgw::import_class('eventplanner.boresource');
-
-       include_class('phpgwapi', 'model', 'inc/model/');
-
-       class eventplanner_resource extends phpgwapi_model
-       {
-               const STATUS_REGISTERED = 1;
-               const STATUS_PENDING = 2;
-               const STATUS_REJECTED = 3;
-               const STATUS_APPROVED = 4;
-
-               const acl_location = '.resource';
-
-               protected
-                       $id,
-                       $status,
-                       $category_id,
-                       $category_name,
-                       $date_start,
-                       $date_end,
-                       $active,
-                       $name,
-                       $description,
-                       $comment,
-                       $comments,
-                       $comment_input,
-                       $entry_date,
-                       $executive_officer;
-
-               protected $field_of_responsibility_name;
-
-               public function __construct( int $id = null )
-               {
-                       parent::__construct((int)$id);
-                       $this->field_of_responsibility_name = 
self::acl_location;
-               }
-
-               /**
-                * Implementing classes must return an instance of itself.
-                *
-                * @return the class instance.
-                */
-               public static function get_instance()
-               {
-                       return new eventplanner_resource();
-               }
-
-               public static function get_status_list()
-               {
-                       return array(
-                               self::STATUS_REGISTERED => lang('registered'),
-                               self::STATUS_PENDING    => lang('pending'),
-                               self::STATUS_REJECTED => lang('rejected'),
-                               self::STATUS_APPROVED   => lang('approved')
-                       );
-               }
-
-
-               public static function get_fields($debug = true)
-               {
-                        $fields = array(
-                               'id' => array('action'=> PHPGW_ACL_READ,
-                                       'type' => 'int',
-                                       'label' => 'id',
-                                       'sortable'=> true,
-                                       'formatter' => 
'JqueryPortico.formatLink',
-                                       ),
-                               'category_id' => array(
-                                       'action'=>  PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'int',
-                                       'label' => 'category',
-                                       ),
-                               'category_name' => array(
-                                       'action'=>  PHPGW_ACL_READ,
-                                       'type' => 'string',
-                                       'label' => 'category',
-                                       'join' => array(
-                                               'table' => 
'eventplanner_resource_category',
-                                               'fkey' => 'category_id',
-                                               'key' => 'id',
-                                               'column' => 'name'
-                                               )
-                                       ),
-                               'date_start' => array('action'=> PHPGW_ACL_ADD 
| PHPGW_ACL_EDIT,
-                                       'type' => 'date'),
-                               'date_end' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'date'),
-                               'active' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'bool'),
-                               'name' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'required' => true,
-                                       'query' => true,
-                                       'label' => 'name',
-                                       ),
-                               'description' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'required' => true,
-                                       'query' => true,
-                                       'label' => 'description',
-                                       ),
-                               'comments' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'manytomany' => array(
-                                               'input_field' => 
'comment_input',
-                                               'table' => 
'eventplanner_resource_comment',
-                                               'key' => 'resource_id',
-                                               'column' => array('time', 
'author', 'comment', 'type'),
-                                               'order' => array('sort' => 
'time', 'dir' => 'ASC')
-                                       )),
-                               'comment' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'related' => true,
-                                       ),
-                               'executive_officer' => array('action'=> 
PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
-                                       'type' => 'int',
-                                       'label' => 'executive_officer',
-                                       'sortable' => true,
-                                       'history' => true,
-                                       ),
-
-                               'entry_date' => array('action'=> PHPGW_ACL_READ 
| PHPGW_ACL_ADD,
-                                       'type' => 'int',
-                                       'label' => 'entry_date',
-                                       'sortable' => true,
-                                       ),
-                               );
-
-                       if($debug)
-                       {
-                               foreach ($fields as $field => $field_info)
-                               {
-                                       
if(!property_exists('eventplanner_resource', $field))
-                                       {
-                                          phpgwapi_cache::message_set("$field 
is missing from model-definition", 'error');
-                                       }
-
-                               }
-                       }
-                       return $fields;
-               }
-
-               /**
-                * Implement in subclasses to perform actions on entity before 
validation
-                */
-               protected function preValidate( &$entity )
-               {
-               }
-
-               public function serialize()
-               {
-                       return self::toArray();
-               }
-
-               public function store()
-               {
-                       return 
eventplanner_boresource::get_instance()->store($this);
-               }
-
-               public function read_single($id)
-               {
-                       return 
eventplanner_boresource::get_instance()->read_single($id, true);
-               }
-       }

Modified: branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php       
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php       
2017-02-13 15:29:58 UTC (rev 16300)
@@ -42,6 +42,7 @@
 
                protected
                        $id,
+                       $owner_id,
                        $active = 1,
                        $category_id,
                        $created,
@@ -92,7 +93,9 @@
 
                public static function get_fields($debug = true)
                {
-                        $fields = array(
+                       $currentapp = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+
+                       $fields = array(
                                'id' => array('action'=> PHPGW_ACL_READ,
                                        'type' => 'int',
                                        'label' => 'id',
@@ -99,9 +102,9 @@
                                        'sortable'=> true,
                                        'formatter' => 
'JqueryPortico.formatLink',
                                        ),
-                               'active' => array('action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                               'owner_id' => array('action'=> PHPGW_ACL_ADD,
                                        'type' => 'int',
-                                       'history'       => true
+                                       'required' => false
                                        ),
                                'category_id' => array('action'=>  
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'int'
@@ -185,23 +188,39 @@
                                        'sf_validator' => 
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), 
array('invalid' => '%field% is invalid')),
                                        'label' => 'organization number'
                                        ),
-                               'comments' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'manytomany' => array(
-                                               'input_field' => 
'comment_input',
-                                               'table' => 
'eventplanner_vendor_comment',
-                                               'key' => 'vendor_id',
-                                               'column' => array('time', 
'author', 'comment', 'type'),
-                                               'order' => array('sort' => 
'time', 'dir' => 'ASC')
-                                       )),
-                               'comment' => array(
-                                       'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
-                                       'type' => 'string',
-                                       'related' => true,
-                                       )
                        );
 
+                       if($currentapp == 'eventplanner')
+                       {
+                               $backend_fields = array(
+                                       'active' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                               'type' => 'int',
+                                               'history'       => true
+                                               ),
+                                       'comments' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'string',
+                                               'manytomany' => array(
+                                                       'input_field' => 
'comment_input',
+                                                       'table' => 
'eventplanner_vendor_comment',
+                                                       'key' => 'vendor_id',
+                                                       'column' => 
array('time', 'author', 'comment', 'type'),
+                                                       'order' => array('sort' 
=> 'time', 'dir' => 'ASC')
+                                               )),
+                                       'comment' => array(
+                                               'action'=> PHPGW_ACL_ADD | 
PHPGW_ACL_EDIT,
+                                               'type' => 'string',
+                                               'related' => true,
+                                               )
+                                       );
+
+                               foreach ($backend_fields as $key => $field_info)
+                               {
+                                       $fields[$key] = $field_info;
+                               }
+                       }
+
+
                        if($debug)
                        {
                                foreach ($fields as $field => $field_info)
@@ -238,6 +257,7 @@
                        {
                                $entity->status = 
eventplanner_vendor::STATUS_REGISTERED;
                                $entity->secret = self::generate_secret();
+                               $entity->owner_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        }
                }
 

Modified: 
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php
===================================================================
--- 
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php    
    2017-02-13 11:21:25 UTC (rev 16299)
+++ 
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor_report.inc.php    
    2017-02-13 15:29:58 UTC (rev 16300)
@@ -37,6 +37,7 @@
 
                protected
                        $id,
+                       $owner_id,
                        $booking_id,
                        $booking_location,
                        $created,
@@ -88,6 +89,10 @@
                                        'sortable' => true,
                                        'formatter' => 
'JqueryPortico.formatLink',
                                ),
+                               'owner_id' => array('action'=> PHPGW_ACL_ADD,
+                                       'type' => 'int',
+                                       'required' => false
+                                       ),
                                'booking_id' => array('action' => PHPGW_ACL_ADD 
| PHPGW_ACL_EDIT,
                                        'type' => 'int',
                                        'label' => 'booking',
@@ -150,6 +155,7 @@
                        {
                                $entity->created = time();
                                $entity->secret = self::generate_secret();
+                               $entity->owner_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        }
                }
 

Copied: branches/dev-syncromind-2/eventplanner/js/portico/permission.edit.js 
(from rev 16299, trunk/eventplanner/js/portico/permission.edit.js)
===================================================================
--- branches/dev-syncromind-2/eventplanner/js/portico/permission.edit.js        
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/js/portico/permission.edit.js        
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,43 @@
+
+var lang;
+var oArgs = {menuaction: 'eventplanner.uipermission.subject'};
+var strURL = phpGWLink('index.php', oArgs, true);
+JqueryPortico.autocompleteHelper(strURL, 'subject_name', 'subject_id', 
'subject_container', 'name');
+
+
+$(document).ready(function ()
+{
+
+       var oArgs = {menuaction: 'eventplanner.uipermission.object', 
object_type: $("#object_type").val()};
+       var strURL = phpGWLink('index.php', oArgs, true);
+       JqueryPortico.autocompleteHelper(strURL, 'object_name', 'object_id', 
'object_container', 'name');
+
+       $("#object_type").change(function ()
+       {
+               $('#object_id').val('');
+               $('#object_name').val('');
+       });
+
+
+       $.formUtils.addValidator({
+               name: 'permission',
+               validatorFunction: function (value, $el, config, languaje, 
$form)
+               {
+                       var v = false;
+                       var permission_1 = $("#permission_1").is(':checked');
+                       var permission_2 = $("#permission_2").is(':checked');
+                       var permission_4 = $("#permission_4").is(':checked');
+                       var permission_8 = $("#permission_8").is(':checked');
+
+                       if (permission_1 || permission_2 || permission_4 || 
permission_8)
+                       {
+                               v = true;
+                       }
+
+                       return v;
+               },
+               errorMessage: lang['permission is required'] || 'permission is 
required',
+               errorMessageKey: ''
+       });
+
+});

Modified: branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php        
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php        
2017-02-13 15:29:58 UTC (rev 16300)
@@ -17,7 +17,7 @@
        $GLOBALS['phpgw']->locations->add('.', 'Tom', 'eventplanner');
        $GLOBALS['phpgw']->locations->add('.admin', 'admin', 'eventplanner');
        $GLOBALS['phpgw']->locations->add('.application', 'application', 
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
-       $GLOBALS['phpgw']->locations->add('.resource', 'resource', 
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
+       $GLOBALS['phpgw']->locations->add('.events', 'events', 'eventplanner', 
$allow_grant = true, $custom_tbl = '', $c_function = true);
        $GLOBALS['phpgw']->locations->add('.customer', 'customer', 
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
        $GLOBALS['phpgw']->locations->add('.vendor', 'vendor', 'eventplanner', 
$allow_grant = true, $custom_tbl = '', $c_function = true);
        $GLOBALS['phpgw']->locations->add('.booking', 'booking', 
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);

Modified: branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang  2017-02-13 
11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang  2017-02-13 
15:29:58 UTC (rev 16300)
@@ -104,4 +104,11 @@
 event  eventplanner    no      Arrangement
 please enter a valid organization number       eventplanner    no      Angi et 
gyldig organisasjonsnummer
 please enter a valid account number    eventplanner    no      Angi et gyldig 
kontonummer
-program data   eventplanner    no      Om programmet
\ No newline at end of file
+program data   eventplanner    no      Om programmet
+booking        eventplanner    no      Booking
+customer contact email eventplanner    no      Epost
+showall        eventplanner    no      Vis alle
+read   eventplanner    no      Les
+permission     eventplanner    no      Rettighet
+maximum number of events       eventplanner    no      Maksimum antall 
arrangement
+number of users        eventplanner    no      Ca. antall brukere
\ No newline at end of file

Modified: branches/dev-syncromind-2/eventplanner/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/setup.inc.php  2017-02-13 
11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/setup/setup.inc.php  2017-02-13 
15:29:58 UTC (rev 16300)
@@ -11,7 +11,7 @@
         * @version $Id: setup.inc.php 14728 2016-02-11 22:28:46Z sigurdne $
         */
        $setup_info['eventplanner']['name'] = 'eventplanner';
-       $setup_info['eventplanner']['version'] = '0.9.18.004';
+       $setup_info['eventplanner']['version'] = '0.9.18.007';
        $setup_info['eventplanner']['app_order'] = 20;
        $setup_info['eventplanner']['enable'] = 1;
        $setup_info['eventplanner']['app_group'] = 'office';
@@ -55,12 +55,9 @@
                'eventplanner_application_type',
                'eventplanner_application',
                'eventplanner_application_comment',
-               'eventplanner_resource',
-               'eventplanner_resource_comment',
                'eventplanner_booking',
                'eventplanner_booking_comment',
                'eventplanner_booking_cost',
-               'eventplanner_booking_resource',
                'eventplanner_order',
                'eventplanner_booking_vendor_report',
                'eventplanner_booking_customer_report'

Modified: branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php 
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php 
2017-02-13 15:29:58 UTC (rev 16300)
@@ -39,6 +39,8 @@
                                'remark' => array('type' => 'text', 'nullable' 
=> True),
                                'secret' => array('type' => 'text', 'nullable' 
=> False),
                                'organization_number' => array('type' => 
'varchar', 'precision' => '9','nullable' => True),
+                               'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
+                               'public' => array('type' => 'int', 'precision' 
=> '2', 'nullable' => True),
                                'created' => array('type' => 'int', 'precision' 
=> '8',  'nullable' => False, 'default' => 'current_timestamp'),
                                'modified' => array('type' => 'int', 
'precision' => '8', 'nullable' => False, 'default' => 'current_timestamp'),
                                'json_representation' => array('type' => 
'jsonb', 'nullable' => true),
@@ -84,16 +86,23 @@
                                'address_2' => array('type' => 'varchar', 
'precision' => '255', 'nullable' => true),
                                'zip_code' => array('type' => 'varchar', 
'precision' => '10', 'nullable' => False),
                                'city' => array('type' => 'varchar', 
'precision' => '64', 'nullable' => False),
-                               'account_number' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => False),
+                               'account_number' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => true),
                                'category_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
                                'active' => array('type' => 'int', 'nullable' 
=> False, 'precision' => '4', 'default' => 1),
                                'contact_name' => array('type' => 'text', 
'nullable' => False),
                                'contact_email' => array('type' => 'text', 
'nullable' => False),
                                'contact_phone' => array('type' => 'text', 
'nullable' => False),
+                               'contact2_name' => array('type' => 'text', 
'nullable' => true),
+                               'contact2_email' => array('type' => 'text', 
'nullable' => true),
+                               'contact2_phone' => array('type' => 'text', 
'nullable' => true),
+                               'number_of_users' => array('type' => 'int', 
'precision' => '4', 'nullable' => true),
+                               'max_events' => array('type' => 'int', 
'precision' => '4', 'nullable' => true),
                                'description' => array('type' => 'text', 
'nullable' => False),
                                'remark' => array('type' => 'text', 'nullable' 
=> True),
                                'secret' => array('type' => 'text', 'nullable' 
=> False),
                                'organization_number' => array('type' => 
'varchar', 'precision' => '9','nullable' => True),
+                               'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
+                               'public' => array('type' => 'int', 'precision' 
=> '2', 'nullable' => True),
                                'created' => array('type' => 'int', 'precision' 
=> '8',  'nullable' => False, 'default' => 'current_timestamp'),
                                'modified' => array('type' => 'int', 
'precision' => '8', 'nullable' => False, 'default' => 'current_timestamp'),
                                'json_representation' => array('type' => 
'jsonb', 'nullable' => true),
@@ -145,6 +154,7 @@
                                'contact_phone' => array('type' => 'text', 
'nullable' => False),
                                'secret' => array('type' => 'text', 'nullable' 
=> true),
                                'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
+                               'public' => array('type' => 'int', 'precision' 
=> '2', 'nullable' => True),
                                'case_officer_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => True),
                                'charge_per_unit' => array('type' => 'decimal', 
'precision' => '20', 'scale' => '2','nullable' => true, 'default' => '0.00'),
                                'number_of_units' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
@@ -219,43 +229,6 @@
                        'ix' => array(),
                        'uc' => array()
                ),
-               'eventplanner_resource' => array(
-                       'fd' => array(
-                               'id' => array('type' => 'auto', 'nullable' => 
False),
-                               'category_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
-                               'date_start' => array('type' => 'int', 
'precision' => '8', 'nullable' => false),
-                               'date_end' => array('type' => 'int', 
'precision' => '8', 'nullable' => false),
-                               'active' => array('type' => 'int', 'precision' 
=> '2', 'nullable' => false),
-                               'name' => array('type' => 'varchar', 
'precision' => '255', 'nullable' => false),
-                               'description' => array('type' => 'text', 
'nullable' => false),
-                               'executive_officer' => array('type' => 'int', 
'precision' => '4', 'nullable' => true),
-                               'entry_date' => array('type' => 'int', 
'precision' => '8', 'nullable' => false),
-                               'created_by' => array('type' => 'int', 
'precision' => 4, 'nullable' => false),
-                               'last_updated' => array('type' => 'int', 
'precision' => '8', 'nullable' => false),
-                               'json_representation' => array('type' => 
'jsonb', 'nullable' => true),
-                       ),
-                       'pk' => array('id'),
-                       'fk' => array(
-                               'phpgw_accounts' => array('executive_officer' 
=> 'account_id')
-                               ),
-                       'ix' => array(),
-                       'uc' => array()
-               ),
-               'eventplanner_resource_comment' => array(
-                       'fd' => array(
-                               'id' => array('type' => 'auto', 'nullable' => 
False),
-                               'resource_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
-                               'time' => array('type' => 'int', 'precision' => 
'8', 'nullable' => False),
-                               'author' => array('type' => 'text', 'nullable' 
=> False),
-                               'comment' => array('type' => 'text', 'nullable' 
=> False),
-                               'type' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => false,'default' => 'comment'),
-                       ),
-                       'pk' => array('id'),
-                       'fk' => array(
-                               'eventplanner_resource' => array('resource_id' 
=> 'id')),
-                       'ix' => array(),
-                       'uc' => array()
-               ),
                'eventplanner_booking' => array(
                        'fd' => array(
                                'id' => array('type' => 'auto', 'nullable' => 
False),
@@ -273,6 +246,8 @@
                                'reminder' => array('type' => 'int', 
'precision' => 4, 'nullable' => False, 'default' => '0'),
                                'secret' => array('type' => 'text', 'nullable' 
=> False),
                                'sms_total' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
+                               'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
+                               'public' => array('type' => 'int', 'precision' 
=> '2', 'nullable' => True),
                                'created' => array('type' => 'int', 'precision' 
=> '8',  'nullable' => False, 'default' => 'current_timestamp'),
                        ),
                        'pk' => array('id'),
@@ -313,22 +288,10 @@
                        'ix' => array(),
                        'uc' => array()
                ),
-               'eventplanner_booking_resource' => array(
-                       'fd' => array(
-                               'booking_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
-                               'resource_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
-                       ),
-                       'pk' => array('booking_id', 'resource_id'),
-                       'fk' => array(
-                               'eventplanner_booking' => array('booking_id' => 
'id'),
-                               'eventplanner_resource' => array('resource_id' 
=> 'id')
-                       ),
-                       'ix' => array(),
-                       'uc' => array()
-               ),
                'eventplanner_order' => array(
                        'fd' => array(
                                'id' => array('type' => 'int', 'precision' => 
'4', 'nullable' => False),
+                               'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
                                'booking_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
                                'time' => array('type' => 'int', 'precision' => 
'8', 'nullable' => False, 'default' => 'current_timestamp'),
                                'author' => array('type' => 'text', 'nullable' 
=> False),
@@ -356,6 +319,8 @@
                                'id' => array('type' => 'auto', 'nullable' => 
False),
                                'booking_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
                                'created' => array('type' => 'int', 'precision' 
=> '8',  'nullable' => False, 'default' => 'current_timestamp'),
+                               'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
+                               'public' => array('type' => 'int', 'precision' 
=> '2', 'nullable' => True),
 //                             'author' => array('type' => 'text', 'nullable' 
=> False),
                                'json_representation' => array('type' => 
'jsonb', 'nullable' => true),
                        ),
@@ -370,6 +335,8 @@
                                'id' => array('type' => 'auto', 'nullable' => 
False),
                                'booking_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
                                'created' => array('type' => 'int', 'precision' 
=> '8',  'nullable' => False, 'default' => 'current_timestamp'),
+                               'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => False),
+                               'public' => array('type' => 'int', 'precision' 
=> '2', 'nullable' => True),
 //                             'author' => array('type' => 'text', 'nullable' 
=> False),
                                'json_representation' => array('type' => 
'jsonb', 'nullable' => true),
                        ),
@@ -379,4 +346,19 @@
                        'ix' => array(),
                        'uc' => array()
                ),
+               'eventplanner_permission' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'nullable' => 
false),
+                               'subject_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                               'object_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                               'object_type' => array('type' => 'varchar', 
'precision' => '255', 'nullable' => false),
+                               'permission' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                       ),
+                       'pk' => array('id'),
+                       'fk' => array(
+                               'phpgw_accounts' => array('subject_id' => 
'account_id'),
+                       ),
+                       'ix' => array(array('object_id', 'object_type'), 
array('object_type')),
+                       'uc' => array('subject_id', 'permission', 
'object_type', 'object_id'),
+               ),
        );

Modified: branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php  
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php  
2017-02-13 15:29:58 UTC (rev 16300)
@@ -80,3 +80,147 @@
                }
                return $GLOBALS['setup_info']['eventplanner']['currentver'];
        }
+
+       $test[] = '0.9.18.004';
+
+       function eventplanner_upgrade0_9_18_004()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->DropTable('eventplanner_resource_comment');
+               
$GLOBALS['phpgw_setup']->oProc->DropTable('eventplanner_booking_resource');
+               
$GLOBALS['phpgw_setup']->oProc->DropTable('eventplanner_resource');
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_vendor', 'owner_id', 
array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_vendor', 'public', 
array(
+                       'type' => 'int', 'precision' => 2, 'nullable' => True));
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 'owner_id', 
array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 'public', 
array(
+                       'type' => 'int', 'precision' => 2, 'nullable' => True));
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_booking', 'owner_id', 
array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_booking', 'public', 
array(
+                       'type' => 'int', 'precision' => 2, 'nullable' => True));
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_order', 
'owner_id', array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => 
false));
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_application', 'public', 
array(
+                       'type' => 'int', 'precision' => 2, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_booking_vendor_report', 
'owner_id', array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_booking_vendor_report', 
'public', array(
+                       'type' => 'int', 'precision' => 2, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_booking_customer_report',
 'owner_id', array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_booking_customer_report',
 'public', array(
+                       'type' => 'int', 'precision' => 2, 'nullable' => True));
+
+               $sql = "UPDATE eventplanner_vendor SET owner_id = 7";
+               $GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
+               $sql = "UPDATE eventplanner_customer SET owner_id = 7";
+               $GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
+               $sql = "UPDATE eventplanner_booking SET owner_id = 7";
+               $GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
+               $sql = "UPDATE eventplanner_booking_vendor_report SET owner_id 
= 7";
+               $GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
+               $sql = "UPDATE eventplanner_booking_customer_report SET 
owner_id = 7";
+               $GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
+
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('eventplanner_vendor', 'owner_id', 
array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => 
false));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('eventplanner_customer', 
'owner_id', array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => 
false));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('eventplanner_booking', 'owner_id', 
array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => 
false));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('eventplanner_booking_vendor_report',
 'owner_id', array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => 
false));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('eventplanner_booking_customer_report',
 'owner_id', array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => 
false));
+
+
+               $GLOBALS['phpgw']->locations->delete('eventplanner', 
'.resource');
+               $GLOBALS['phpgw']->locations->add('.events', 'events', 
'eventplanner', $allow_grant = true);
+
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['eventplanner']['currentver'] = 
'0.9.18.005';
+               }
+               return $GLOBALS['setup_info']['eventplanner']['currentver'];
+       }
+
+       $test[] = '0.9.18.005';
+
+       function eventplanner_upgrade0_9_18_005()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'eventplanner_permission', array(
+                               'fd' => array(
+                                       'id' => array('type' => 'auto', 
'nullable' => false),
+                                       'subject_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                                       'object_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                                       'object_type' => array('type' => 
'varchar', 'precision' => '255', 'nullable' => false),
+                                       'permission' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array(
+                                       'phpgw_accounts' => array('subject_id' 
=> 'account_id'),
+                               ),
+                               'ix' => array(array('object_id', 
'object_type'), array('object_type')),
+                               'uc' => array('subject_id', 'permission', 
'object_type', 'object_id'),
+                       )
+               );
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['eventplanner']['currentver'] = 
'0.9.18.006';
+               }
+               return $GLOBALS['setup_info']['eventplanner']['currentver'];
+       }
+
+       $test[] = '0.9.18.006';
+       function eventplanner_upgrade0_9_18_006()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'contact2_name', array(
+                       'type' => 'text',
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'contact2_email', array(
+                       'type' => 'text',
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'contact2_phone', array(
+                       'type' => 'text',
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'max_events', array(
+                       'type' => 'int',
+                       'precision' => 4,
+                       'nullable' => true
+               ));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_customer', 
'number_of_users', array(
+                       'type' => 'int',
+                       'precision' => 4,
+                       'nullable' => true
+               ));
+
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('eventplanner_customer','account_number',
 array(
+                       'type' => 'varchar',
+                       'precision' => '20',
+                       'nullable' => true));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['eventplanner']['currentver'] = 
'0.9.18.007';
+               }
+               return $GLOBALS['setup_info']['eventplanner']['currentver'];
+       }

Modified: branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl  
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl  
2017-02-13 15:29:58 UTC (rev 16300)
@@ -24,7 +24,7 @@
                <xsl:value-of select="mode"/>
        </xsl:variable>
 
-       <div>
+       <div class="content">
                <script type="text/javascript">
                        var lang = <xsl:value-of 
select="php:function('js_lang', 'Name or company is required', 'please enter a 
valid organization number', 'please enter a valid account number')"/>;
                </script>
@@ -34,6 +34,10 @@
                                <input type="hidden" id="active_tab" 
name="active_tab" value="{value_active_tab}"/>
                                <div id="first_tab">
                                        <fieldset>
+                                               <legend>
+                                                       <xsl:value-of 
select="php:function('lang', 'customer')"/>
+                                               </legend>
+
                                                <xsl:if test="customer/id > 0">
                                                        <div 
class="pure-control-group">
                                                                <label>
@@ -44,16 +48,6 @@
                                                        </div>
                                                </xsl:if>
                                                <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'active')"/>
-                                                       </label>
-                                                       <input type="checkbox" 
name="active" id="active" value="1">
-                                                               <xsl:if 
test="customer/active = 1">
-                                                                       
<xsl:attribute name="checked" value="checked"/>
-                                                               </xsl:if>
-                                                       </input>
-                                               </div>
-                                               <div class="pure-control-group">
                                                        <xsl:variable 
name="lang_category">
                                                                <xsl:value-of 
select="php:function('lang', 'category')"/>
                                                        </xsl:variable>
@@ -152,6 +146,35 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'account number')"/>
+                                                       </label>
+                                                       <input type="text" 
id="account_number" name="account_number" value="{customer/account_number}">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>account_number</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'account number')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'number of users')"/>
+                                                       </label>
+                                                       <input type="text" 
name="number_of_users" value="{customer/number_of_users}">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>number</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'integer')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'contact name')"/>
                                                        </label>
                                                        <input type="text" 
name="contact_name" value="{customer/contact_name}">
@@ -199,22 +222,62 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'account number')"/>
+                                                               <xsl:value-of 
select="php:function('lang', 'contact name')"/>
+                                                               <xsl:text> 
2</xsl:text>
                                                        </label>
-                                                       <input type="text" 
id="account_number" name="account_number" value="{customer/account_number}">
+                                                       <input type="text" 
name="contact2_name" id="contact2_name" value="{customer/contact2_name}">
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'contact name')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'email')"/>
+                                                               <xsl:text> 
2</xsl:text>
+                                                       </label>
+                                                       <input type="text" 
name="contact2_email" id="contact2_email" value="{customer/contact2_email}">
                                                                <xsl:attribute 
name="data-validation">
-                                                                       
<xsl:text>account_number</xsl:text>
+                                                                       
<xsl:text>email</xsl:text>
                                                                </xsl:attribute>
                                                                <xsl:attribute 
name="data-validation-optional">
                                                                        
<xsl:text>true</xsl:text>
                                                                </xsl:attribute>
                                                                <xsl:attribute 
name="placeholder">
-                                                                       
<xsl:value-of select="php:function('lang', 'account number')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'email')"/>
                                                                </xsl:attribute>
                                                        </input>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="valid_email = 1">
+                                                                       
<xsl:text> </xsl:text>
+                                                                       <a 
href="{link_create_user}">
+                                                                               
<xsl:value-of select="php:function('lang', 'create_user_based_on_email_link')"/>
+                                                                       </a>
+                                                               </xsl:when>
+                                                       </xsl:choose>
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'contact phone')"/>
+                                                               <xsl:text> 
2</xsl:text>
+                                                       </label>
+                                                       <input type="text" 
name="contact2_phone" id="contact2_phone" value="{customer/contact2_phone}">
+                                                               <xsl:attribute 
name="data-validation-depends-on">
+                                                                       
<xsl:text>contact2_name</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-optional">
+                                                                       
<xsl:text>true</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'contact phone')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'description')"/>
                                                        </label>
                                                        <textarea cols="47" 
rows="7" name="description">
@@ -229,8 +292,36 @@
                                                                <xsl:value-of 
select="customer/remark"/>
                                                        </textarea>
                                                </div>
+                                       </fieldset>
+                                       <fieldset>
+                                               <legend>
+                                                       <xsl:value-of 
select="php:function('lang', 'proceedings')"/>
+                                               </legend>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'active')"/>
+                                                       </label>
+                                                       <input type="checkbox" 
name="active" id="active" value="1">
+                                                               <xsl:if 
test="customer/active = 1">
+                                                                       
<xsl:attribute name="checked" value="checked"/>
+                                                               </xsl:if>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'maximum number of events')"/>
+                                                       </label>
+                                                       <input type="text" 
name="max_events" value="{customer/max_events}">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>number</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="php:function('lang', 'integer')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'comment')"/>
                                                        </label>
                                                        <textarea cols="47" 
rows="7" name="comment">

Modified: branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/events.xsl    
2017-02-13 11:21:25 UTC (rev 16299)
+++ branches/dev-syncromind-2/eventplanner/templates/base/events.xsl    
2017-02-13 15:29:58 UTC (rev 16300)
@@ -25,7 +25,7 @@
                <xsl:value-of select="mode"/>
        </xsl:variable>
 
-       <div>
+       <div class="content">
                <script type="text/javascript">
                        var lang = <xsl:value-of 
select="php:function('js_lang', 'Name or company is required')"/>;
                </script>

Copied: branches/dev-syncromind-2/eventplanner/templates/base/permission.xsl 
(from rev 16299, trunk/eventplanner/templates/base/permission.xsl)
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/permission.xsl        
                        (rev 0)
+++ branches/dev-syncromind-2/eventplanner/templates/base/permission.xsl        
2017-02-13 15:29:58 UTC (rev 16300)
@@ -0,0 +1,238 @@
+
+<!-- $Id: price_item.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+<xsl:template match="data">
+       <xsl:choose>
+               <xsl:when test="edit">
+                       <xsl:apply-templates select="edit" />
+               </xsl:when>
+               <xsl:when test="view">
+                       <xsl:apply-templates select="view" />
+               </xsl:when>
+       </xsl:choose>
+
+</xsl:template>
+
+<!-- add / edit  -->
+<xsl:template xmlns:php="http://php.net/xsl"; match="edit">
+       <xsl:variable name="date_format">
+               <xsl:value-of select="php:function('get_phpgw_info', 
'user|preferences|common|dateformat')" />
+       </xsl:variable>
+       <xsl:variable name="form_action">
+               <xsl:value-of select="form_action"/>
+       </xsl:variable>
+       <xsl:variable name="mode">
+               <xsl:value-of select="mode"/>
+       </xsl:variable>
+
+       <div class="content">
+               <script type="text/javascript">
+                       var lang = <xsl:value-of 
select="php:function('js_lang', 'Name or company is required', 'please enter a 
valid organization number', 'please enter a valid account number')"/>;
+               </script>
+               <form id="form" name="form" method="post" 
action="{$form_action}" class="pure-form pure-form-aligned">
+                       <div id="tab-content">
+                               <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
+                               <input type="hidden" id="active_tab" 
name="active_tab" value="{value_active_tab}"/>
+                               <div id="first_tab">
+                                       <fieldset>
+                                               <xsl:if test="permission/id > 
0">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'id')"/>
+                                                               </label>
+                                                               <input 
type="hidden" name="id" value="{permission/id}"/>
+                                                               <xsl:value-of 
select="permission/id"/>
+                                                       </div>
+                                               </xsl:if>
+                                               <div class="pure-control-group">
+                                                       <xsl:variable 
name="lang_category">
+                                                               <xsl:value-of 
select="php:function('lang', 'category')"/>
+                                                       </xsl:variable>
+                                                       <label>
+                                                               <xsl:value-of 
select="$lang_category"/>
+                                                       </label>
+                                                       <select 
id="object_type" name="object_type">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="$lang_category"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>required</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-error-msg">
+                                                                       
<xsl:value-of select="$lang_category"/>
+                                                               </xsl:attribute>
+                                                               
<xsl:apply-templates select="object_type_list/options"/>
+                                                       </select>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <xsl:variable 
name="lang_user">
+                                                               <xsl:value-of 
select="php:function('lang', 'user')"/>
+                                                       </xsl:variable>
+                                                       <label>
+                                                               <xsl:value-of 
select="$lang_user"/>
+                                                       </label>
+                                                       <select id="subject_id" 
name="subject_id">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="$lang_user"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>required</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-error-msg">
+                                                                       
<xsl:value-of select="$lang_user"/>
+                                                               </xsl:attribute>
+                                                               
<xsl:apply-templates select="subject_list/options"/>
+                                                       </select>
+
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <xsl:variable 
name="lang_object">
+                                                               <xsl:value-of 
select="php:function('lang', 'object')"/>
+                                                       </xsl:variable>
+                                                       <label>
+                                                               <xsl:value-of 
select="$lang_object"/>
+                                                       </label>
+                                                       <input type="hidden" 
id="object_id" name="object_id"  value="{permission/object_id}">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>required</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-error-msg">
+                                                                       
<xsl:value-of select="$lang_object"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="$lang_object"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                                       <input type="text" 
id="object_name" name="object_name" value="{permission/object_name}">
+                                                               <xsl:attribute 
name="placeholder">
+                                                                       
<xsl:value-of select="$lang_object"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>required</xsl:text>
+                                                               </xsl:attribute>
+                                                       </input>
+                                                       <div 
id="object_container"/>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <xsl:variable 
name="lang_permission">
+                                                               <xsl:value-of 
select="php:function('lang', 'permission')"/>
+                                                       </xsl:variable>
+                                                       <label>
+                                                               <xsl:value-of 
select="$lang_permission"/>
+                                                       </label>
+                                                       <div 
class="pure-custom">
+                                                               <table 
class="pure-table pure-table-bordered" border="0" cellspacing="2" 
cellpadding="2">
+                                                                       <thead>
+                                                                               
<tr>
+                                                                               
        <th>
+                                                                               
                <xsl:value-of select="php:function('lang', 'read')"/>
+                                                                               
        </th>
+                                                                               
        <th>
+                                                                               
                <xsl:value-of select="php:function('lang', 'add')"/>
+                                                                               
        </th>
+                                                                               
        <th>
+                                                                               
                <xsl:value-of select="php:function('lang', 'edit')"/>
+                                                                               
        </th>
+                                                                               
        <th>
+                                                                               
                <xsl:value-of select="php:function('lang', 'delete')"/>
+                                                                               
        </th>
+                                                                               
</tr>
+                                                                       </thead>
+                                                                       <tbody>
+                                                                               
<tr>
+                                                                               
        <td>
+                                                                               
                <input type="checkbox" id="permission_1" 
name="permission[read]" value="1">
+                                                                               
                        <xsl:if test="floor(permission/permission div 1) mod 2 
= 1">
+                                                                               
                                <xsl:attribute name="checked" value="checked"/>
+                                                                               
                        </xsl:if>
+                                                                               
                        <xsl:attribute name="data-validation">
+                                                                               
                                <xsl:text>permission</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
        <td>
+                                                                               
                <input type="checkbox" id="permission_2" name="permission[add]" 
value="2">
+                                                                               
                        <xsl:if test="floor(permission/permission div 2) mod 2 
= 1">
+                                                                               
                                <xsl:attribute name="checked" value="checked"/>
+                                                                               
                        </xsl:if>
+                                                                               
                        <xsl:attribute name="data-validation">
+                                                                               
                                <xsl:text>permission</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
        <td>
+                                                                               
                <input type="checkbox" id="permission_4" 
name="permission[edit]" value="4">
+                                                                               
                        <xsl:if test="floor(permission/permission div 4) mod 2 
= 1">
+                                                                               
                                <xsl:attribute name="checked" value="checked"/>
+                                                                               
                        </xsl:if>
+                                                                               
                        <xsl:attribute name="data-validation">
+                                                                               
                                <xsl:text>permission</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
        <td>
+                                                                               
                <input type="checkbox" id="permission_8" 
name="permission[delete]" value="8">
+                                                                               
                        <xsl:if test="floor(permission/permission div 8) mod 2 
= 1">
+                                                                               
                                <xsl:attribute name="checked" value="checked"/>
+                                                                               
                        </xsl:if>
+                                                                               
                        <xsl:attribute name="data-validation">
+                                                                               
                                <xsl:text>permission</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                       </tbody>
+                                                               </table>
+                                                       </div>
+                                               </div>
+                                               <!--object_id, permission-->
+
+                                       </fieldset>
+                               </div>
+                       </div>
+                       <div class="proplist-col">
+                               <input type="submit" class="pure-button 
pure-button-primary" name="save">
+                                       <xsl:attribute name="value">
+                                               <xsl:value-of 
select="php:function('lang', 'save')"/>
+                                       </xsl:attribute>
+                               </input>
+                               <xsl:variable name="cancel_url">
+                                       <xsl:value-of select="cancel_url"/>
+                               </xsl:variable>
+                               <input type="button" class="pure-button 
pure-button-primary" name="cancel" onClick="window.location = '{cancel_url}';">
+                                       <xsl:attribute name="value">
+                                               <xsl:value-of 
select="php:function('lang', 'cancel')"/>
+                                       </xsl:attribute>
+                               </input>
+                       </div>
+               </form>
+       </div>
+</xsl:template>
+
+<xsl:template match="options">
+       <option value="{id}">
+               <xsl:if test="selected != 0">
+                       <xsl:attribute name="selected" value="selected"/>
+               </xsl:if>
+               <xsl:value-of disable-output-escaping="yes" select="name"/>
+       </option>
+</xsl:template>
+
+

@@ Diff output truncated at 153600 characters. @@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]