fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11886] property, bim and carch: relate department to


From: Sigurd Nes
Subject: [Fmsystem-commits] [11886] property, bim and carch: relate department to records
Date: Fri, 04 Apr 2014 12:32:52 +0000

Revision: 11886
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11886
Author:   sigurdne
Date:     2014-04-04 12:32:50 +0000 (Fri, 04 Apr 2014)
Log Message:
-----------
property,bim and carch: relate department to records

Modified Paths:
--------------
    trunk/bim/setup/setup.inc.php
    trunk/bim/setup/tables_current.inc.php
    trunk/bim/setup/tables_update.inc.php
    trunk/catch/setup/setup.inc.php
    trunk/catch/setup/tables_current.inc.php
    trunk/catch/setup/tables_update.inc.php
    trunk/property/inc/class.custom_fields.inc.php
    trunk/property/inc/class.soadmin_entity.inc.php
    trunk/property/inc/class.uiadmin_entity.inc.php
    trunk/property/setup/setup.inc.php
    trunk/property/setup/tables_current.inc.php
    trunk/property/setup/tables_update.inc.php
    trunk/property/templates/base/admin_entity.xsl

Modified: trunk/bim/setup/setup.inc.php
===================================================================
--- trunk/bim/setup/setup.inc.php       2014-04-03 13:15:19 UTC (rev 11885)
+++ trunk/bim/setup/setup.inc.php       2014-04-04 12:32:50 UTC (rev 11886)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['bim']['name']                      = 'bim';
-       $setup_info['bim']['version']           = '0.9.17.506';
+       $setup_info['bim']['version']           = '0.9.17.507';
        $setup_info['bim']['app_order']         = 8;
        $setup_info['bim']['enable']            = 1;
        $setup_info['bim']['app_group']         = 'office';

Modified: trunk/bim/setup/tables_current.inc.php
===================================================================
--- trunk/bim/setup/tables_current.inc.php      2014-04-03 13:15:19 UTC (rev 
11885)
+++ trunk/bim/setup/tables_current.inc.php      2014-04-04 12:32:50 UTC (rev 
11886)
@@ -60,6 +60,7 @@
                                'address' => array('type' => 
'varchar','precision' => '150','nullable' => True),
                                'entry_date' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'user_id' => array('type' => 'int','precision' 
=> '4','nullable' => True),
+                               'department_id' => array('type' => 
'int','precision' => '4','nullable' => True),
                        ),
                        'pk' => array('type','id'),
                        'fk' => array(

Modified: trunk/bim/setup/tables_update.inc.php
===================================================================
--- trunk/bim/setup/tables_update.inc.php       2014-04-03 13:15:19 UTC (rev 
11885)
+++ trunk/bim/setup/tables_update.inc.php       2014-04-04 12:32:50 UTC (rev 
11886)
@@ -166,3 +166,20 @@
                        return $GLOBALS['setup_info']['bim']['currentver'];
                }
        }
+
+       /**
+       * Update bim version from 0.9.17.506 to 0.9.17.507
+       */
+       $test[] = '0.9.17.506';
+       function bim_upgrade0_9_17_506()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_bim_item','department_id', 
array('type' => 'int', 'precision' => 4,'nullable' => true));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['bim']['currentver'] = 
'0.9.17.507';
+                       return $GLOBALS['setup_info']['bim']['currentver'];
+               }
+       }

Modified: trunk/catch/setup/setup.inc.php
===================================================================
--- trunk/catch/setup/setup.inc.php     2014-04-03 13:15:19 UTC (rev 11885)
+++ trunk/catch/setup/setup.inc.php     2014-04-04 12:32:50 UTC (rev 11886)
@@ -27,7 +27,7 @@
         */
 
        $setup_info['catch']['name']                    = 'catch';
-       $setup_info['catch']['version']                 = '0.9.17.515';
+       $setup_info['catch']['version']                 = '0.9.17.516';
        $setup_info['catch']['app_order']               = 20;
        $setup_info['catch']['enable']                  = 1;
        $setup_info['catch']['globals_checked'] = True;

Modified: trunk/catch/setup/tables_current.inc.php
===================================================================
--- trunk/catch/setup/tables_current.inc.php    2014-04-03 13:15:19 UTC (rev 
11885)
+++ trunk/catch/setup/tables_current.inc.php    2014-04-04 12:32:50 UTC (rev 
11886)
@@ -63,6 +63,7 @@
                                'jasperupload' => array('type' => 
'int','precision' => 2,'nullable' => True),
                                'parent_id' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'level' => array('type' => 'int','precision' => 
'4','nullable' => True),
+                               'department' => array('type' => 
'int','precision' => '2','nullable' => True),
                        ),
                        'pk' => array('entity_id','id'),
                        'fk' => array(),

Modified: trunk/catch/setup/tables_update.inc.php
===================================================================
--- trunk/catch/setup/tables_update.inc.php     2014-04-03 13:15:19 UTC (rev 
11885)
+++ trunk/catch/setup/tables_update.inc.php     2014-04-04 12:32:50 UTC (rev 
11886)
@@ -483,3 +483,22 @@
                }
        }
 
+       /**
+       * Update catch version from 0.9.17.515 to 0.9.17.516
+       * Add department-flag to entities
+       */
+
+       $test[] = '0.9.17.515';
+       function catch_upgrade0_9_17_515()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_catch_category','department',array('type'
 => 'int','precision' => 2,'nullable' => True));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['catch']['currentver'] = 
'0.9.17.516';
+                       return $GLOBALS['setup_info']['catch']['currentver'];
+               }
+       }
+

Modified: trunk/property/inc/class.custom_fields.inc.php
===================================================================
--- trunk/property/inc/class.custom_fields.inc.php      2014-04-03 13:15:19 UTC 
(rev 11885)
+++ trunk/property/inc/class.custom_fields.inc.php      2014-04-04 12:32:50 UTC 
(rev 11886)
@@ -74,6 +74,9 @@
 
                        $location_id    = 
$GLOBALS['phpgw']->locations->get_id($appname, $location);
 
+//                     _debug_array($location_id);
+//                     _debug_array($values);die();
+
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
 
                        $input_type_array = array

Modified: trunk/property/inc/class.soadmin_entity.inc.php
===================================================================
--- trunk/property/inc/class.soadmin_entity.inc.php     2014-04-03 13:15:19 UTC 
(rev 11885)
+++ trunk/property/inc/class.soadmin_entity.inc.php     2014-04-04 12:32:50 UTC 
(rev 11886)
@@ -452,7 +452,8 @@
                                        'jasperupload'                          
=> $this->db->f('jasperupload'),
                                        'parent_id'                             
        => $this->db->f('parent_id'),
                                        'level'                                 
        => $this->db->f('level'),
-                                       'location_id'                           
=> $this->db->f('location_id')
+                                       'location_id'                           
=> $this->db->f('location_id'),
+                                       'department'                            
=> $this->db->f('department')
                                        );
                        }
 
@@ -629,12 +630,13 @@
                                        $values['enable_bulk'],
                                        $values['jasperupload'],
                                        $values['parent_id'],
+                                       $values['department'],
                                        $level
                                );
 
                        $values_insert  = 
$this->db->validate_insert($values_insert);
 
-                       $this->db->query("INSERT INTO {$table} 
(location_id,entity_id,id,name, 
descr,prefix,lookup_tenant,tracking,location_level,location_link_level,fileupload,loc_link,start_project,start_ticket,is_eav,enable_bulk,jasperupload,parent_id,level
 ) "
+                       $this->db->query("INSERT INTO {$table} 
(location_id,entity_id,id,name, 
descr,prefix,lookup_tenant,tracking,location_level,location_link_level,fileupload,loc_link,start_project,start_ticket,is_eav,enable_bulk,jasperupload,parent_id,department,level
 ) "
                                . "VALUES ($values_insert)",__LINE__,__FILE__);
 
 
@@ -850,7 +852,8 @@
                                                'enable_bulk'                   
        => $entity['enable_bulk'],
                                                'jasperupload'                  
        => $entity['jasperupload'],
                                                'parent_id'                     
                => $entity['parent_id'],
-                                               'level'                         
                => $level
+                                               'level'                         
                => $level,
+                                               'department'                    
        => $entity['department']
                                        );
 
                                $value_set      = 
$this->db->validate_update($value_set);

Modified: trunk/property/inc/class.uiadmin_entity.inc.php
===================================================================
--- trunk/property/inc/class.uiadmin_entity.inc.php     2014-04-03 13:15:19 UTC 
(rev 11885)
+++ trunk/property/inc/class.uiadmin_entity.inc.php     2014-04-04 12:32:50 UTC 
(rev 11886)
@@ -1170,7 +1170,9 @@
                                        'lang_no_location_link_level'           
        => lang('None'),
                                        'tracking'                              
                        => true,
                                        'value_tracking'                        
                => $values['tracking'],
-                                       'fileupload'                            
                => true,
+                                       'department'                            
                => true,
+                                       'value_department'                      
                => $values['department'],
+                                       'fileupload'                            
                => true,
                                        'value_fileupload'                      
                => $values['fileupload'],
                                        'value_jasperupload'                    
        => $values['jasperupload'],
                                        'loc_link'                              
                        => true,

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2014-04-03 13:15:19 UTC (rev 11885)
+++ trunk/property/setup/setup.inc.php  2014-04-04 12:32:50 UTC (rev 11886)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.678';
+       $setup_info['property']['version']              = '0.9.17.679';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2014-04-03 13:15:19 UTC (rev 
11885)
+++ trunk/property/setup/tables_current.inc.php 2014-04-04 12:32:50 UTC (rev 
11886)
@@ -1906,7 +1906,8 @@
                                'enable_bulk' => array('type' => 
'int','precision' => '2','nullable' => True),
                                'jasperupload' => array('type' => 
'int','precision' => '2','nullable' => True),
                                'parent_id' => array('type' => 
'int','precision' => '4','nullable' => True),
-                               'level' => array('type' => 'int','precision' => 
'4','nullable' => True)
+                               'level' => array('type' => 'int','precision' => 
'4','nullable' => True),
+                               'department' => array('type' => 
'int','precision' => '2','nullable' => True),
                        ),
                        'pk' => array('entity_id','id'),
                        'fk' => array(),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2014-04-03 13:15:19 UTC (rev 
11885)
+++ trunk/property/setup/tables_update.inc.php  2014-04-04 12:32:50 UTC (rev 
11886)
@@ -7917,4 +7917,23 @@
                        $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.678';
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
-       }
\ No newline at end of file
+       }
+       /**
+       * Update property version from 0.9.17.678 to 0.9.17.679
+       * Add department-flag to entities
+       */
+
+
+       $test[] = '0.9.17.678';
+       function property_upgrade0_9_17_678()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_entity_category','department',array('type'
 => 'int','precision' => 2,'nullable' => True));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.679';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }

Modified: trunk/property/templates/base/admin_entity.xsl
===================================================================
--- trunk/property/templates/base/admin_entity.xsl      2014-04-03 13:15:19 UTC 
(rev 11885)
+++ trunk/property/templates/base/admin_entity.xsl      2014-04-04 12:32:50 UTC 
(rev 11886)
@@ -623,6 +623,31 @@
                                                </xsl:when>
                                        </xsl:choose>
                                        <xsl:choose>
+                                               <xsl:when test="department != 
''">
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:variable name="lang_department">
+                                                                               
<xsl:value-of select="php:function('lang', 'department')"/>
+                                                                       
</xsl:variable>
+                                                                       
<xsl:value-of select="$lang_department"/>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="checkbox" name="values[department]" value="1">
+                                                                               
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'department')"/>
+                                                                               
        </xsl:attribute>
+                                                                               
<xsl:if test="value_department = '1'">
+                                                                               
        <xsl:attribute name="checked">
+                                                                               
                <xsl:text>checked</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</xsl:if>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                               </xsl:when>
+                                       </xsl:choose>
+
+                                       <xsl:choose>
                                                <xsl:when test="lookup_tenant 
!= ''">
                                                        <tr>
                                                                <td>




reply via email to

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