fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7241] booking: add office and office_user


From: Sigurd Nes
Subject: [Fmsystem-commits] [7241] booking: add office and office_user
Date: Mon, 02 May 2011 08:54:32 +0000

Revision: 7241
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7241
Author:   sigurdne
Date:     2011-05-02 08:54:32 +0000 (Mon, 02 May 2011)
Log Message:
-----------
booking: add office and office_user

Modified Paths:
--------------
    trunk/booking/inc/class.menu.inc.php
    trunk/booking/setup/phpgw_no.lang
    trunk/booking/setup/setup.inc.php
    trunk/booking/setup/tables_update.inc.php

Modified: trunk/booking/inc/class.menu.inc.php
===================================================================
--- trunk/booking/inc/class.menu.inc.php        2011-05-02 05:58:07 UTC (rev 
7240)
+++ trunk/booking/inc/class.menu.inc.php        2011-05-02 08:54:32 UTC (rev 
7241)
@@ -251,6 +251,19 @@
                                                                'text'  => 
lang('Asynchronous Tasks'),
                                                                'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'booking.uiasync_settings.index', 'appname' => 'booking') )
                                                        ),
+                                                       'office'        => array
+                                                       (
+                                                               'text'  => 
lang('office'),
+                                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index', 'type' => 'bb_office') ),
+                                                               'children' => 
array
+                                                               (
+                                                                       
'office_user'   => array
+                                                                       (
+                                                                               
'text'  => lang('office user'),
+                                                                               
'url'   => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index', 'type' => 'bb_office_user') )
+                                                                       )
+                                                               )
+                                                       ),
                                                )
                                        );
                        }
@@ -270,6 +283,11 @@
                                                'text'  => lang('Root 
Permissions'),
                                                'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'booking.uipermission_root.index', 'appname' => 'booking') )
                                        ),
+                                       'acl'   => array
+                                       (
+                                               'text'  => lang('Configure 
Access Permissions'),
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'preferences.uiadmin_acl.list_acl', 'acl_app' => 'booking') )
+                                       ),
                                        'activity'      => array
                                        (
                                                'text'  => lang('Activity'),

Modified: trunk/booking/setup/phpgw_no.lang
===================================================================
--- trunk/booking/setup/phpgw_no.lang   2011-05-02 05:58:07 UTC (rev 7240)
+++ trunk/booking/setup/phpgw_no.lang   2011-05-02 08:54:32 UTC (rev 7241)
@@ -497,3 +497,5 @@
 Delete allocations     booking no      Slett tildelinger
 Allocations that will be deleted       booking no      Tildelinger som vil bli 
slettet
 Allocations  with existing bookings (%1)       booking no      Tildeinger med 
eksisterende bookinger (%1)
+office booking no      Kontor
+office user    booking no      Bruker koplet til kontor

Modified: trunk/booking/setup/setup.inc.php
===================================================================
--- trunk/booking/setup/setup.inc.php   2011-05-02 05:58:07 UTC (rev 7240)
+++ trunk/booking/setup/setup.inc.php   2011-05-02 08:54:32 UTC (rev 7241)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.2.06';
+       $setup_info['booking']['version'] = '0.2.07';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';
@@ -52,7 +52,9 @@
                'bb_account_code_set',
                'bb_completed_reservation_export_configuration',
                'bb_billing_sequential_number_generator',
-               'bb_system_message'
+               'bb_system_message',
+               'bb_office',
+               'bb_office_user'
        );
 
        $setup_info['booking']['description'] = 'Bergen kommune booking';

Modified: trunk/booking/setup/tables_update.inc.php
===================================================================
--- trunk/booking/setup/tables_update.inc.php   2011-05-02 05:58:07 UTC (rev 
7240)
+++ trunk/booking/setup/tables_update.inc.php   2011-05-02 08:54:32 UTC (rev 
7241)
@@ -2509,3 +2509,76 @@
                }
        }
 
+       $test[] = '0.2.06';
+       /**
+       * Update booking version from 0.2.06 to 0.2.07
+       * Add office and office/user relation (User is added as a custom value)
+       * 
+       */
+
+       function booking_upgrade0_2_06()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'bb_office', array(
+                               'fd' => array(
+                                       'id' => array('type' => 'auto', 
'precision' => 4,'nullable' => False),
+                                       'name' => array('type' => 'varchar', 
'precision' => 200,'nullable' => False),
+                                       'user_id' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                                       'entry_date' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                                       'modified_date' => array('type' => 
'int', 'precision' => 4,'nullable' => True),
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array()
+                       )
+               );
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'bb_office_user', array(
+                               'fd' => array(
+                                       'id' => array('type' => 'auto', 
'precision' => 4,'nullable' => False),
+                                       'office' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                                       'user_id' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                                       'entry_date' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
+                                       'modified_date' => array('type' => 
'int', 'precision' => 4,'nullable' => True),
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array('bb_office' => array('office' => 
'id')),
+                               'ix' => array(),
+                               'uc' => array()
+                       )
+               );
+
+               $GLOBALS['phpgw']->locations->add('.office', 'office', 
'booking');
+               $GLOBALS['phpgw']->locations->add('.office.user', 'office/user 
relation', 'booking', false, 'bb_office_user');
+               $GLOBALS['phpgw']->db = 
clone($GLOBALS['phpgw_setup']->oProc->m_odb);
+
+               $attrib = array
+               (
+                       'appname'               => 'booking',
+                       'location'              => '.office.user',
+                       'column_name'   => 'account_id',
+                       'input_text'    => 'User',
+                       'statustext'    => 'System user',
+                       'search'                => true,
+                       'list'                  => true,
+                       'column_info'   => array
+                       (
+                               'type'                  => 'user',
+                               'nullable'              => 'False',
+                               'custom'                => 1
+                       )
+               );
+
+               $GLOBALS['phpgw']->custom_fields->add($attrib, 
'bb_office_user');
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.2.07';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+




reply via email to

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