fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10971] property: condition survey / request


From: Sigurd Nes
Subject: [Fmsystem-commits] [10971] property: condition survey / request
Date: Wed, 06 Mar 2013 14:36:07 +0000

Revision: 10971
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10971
Author:   sigurdne
Date:     2013-03-06 14:36:04 +0000 (Wed, 06 Mar 2013)
Log Message:
-----------
property: condition survey / request

Modified Paths:
--------------
    trunk/property/inc/class.bocommon.inc.php
    trunk/property/inc/class.borequest.inc.php
    trunk/property/inc/class.menu.inc.php
    trunk/property/inc/class.sogeneric.inc.php
    trunk/property/inc/class.sorequest.inc.php
    trunk/property/inc/class.uirequest.inc.php
    trunk/property/setup/phpgw_no.lang
    trunk/property/setup/setup.inc.php
    trunk/property/setup/tables_current.inc.php
    trunk/property/setup/tables_update.inc.php
    trunk/property/templates/base/request.xsl

Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php   2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/inc/class.bocommon.inc.php   2013-03-06 14:36:04 UTC (rev 
10971)
@@ -1423,7 +1423,6 @@
                        }
 
                        $categories = 
execMethod('property.sogeneric.get_list',$data);
-
                        return 
$this->select_list($data['selected'],$categories);
                }
 

Modified: trunk/property/inc/class.borequest.inc.php
===================================================================
--- trunk/property/inc/class.borequest.inc.php  2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/inc/class.borequest.inc.php  2013-03-06 14:36:04 UTC (rev 
10971)
@@ -46,6 +46,7 @@
                public $sum_potential_grants = 0;
                public $sum_consume = 0;
                public $acl_location = '.project.request';
+               public $responsible_unit;
 
                var $public_functions = array
                        (
@@ -72,22 +73,23 @@
                                $this->use_session = true;
                        }
 
-                       $start                  = phpgw::get_var('start', 
'int', 'REQUEST', 0);
-                       $query                  = phpgw::get_var('query');
-                       $sort                   = phpgw::get_var('sort');
-                       $order                  = phpgw::get_var('order');
-                       $filter                 = phpgw::get_var('filter', 
'int');
-                       $property_cat_id= phpgw::get_var('property_cat_id', 
'int');
-                       $district_id    = phpgw::get_var('district_id', 'int');
-                       $cat_id                 = phpgw::get_var('cat_id', 
'int');
-                       $status_id              = phpgw::get_var('status_id');
-                       $degree_id              = phpgw::get_var('degree_id', 
'int');
-                       $allrows                = phpgw::get_var('allrows', 
'bool');
-                       $this->p_num    = phpgw::get_var('p_num');
+                       $start                          = 
phpgw::get_var('start', 'int', 'REQUEST', 0);
+                       $query                          = 
phpgw::get_var('query');
+                       $sort                           = 
phpgw::get_var('sort');
+                       $order                          = 
phpgw::get_var('order');
+                       $filter                         = 
phpgw::get_var('filter', 'int');
+                       $property_cat_id        = 
phpgw::get_var('property_cat_id', 'int');
+                       $district_id            = phpgw::get_var('district_id', 
'int');
+                       $cat_id                         = 
phpgw::get_var('cat_id', 'int');
+                       $status_id                      = 
phpgw::get_var('status_id');
+                       $degree_id                      = 
phpgw::get_var('degree_id', 'int');
+                       $allrows                        = 
phpgw::get_var('allrows', 'bool');
+                       $this->p_num            = phpgw::get_var('p_num');
 
-                       $start_date             = phpgw::get_var('start_date');
-                       $end_date               = phpgw::get_var('end_date');
-                       $building_part  = phpgw::get_var('building_part');
+                       $start_date                     = 
phpgw::get_var('start_date');
+                       $end_date                       = 
phpgw::get_var('end_date');
+                       $building_part          = 
phpgw::get_var('building_part');
+                       $responsible_unit       = 
phpgw::get_var('responsible_unit', 'int');
 
                        $this->condition_survey_id = 
phpgw::get_var('condition_survey_id', 'int', 'REQUEST', 0);
 
@@ -141,6 +143,11 @@
                                $this->building_part = $building_part;
                        }
 
+                       if(isset($_POST['responsible_unit']) || 
isset($_GET['responsible_unit']))
+                       {
+                               $this->responsible_unit = $responsible_unit;
+                       }
+
                        if($allrows)
                        {
                                $this->allrows = $allrows;
@@ -180,6 +187,7 @@
                        $this->status_id                = $data['status_id'];
                        $this->degree_id                = $data['degree_id'];
                        $this->building_part    = $data['building_part'];
+                       $this->responsible_unit = $data['responsible_unit'];
                        $this->start_date               = 
isset($data['start_date']) ? $data['start_date']: '';
                        $this->end_date                 = 
isset($data['end_date']) ? $data['end_date']: '';
                }
@@ -479,7 +487,8 @@
                                'project_id' => 
$data['project_id'],'allrows'=>$data['allrows'],'list_descr' => 
$data['list_descr'],
                                'dry_run'=>$data['dry_run'], 'p_num' => 
$this->p_num,'start_date'=>$this->start_date,'end_date'=>$this->end_date,
                                'property_cat_id' => $this->property_cat_id, 
'building_part' => $this->building_part,
-                               'degree_id' => $this->degree_id, 
'attrib_filter' => $attrib_filter, 'condition_survey_id' => 
$this->condition_survey_id));
+                               'degree_id' => $this->degree_id, 
'attrib_filter' => $attrib_filter, 'condition_survey_id' => 
$this->condition_survey_id,
+                               'responsible_unit' => $this->responsible_unit));
 
                        $this->total_records                    = 
$this->so->total_records;
                        $this->sum_investment                   = 
$this->so->sum_investment;

Modified: trunk/property/inc/class.menu.inc.php
===================================================================
--- trunk/property/inc/class.menu.inc.php       2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/inc/class.menu.inc.php       2013-03-06 14:36:04 UTC (rev 
10971)
@@ -477,6 +477,11 @@
                                                        'text'  => 
lang('Request status'),
                                                        'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index', 'type' => 'request_status') )
                                                ),
+                                               'request_responsible_unit'      
=> array
+                                               (
+                                                       'text'  => 
lang('responsible unit'),
+                                                       'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index', 'type' => 'request_responsible_unit') )
+                                               ),
                                                'request_condition'     => array
                                                (
                                                        'text'  => 
lang('Request condition_type'),

Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php  2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/inc/class.sogeneric.inc.php  2013-03-06 14:36:04 UTC (rev 
10971)
@@ -1193,6 +1193,37 @@
                                        );
                                break;
 
+                       case 'request_responsible_unit':
+                               $_lang_responsible_unit = lang('responsible 
unit');
+                               $info = array
+                                       (
+                                               'table'                         
=> 'fm_request_responsible_unit',
+                                               'id'                            
=> array('name' => 'id', 'type' => 'int'),
+                                               'fields'                        
=> array
+                                               (
+                                                       array
+                                                       (
+                                                               'name' => 
'name',
+                                                               'descr' => 
lang('name'),
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'descr',
+                                                               'descr' => 
lang('descr'),
+                                                               'type' => 
'varchar'
+                                                       )
+                                               ),
+                                               'edit_msg'                      
=> lang('edit') . ' ' . $_lang_responsible_unit,
+                                               'add_msg'                       
=> lang('add') . ' ' . $_lang_responsible_unit,
+                                               'name'                          
=> $_lang_responsible_unit,
+                                               'acl_app'                       
=> 'property',
+                                               'acl_location'          => 
'.admin',
+                                               'menu_selection'        => 
'admin::property::request_responsible_unit'
+                                       );
+                               break;
+
+
                                //-------- ID type varchar
                        case 'project_status':
                                $info = array

Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php  2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/inc/class.sorequest.inc.php  2013-03-06 14:36:04 UTC (rev 
10971)
@@ -295,26 +295,27 @@
 
                function read($data)
                {
-                       $start                  = isset($data['start']) && 
$data['start'] ? (int)$data['start'] : 0;
-                       $filter                 = 
isset($data['filter'])?$data['filter']:'';
-                       $query                  = 
isset($data['query'])?$data['query']:'';
-                       $sort                   = isset($data['sort']) && 
$data['sort'] ? $data['sort'] : 'DESC';
-                       $order                  = 
isset($data['order'])?$data['order']:'';
-                       $cat_id                 = 
isset($data['cat_id'])?$data['cat_id']:0;
-                       $property_cat_id= 
isset($data['property_cat_id'])?$data['property_cat_id']:0;
-                       $status_id              = isset($data['status_id']) && 
$data['status_id'] ? $data['status_id']:'';
-                       $district_id    = isset($data['district_id']) && 
$data['district_id'] ? $data['district_id']:0;
-                       $project_id             = 
isset($data['project_id'])?$data['project_id']:'';
-                       $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
-                       $list_descr             = 
isset($data['list_descr'])?$data['list_descr']:'';
-                       $dry_run                = isset($data['dry_run']) ? 
$data['dry_run'] : '';
-                       $p_num                  = isset($data['p_num']) ? 
$data['p_num'] : '';
-                       $start_date             = isset($data['start_date']) && 
$data['start_date'] ? phpgwapi_datetime::date_to_timestamp($data['start_date']) 
: 0;
-                       $end_date               = isset($data['end_date']) && 
$data['end_date'] ? phpgwapi_datetime::date_to_timestamp($data['end_date']) : 0;
-                       $building_part  = isset($data['building_part']) && 
$data['building_part'] ? (int)$data['building_part'] : 0;
-                       $degree_id              = $data['degree_id'];
-                       $attrib_filter  = $data['attrib_filter'] ? 
$data['attrib_filter'] : array();
-                       $condition_survey_id = $data['condition_survey_id'] ? 
(int) $data['condition_survey_id'] : 0;
+                       $start                                  = 
isset($data['start']) && $data['start'] ? (int)$data['start'] : 0;
+                       $filter                                 = 
isset($data['filter'])?$data['filter']:'';
+                       $query                                  = 
isset($data['query'])?$data['query']:'';
+                       $sort                                   = 
isset($data['sort']) && $data['sort'] ? $data['sort'] : 'DESC';
+                       $order                                  = 
isset($data['order'])?$data['order']:'';
+                       $cat_id                                 = 
isset($data['cat_id'])?$data['cat_id']:0;
+                       $property_cat_id                = 
isset($data['property_cat_id'])?$data['property_cat_id']:0;
+                       $status_id                              = 
isset($data['status_id']) && $data['status_id'] ? $data['status_id']:'';
+                       $district_id                    = 
isset($data['district_id']) && $data['district_id'] ? $data['district_id']:0;
+                       $project_id                             = 
isset($data['project_id'])?$data['project_id']:'';
+                       $allrows                                = 
isset($data['allrows'])?$data['allrows']:'';
+                       $list_descr                             = 
isset($data['list_descr'])?$data['list_descr']:'';
+                       $dry_run                                = 
isset($data['dry_run']) ? $data['dry_run'] : '';
+                       $p_num                                  = 
isset($data['p_num']) ? $data['p_num'] : '';
+                       $start_date                             = 
isset($data['start_date']) && $data['start_date'] ? 
phpgwapi_datetime::date_to_timestamp($data['start_date']) : 0;
+                       $end_date                               = 
isset($data['end_date']) && $data['end_date'] ? 
phpgwapi_datetime::date_to_timestamp($data['end_date']) : 0;
+                       $building_part                  = 
isset($data['building_part']) && $data['building_part'] ? 
(int)$data['building_part'] : 0;
+                       $degree_id                              = 
$data['degree_id'];
+                       $attrib_filter                  = 
$data['attrib_filter'] ? $data['attrib_filter'] : array();
+                       $condition_survey_id    = $data['condition_survey_id'] 
? (int) $data['condition_survey_id'] : 0;
+                       $responsible_unit               = 
(int)$data['responsible_unit'];
 
                        $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', '.project.request');
                        $attribute_table = 'phpgw_cust_attribute';
@@ -689,6 +690,12 @@
                                $where= 'AND';
                        }
 
+                       if ($responsible_unit)
+                       {
+                               $filtermethod .= " $where 
fm_request.responsible_unit='$responsible_unit'";
+                               $where = 'AND';
+                       }
+
                        if($query)
                        {
                                if(stristr($query, '.') && $p_num)
@@ -844,6 +851,8 @@
                                        'tenant_id'                             
        => $this->_db->f('tenant_id'),
                                        'owner'                                 
        => $this->_db->f('owner'),
                                        'coordinator'                           
=> $this->_db->f('coordinator'),
+                                       'responsible_unit'                      
=> $this->_db->f('responsible_unit'),
+                                       'recommended_year'                      
=> $this->_db->f('recommended_year'),
                                        'access'                                
        => $this->_db->f('access'),
                                        'start_date'                            
=> $this->_db->f('start_date'),
                                        'end_date'                              
        => $this->_db->f('end_date'),
@@ -991,6 +1000,8 @@
                        $value_set['end_date']                                  
= $request['end_date'];
                        $value_set['regulations']                               
= $request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' : 
'';
                        $value_set['condition_survey_id']               = 
$request['condition_survey_id'];
+                       $value_set['responsible_unit']                  = 
$request['responsible_unit'];
+                       $value_set['recommended_year']                  = 
$request['recommended_year'];
 
                        $cols = implode(',', array_keys($value_set));
                        $values = 
$this->_db->validate_insert(array_values($value_set));
@@ -1132,7 +1143,9 @@
                                'address'                                       
=> $address,
                                'authorities_demands'           => 
$request['authorities_demands'],
                                'building_part'                         => 
$request['building_part'],
-                               'regulations'                           => 
$request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' : ''
+                               'regulations'                           => 
$request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' : '',
+                               'responsible_unit'                      => 
$request['responsible_unit'],
+                               'recommended_year'                      => 
$request['recommended_year']
                        );
 
                        while (is_array($request['location']) && 
list($input_name,$value) = each($request['location']))

Modified: trunk/property/inc/class.uirequest.inc.php
===================================================================
--- trunk/property/inc/class.uirequest.inc.php  2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/inc/class.uirequest.inc.php  2013-03-06 14:36:04 UTC (rev 
10971)
@@ -97,6 +97,7 @@
                        $this->p_num                            = 
$this->bo->p_num;
                        $this->condition_survey_id      = 
$this->bo->condition_survey_id;
                        $this->nonavbar                         = 
phpgw::get_var('nonavbar', 'bool');
+                       $this->responsible_unit         = 
$this->bo->responsible_unit;
 
                        if( $this->nonavbar )
                        {
@@ -124,7 +125,8 @@
                                'start_date'            => $this->start_date,
                                'end_date'                      => 
$this->end_date,
                                'property_cat_id'       => 
$this->property_cat_id,
-                               'building_part'         => $this->building_part
+                               'building_part'         => $this->building_part,
+                               'responsible_unit'      => 
$this->responsible_unit
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -261,6 +263,7 @@
                                        ."start_date:'{$this->start_date}',"
                                        ."end_date: '{$this->end_date}',"
                                        ."cat_id:'{$this->cat_id}',"
+                                       
."responsible_unit:'{$this->responsible_unit}',"
                                        
."building_part:'{$this->building_part}'";
 
                                $values_combo_box[0]  = 
$this->bocommon->select_category_list(array
@@ -299,6 +302,10 @@
                                $default_value = array 
('user_id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[5],$default_value);
 
+
+                               $responsible_unit_list  = 
$this->bocommon->select_category_list(array('type'=> 
'request_responsible_unit','selected' =>$this->responsible_unit, 'order' => 
'id', 'fields' => array('descr')));
+                               array_unshift ($responsible_unit_list,array 
('id'=>'0','name'=> lang('responsible unit')));
+
                                $_filter_buildingpart = array();
                                $filter_buildingpart = 
isset($this->bo->config->config_data['filter_buildingpart']) ? 
$this->bo->config->config_data['filter_buildingpart'] : array();
                        
@@ -331,8 +338,8 @@
                                                                'query'         
                => $this->query,
                                                                'start_date'    
        => $this->start_date,
                                                                'end_date'      
                => $this->end_date,
-                                                               'building_part' 
        => $this->building_part
-
+                                                               'building_part' 
        => $this->building_part,
+                                                               
'responsible_unit'      => $this->responsible_unit,
                                                        )
                                                ),
                                                'fields'        => array
@@ -397,27 +404,38 @@
                                                                        
'tab_index' => 6
                                                                ),
                                                                array
+                                                               (
+                                                                       'id' => 
'sel_responsible_unit',
+                                                                       'name' 
=> 'responsible_unit',
+                                                                       'value' 
=> lang('responsible unit'),
+                                                                       'type' 
=> 'select',
+                                                                       'style' 
=> 'filter',
+                                                                       
'values'        => $responsible_unit_list,
+                                                                       
'onchange'=> 'onChangeSelect("responsible_unit");',
+                                                                       
'tab_index' => 7
+                                                               ),
+                                                               array
                                                                ( //boton       
FILTER
                                                                        'id' => 
'btn_user_id',
                                                                        'name' 
=> 'filter',
                                                                        'value' 
=> lang('User'),
                                                                        'type' 
=> 'button',
                                                                        'style' 
=> 'filter',
-                                                                       
'tab_index' => 7
+                                                                       
'tab_index' => 8
                                                                ),
                                                                array
                                                                (
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_update',
                                                                        'value' 
=> lang('Update project'),
-                                                                       
'tab_index' => 15
+                                                                       
'tab_index' => 16
                                                                ),
                                                                array
                                                                (
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_export',
                                                                        'value' 
=> lang('download'),
-                                                                       
'tab_index' => 14
+                                                                       
'tab_index' => 15
                                                                ),
 
                                                                array
@@ -425,7 +443,7 @@
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_new',
                                                                        'value' 
=> lang('add'),
-                                                                       
'tab_index' => 13
+                                                                       
'tab_index' => 14
                                                                ),
                                                                array
                                                                (
@@ -453,7 +471,7 @@
                                                                                
'menuaction' => 'property.uiproject.date_search')
                                                                        
)."','','width=350,height=250')",
                                                                        'value' 
=> lang('Date search'),
-                                                                       
'tab_index' => 12
+                                                                       
'tab_index' => 13
                                                                ),
 
                                                                array
@@ -463,7 +481,7 @@
                                                                        'value' 
   => lang('search'),
                                                                        
'onkeypress' => 'return pulsar(event)',
                                                                        'type' 
=> 'button',
-                                                                       
'tab_index' => 11
+                                                                       
'tab_index' => 12
                                                                ),
                                                                array
                                                                ( //hidden 
request
@@ -480,7 +498,7 @@
                                                                        'type' 
=> 'text',
                                                                        'size'  
  => 28,
                                                                        
'onkeypress' => 'return pulsar(event)',
-                                                                       
'tab_index' => 10
+                                                                       
'tab_index' => 11
                                                                ),
                                                                array
                                                                (
@@ -491,7 +509,7 @@
                                                                        (
                                                                                
'menuaction' => 
'property.uirequest.priority_key'))."','','left=50,top=100,width=350,height=350,scrollbars=1')",
                                                                                
'value' => lang('Priority key'),
-                                                                               
'tab_index' => 9
+                                                                               
'tab_index' => 10
                                                                ),
                                                                array
                                                                (
@@ -502,7 +520,7 @@
                                                                        (
                                                                                
'menuaction' => 
'property.uirequest.columns'))."','','width=300,height=600,scrollbars=1')",
                                                                                
'value' => lang('columns'),
-                                                                               
'tab_index' => 8
+                                                                               
'tab_index' => 9
                                                                ),
                                                        ),
                                                        'hidden_value' => array
@@ -544,17 +562,17 @@
 
                                if(!$this->acl_manage)//priority_key
                                {
-                                       
unset($datatable['actions']['form'][0]['fields']['field'][17]);
+                                       
unset($datatable['actions']['form'][0]['fields']['field'][18]);
                                }
 
                                if(!$this->acl_add) //add
                                {
-                                       
unset($datatable['actions']['form'][0]['fields']['field'][9]);
+                                       
unset($datatable['actions']['form'][0]['fields']['field'][10]);
                                }
 
                                if(!$project_id) // update project
                                {
-                                       
unset($datatable['actions']['form'][0]['fields']['field'][7]);
+                                       
unset($datatable['actions']['form'][0]['fields']['field'][8]);
                                }
 
 
@@ -1731,6 +1749,8 @@
                                        'lang_status'                           
                => lang('Status'),
                                        'lang_status_statustext'                
        => lang('What is the current status of this request ?'),
 
+                                       'responsible_unit_list'                 
        => array('options' => 
$this->bocommon->select_category_list(array('type'=> 
'request_responsible_unit','selected' =>$values['responsible_unit'], 'order' => 
'id', 'fields' => array('descr')))),
+
                                        'branch_list'                           
                => array('options' => 
$this->boproject->select_branch_list($values['branch_id'])),
                                        'lang_branch'                           
                => lang('branch'),
                                        'lang_no_branch'                        
                => lang('Select branch'),

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2013-03-06 14:09:14 UTC (rev 10970)
+++ trunk/property/setup/phpgw_no.lang  2013-03-06 14:36:04 UTC (rev 10971)
@@ -1345,6 +1345,7 @@
 receipt        property        no      Kvittering
 receipt date   property        no      Kvitteringsdato
 reconciliation property        no      Avstemming
+recommended year       property        no      Anbefalt år
 record property        no      Post
 reference level        property        no      Referanse nivå
 regulations    property        no      Forskrifter
@@ -1393,6 +1394,7 @@
 responsibility property        no      Ansvar
 responsible matrix     property        no      Ansvarsmatrise
 responsibility role    property        no      Rolle for Ansvarsmatrise
+responsible unit       property        no      Ansvarlig enhet
 result property        no      Resultat
 return back to the list        property        no      Returner til oversikt
 revision       property        no      Revisjon

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2013-03-06 14:09:14 UTC (rev 10970)
+++ trunk/property/setup/setup.inc.php  2013-03-06 14:36:04 UTC (rev 10971)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.666';
+       $setup_info['property']['version']              = '0.9.17.667';
        $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 2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/setup/tables_current.inc.php 2013-03-06 14:36:04 UTC (rev 
10971)
@@ -854,8 +854,6 @@
                        'ix' => array(),
                        'uc' => array()
                ),
-
-
                'fm_request' => array(
                        'fd' => array(
                                'id' => array('type' => 'int','precision' => 
'4','nullable' => False),
@@ -885,8 +883,10 @@
                                'status' => array('type' => 
'varchar','precision' => '10','nullable' => True),
                                'branch_id' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'coordinator' => array('type' => 
'int','precision' => '4','nullable' => True),
+                               'responsible_unit' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'authorities_demands' => array('type' => 
'int','precision' => '2','default' => '0','nullable' => True),
                                'score' => array('type' => 'int','precision' => 
'4','default' => '0','nullable' => True),
+                               'recommended_year' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'start_date' => array('type' => 
'int','precision' => '8','default' => '0','nullable' => True),
                                'end_date' => array('type' => 'int','precision' 
=> '8','default' => '0','nullable' => True),
                                'building_part'=> array('type' => 
'varchar','precision' => 4,'nullable' => True),
@@ -900,6 +900,19 @@
                        'ix' => array('location_code'),
                        'uc' => array()
                ),
+
+               'fm_request_responsible_unit' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'int','precision' => 
'2','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'descr' => array('type' => 'text','nullable' => 
True)
+                       ),
+                       'pk' => array('id'),
+                       'ix' => array(),
+                       'fk' => array(),
+                       'uc' => array()
+               ),
+
                'fm_request_condition' => array(
                        'fd' => array(
                                'request_id' => array('type' => 
'int','precision' => '4','nullable' => False),
@@ -945,6 +958,7 @@
                        'ix' => array(),
                        'uc' => array()
                ),
+
                'fm_request_planning' => array(
                        'fd' => array(
                                'id' => array('type' => 'auto','nullable' => 
False),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/setup/tables_update.inc.php  2013-03-06 14:36:04 UTC (rev 
10971)
@@ -7424,3 +7424,48 @@
                }
        }
 
+       /**
+       * Update property version from 0.9.17.666 to 0.9.17.667
+       * Add recommended year
+       */
+       $test[] = '0.9.17.666';
+       function property_upgrade0_9_17_666()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_request','recommended_year',array(
+                               'type' =>       'int',
+                               'precision' => 4,
+                               'nullable' => true
+                       )
+               );
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_request','responsible_unit',array(
+                               'type' =>       'int',
+                               'precision' => 4,
+                               'nullable' => true
+                       )
+               );
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'fm_request_responsible_unit',  array(
+                               'fd' => array(
+                                       'id' => array('type' => 
'int','precision' => 4,'nullable' => False),
+                                       'name' => array('type' => 
'varchar','precision' => 50,'nullable' => False),
+                                       'descr' => array('type' => 
'text','nullable' => True)
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array()
+                       )
+               );
+
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.667';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+

Modified: trunk/property/templates/base/request.xsl
===================================================================
--- trunk/property/templates/base/request.xsl   2013-03-06 14:09:14 UTC (rev 
10970)
+++ trunk/property/templates/base/request.xsl   2013-03-06 14:36:04 UTC (rev 
10971)
@@ -395,11 +395,37 @@
                                                                        
</select>
                                                                </dd>
                                                        
+                                                               <dt><label>
+                                                                       
<xsl:value-of select="php:function('lang', 'responsible unit')"/>
+                                                               </label></dt>
+                                                               <dd>
+                                                                       <select 
name="values[responsible_unit]" class="forms">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'Set responsible unit')"/>
+                                                                               
</xsl:attribute>
+                                                                               
<option value="0">
+                                                                               
        <xsl:value-of select="php:function('lang', 'select')"/>
+                                                                               
</option>
+                                                                               
<xsl:apply-templates select="responsible_unit_list/options"/>
+                                                                       
</select>
+                                                               </dd>
+
+                                                               <dt><label>
+                                                                       
<xsl:value-of select="php:function('lang', 'recommended year')"/>
+                                                               </label></dt>
+                                                               <dd>
+                                                                       <input 
type="text" id="recommended_year" name="values[recommended_year]" size="10" 
value="{value_recommended_year}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'year')"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </dd>
+
                                                        <xsl:choose>
                                                                <xsl:when 
test="show_dates !=''">
                                                                        
                                                                                
<dt><label>
-                                                                               
        <xsl:value-of select="lang_start_date"/>
+                                                                               
        <xsl:value-of select="php:function('lang', 'start date')"/>
                                                                                
</label></dt>
                                                                                
<dd>
                                                                                
        <input type="text" id="values_start_date" name="values[start_date]" 
size="10" value="{value_start_date}" readonly="readonly">
@@ -408,10 +434,8 @@
                                                                                
                </xsl:attribute>
                                                                                
        </input>
                                                                                
</dd>
-                                                                       
-                                                                       
                                                                                
<dt><label>
-                                                                               
        <xsl:value-of select="lang_end_date"/>
+                                                                               
        <xsl:value-of select="php:function('lang', 'end date')"/>
                                                                                
</label></dt>
                                                                                
<dd>
                                                                                
        <input type="text" id="values_end_date" name="values[end_date]" 
size="10" value="{value_end_date}" readonly="readonly">
@@ -475,7 +499,7 @@
                                                                        
<xsl:value-of select="value_diff2"/><xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
                                                                </dd>
                                                        
-                                                       
+<!--                                                   
                                                                <dt><label>
                                                                        
<xsl:value-of select="php:function('lang', 'planning date')"/>
                                                                </label></dt>
@@ -530,8 +554,8 @@
                                                                <dd>
                                                                        <div 
id="datatable-container_3"/>
                                                                </dd>
+-->                                                    
                                                        
-                                                       
                                                                <xsl:choose>
                                                                        
<xsl:when test="notify='yes'">
                                                                                
<dt><label>




reply via email to

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