[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.boproperty.inc.php,1.2,1.3 cl
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.boproperty.inc.php,1.2,1.3 class.soproperty.inc.php,1.3,1.4 class.uibuilding.inc.php,1.6,1.7 class.uiequipment.inc.php,1.5,1.6 class.uiproperty.inc.php,1.7,1.8 |
Date: |
Tue, 18 Feb 2003 14:29:02 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv14361/inc
Modified Files:
class.boproperty.inc.php class.soproperty.inc.php
class.uibuilding.inc.php class.uiequipment.inc.php
class.uiproperty.inc.php
Log Message:
no message
Index: class.boproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boproperty.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.boproperty.inc.php 11 Feb 2003 10:01:57 -0000 1.2
--- class.boproperty.inc.php 18 Feb 2003 19:29:00 -0000 1.3
***************
*** 108,114 ****
}
! function select_part_of_town($part_of_town_id)
{
! return
$this->socommon->select_part_of_town($part_of_town_id);
}
--- 108,114 ----
}
! function read_category_name($cat_id)
{
! return $this->so->read_category_name($cat_id);
}
***************
*** 133,137 ****
if ($action=='edit')
{
! if ($values['property_id'] != 0)
{
$receipt = $this->so->edit($values);
--- 133,137 ----
if ($action=='edit')
{
! if ($values['property_id'])
{
$receipt = $this->so->edit($values);
Index: class.soproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproperty.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.soproperty.inc.php 11 Feb 2003 10:01:57 -0000 1.3
--- class.soproperty.inc.php 18 Feb 2003 19:29:00 -0000 1.4
***************
*** 31,34 ****
--- 31,41 ----
}
+ function read_category_name($cat_id)
+ {
+ $this->db->query("SELECT descr FROM
fm_property_category where id='$cat_id'");
+ $this->db->next_record();
+ return $this->db->f('descr');
+ }
+
function read($data)
{
***************
*** 118,122 ****
'cat_id' =>
(int)$this->db->f('cat_id'),
'name' =>
stripslashes($this->db->f('navn')),
! 'area_id' =>
$this->db->f('omraade_id'),
'part_of_town' =>
$this->db->f('bydel'),
'grants' => $ngrants
--- 125,129 ----
'cat_id' =>
(int)$this->db->f('cat_id'),
'name' =>
stripslashes($this->db->f('navn')),
! 'district_id' =>
$this->db->f('omraade_id'),
'part_of_town' =>
$this->db->f('bydel'),
'grants' => $ngrants
***************
*** 141,145 ****
$property['date']
= $this->db->f('entry_date');
$property['cat_id']
= (int)$this->db->f('cat_id');
! $property['area_id'] =
$this->db->f('omraade_id');
$property['part_of_town'] =
$this->db->f('bydel');
$property['part_of_town_id'] =
$this->db->f('bydel_id');
--- 148,152 ----
$property['date']
= $this->db->f('entry_date');
$property['cat_id']
= (int)$this->db->f('cat_id');
! $property['district_id'] =
$this->db->f('omraade_id');
$property['part_of_town'] =
$this->db->f('bydel');
$property['part_of_town_id'] =
$this->db->f('bydel_id');
***************
*** 161,165 ****
. "','" . $property['generaladdress'] ."','" .
$property['cat_id'] ."','" . $property['generellinfo']. "')",__LINE__,__FILE__);
!
$receipt['message'][$errorcount++]=array('msg'=>lang('Property has been
saved'));
return $receipt;
}
--- 168,172 ----
. "','" . $property['generaladdress'] ."','" .
$property['cat_id'] ."','" . $property['generellinfo']. "')",__LINE__,__FILE__);
! $receipt['message'][]=array('msg'=>lang('Property has
been saved'));
return $receipt;
}
***************
*** 173,177 ****
. "' WHERE objekt_id="
. intval($property['property_id']),__LINE__,__FILE__);
!
$receipt['message'][$errorcount++]=array('msg'=>lang('Property has been
edited'));
return $receipt;
}
--- 180,184 ----
. "' WHERE objekt_id="
. intval($property['property_id']),__LINE__,__FILE__);
! $receipt['message'][]=array('msg'=>lang('Property has
been edited'));
return $receipt;
}
Index: class.uibuilding.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uibuilding.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uibuilding.inc.php 11 Feb 2003 10:01:57 -0000 1.6
--- class.uibuilding.inc.php 18 Feb 2003 19:29:00 -0000 1.7
***************
*** 107,115 ****
$table_header[] = array
(
! 'lang_name' => lang('name'),
'lang_time_created' => lang('time created'),
'lang_view' => lang('view'),
'lang_edit' => lang('edit'),
'lang_delete' => lang('delete'),
'lang_property_id' =>
lang('property id'),
'lang_building_id' =>
lang('building id'),
--- 107,132 ----
$table_header[] = array
(
! 'sort_name' =>
$this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'byggnavn',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uibuilding.index',
!
'cat_id'
=>$this->cat_id)
!
)),
! 'lang_name' => lang('name'),
'lang_time_created' => lang('time created'),
'lang_view' => lang('view'),
'lang_edit' => lang('edit'),
'lang_delete' => lang('delete'),
+ 'sort_property_id' =>
$this->nextmatchs->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'objekt_id',
+
'order' => $this->order,
+
'extra' => array('menuaction' =>
$this->currentapp.'.uibuilding.index',
+
'cat_id'
=>$this->cat_id)
+
)),
+ 'lang_property_id' => lang('property id'),
'lang_property_id' =>
lang('property id'),
'lang_building_id' =>
lang('building id'),
***************
*** 124,127 ****
--- 141,155 ----
);
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uibuilding.index',
+ 'sort'
=>$this->sort,
+ 'order'
=>$this->order,
+ 'cat_id'
=>$this->cat_id,
+ 'district_id'
=>$this->district_id,
+ 'filter'
=>$this->filter,
+ 'query'
=>$this->query
+ );
+
$data = array
***************
*** 133,137 ****
'num_records'
=> count($building_list),
'all_records'
=> $this->bo->total_records,
! 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibuilding.index'),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
--- 161,165 ----
'num_records'
=> count($building_list),
'all_records'
=> $this->bo->total_records,
! 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
***************
*** 165,168 ****
--- 193,197 ----
$err = get_var('err',array('POST','GET'));
$values = get_var('values',array('POST','GET'));
+ $values_attribute =
get_var('values_attribute',array('POST','GET'));
***************
*** 188,191 ****
--- 217,224 ----
//_debug_array($values);
$receipt =
$this->bo->save($values,$action,$err);
+ if($values_attribute)
+ {
+
$this->bocommon->save_attributes($values_attribute,'location');
+ }
}
else
***************
*** 229,234 ****
--- 262,282 ----
//_debug_array($link_data);
+ if($building_id)
+ {
+ $attributes_values =
$this->bocommon->read_attibutes(array('form'=>true,'type'=>location,'type_id'=>2,'id'=>$property_id
. '-' . $building_id));
+ $attributes_header[] = array
+ (
+ 'lang_name' => lang('Name'),
+ 'lang_descr' => lang('Description'),
+ 'lang_datatype' => lang('Datatype'),
+ 'lang_value' => lang('Value')
+ );
+ }
+
$data = array
(
+ 'lang_attributes'
=> lang('Attributes'),
+ 'attributes_header'
=> $attributes_header,
+ 'attributes_values'
=> $attributes_values,
'appname'
=> lang('building'),
'function_msg'
=> $function_msg,
Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uiequipment.inc.php 18 Feb 2003 09:13:57 -0000 1.5
--- class.uiequipment.inc.php 18 Feb 2003 19:29:00 -0000 1.6
***************
*** 176,193 ****
'cat_id'
=>$this->cat_id,
'district_id'
=>$this->district_id,
! // 'filter'
=>$this->filter,
'query'
=>$this->query
);
-
$data = array
(
'links'
=> $links,
! 'allow_allrows' =>
false,
'start_record'
=> $this->start,
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($equipment_list),
'all_records'
=> $this->bo->total_records,
! 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiequipment.index'),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
--- 176,192 ----
'cat_id'
=>$this->cat_id,
'district_id'
=>$this->district_id,
! 'filter'
=>$this->filter,
'query'
=>$this->query
);
$data = array
(
'links'
=> $links,
! 'allow_allrows'
=> false,
'start_record'
=> $this->start,
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($equipment_list),
'all_records'
=> $this->bo->total_records,
! 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
Index: class.uiproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproperty.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uiproperty.inc.php 11 Feb 2003 10:01:57 -0000 1.7
--- class.uiproperty.inc.php 18 Feb 2003 19:29:00 -0000 1.8
***************
*** 90,94 ****
'property_id'
=> $property['property_id'],
'first'
=> $first,
! 'area_id'
=> $property['area_id'],
'part_of_town'
=> $property['part_of_town'],
'owner'
=> $property['owner'],
--- 90,94 ----
'property_id'
=> $property['property_id'],
'first'
=> $first,
! 'district_id'
=> $property['district_id'],
'part_of_town'
=> $property['part_of_town'],
'owner'
=> $property['owner'],
***************
*** 118,122 ****
'lang_name' => lang('Name'),
! 'lang_area' => lang('Area'),
'lang_part_of_town' => lang('Part of town'),
'lang_view' => lang('view'),
--- 118,130 ----
'lang_name' => lang('Name'),
! 'sort_district_id' =>
$this->nextmatchs->show_sort_order(array
!
(
!
'sort' => $this->sort,
!
'var' => 'omraade_id',
!
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uiproperty.index',
!
'cat_id'
=>$this->cat_id)
!
)),
! 'lang_district' => lang('District'),
'lang_part_of_town' => lang('Part of town'),
'lang_view' => lang('view'),
***************
*** 142,145 ****
--- 150,164 ----
);
+ $link_data = array
+ (
+ 'menuaction' =>
$this->currentapp.'.uiproperty.index',
+ 'sort'
=>$this->sort,
+ 'order'
=>$this->order,
+ 'cat_id'
=>$this->cat_id,
+ 'district_id'
=>$this->district_id,
+ 'filter'
=>$this->filter,
+ 'query'
=>$this->query
+ );
+
$data = array
***************
*** 151,155 ****
'num_records'
=> count($property_list),
'all_records'
=> $this->bo->total_records,
! 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproperty.index'),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
--- 170,174 ----
'num_records'
=> count($property_list),
'all_records'
=> $this->bo->total_records,
! 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
'appname'
=> lang($this->currentapp),
***************
*** 158,162 ****
'lang_cat_statustext' =>
lang('Select the category the property belongs to. To do not use a category
select NO CATEGORY'),
'select_name'
=> 'cat_id',
- // 'cat_list'
=> $this->cats->formatted_xslt_list(array('selected' =>
$this->cat_id,'globals' => True)),
'cat_list'
=>
$this->bocommon->select_category_property_list('filter',$this->cat_id),
'select_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproperty.index'),
--- 177,180 ----
***************
*** 172,177 ****
);
- //print_r($data).'<br>';
- //print_($menu);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
$this->save_sessiondata();
--- 190,193 ----
***************
*** 182,185 ****
--- 198,202 ----
$property_id =
get_var('property_id',array('POST','GET'));
$values =
get_var('values',array('POST'));
+ $values_attribute =
get_var('values_attribute',array('POST','GET'));
$GLOBALS['phpgw']->xslttpl->add_file(array('property',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
. SEP . 'app_header'));
***************
*** 197,200 ****
--- 214,221 ----
}
$receipt = $this->bo->save($values,$action);
+ if($values_attribute)
+ {
+
$this->bocommon->save_attributes($values_attribute,'location');
+ }
}
***************
*** 220,223 ****
--- 241,256 ----
}
+ if($property_id)
+ {
+ $attributes_values =
$this->bocommon->read_attibutes(array('form'=>true,'type'=>location,'type_id'=>1,'id'=>$property_id));
+ $attributes_header[] = array
+ (
+ 'lang_name' => lang('Name'),
+ 'lang_descr' => lang('Description'),
+ 'lang_datatype' => lang('Datatype'),
+ 'lang_value' => lang('Value')
+ );
+ }
+
$link_data = array
(
***************
*** 228,231 ****
--- 261,267 ----
$data = array
(
+ 'lang_attributes'
=> lang('Attributes'),
+ 'attributes_header'
=> $attributes_header,
+ 'attributes_values'
=> $attributes_values,
'appname'
=> lang('property'),
'function_msg'
=> $function_msg,
***************
*** 317,323 ****
--- 353,390 ----
$property = $this->bo->read_single($property_id);
+ _debug_array($property);
+
+ $attributes_values =
$this->bocommon->read_attibutes(array('form'=>false,'type'=>location,'type_id'=>1,'id'=>$property_id));
+ $attributes_header[] = array
+ (
+ 'lang_name' => lang('Name'),
+ 'lang_descr' => lang('Description'),
+ 'lang_datatype' => lang('Datatype'),
+ 'lang_value' => lang('Value')
+ );
$data = array
(
+ 'lang_attributes' =>
lang('Attributes'),
+ 'attributes_header' =>
$attributes_header,
+ 'attributes_values' =>
$attributes_values,
+ 'lang_property_id'
=> lang('Property ID'),
+ 'lang_name'
=> lang('name'),
+ 'lang_part_of_town'
=> lang('Part of town'),
+ 'lang_district'
=> lang('District'),
+ 'lang_generaladdress' =>
lang('General Address'),
+ 'lang_generellinfo'
=> lang('General Info'),
+ 'lang_category'
=> lang('category'),
+ 'lang_access'
=> lang('private'),
+ 'lang_save'
=> lang('save'),
+ 'lang_done'
=> lang('done'),
+ 'value_property_id'
=> $property_id,
+ 'value_name'
=> $property['name'],
+ 'value_generaladdress' =>
$property['generaladdress'],
+ 'value_access'
=> $property['access'],
+ 'value_district'
=> $property['district_id'],
+ 'value_part_of_town' =>
$property['part_of_town'],
+ 'value_category'
=> $this->bo->read_category_name($property['cat_id']),
+ 'value_generellinfo' =>
$property['generellinfo'],
'appname' =>
lang('property'),
'function_msg' => lang('view
property'),
***************
*** 327,335 ****
'lang_access' => lang('access'),
'lang_time_created' => lang('time created'),
- 'lang_done' => lang('done'),
'value_content' => $property['content'],
'value_access' =>
lang(ucfirst($property['access'])),
'value_cat' =>
$this->cats->id2name($property['cat']),
! 'value_date' =>
$GLOBALS['phpgw']->common->show_date($property['date'])
);
--- 394,406 ----
'lang_access' => lang('access'),
'lang_time_created' => lang('time created'),
'value_content' => $property['content'],
'value_access' =>
lang(ucfirst($property['access'])),
'value_cat' =>
$this->cats->id2name($property['cat']),
! 'value_date' =>
$GLOBALS['phpgw']->common->show_date($property['date']),
! 'edit_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproperty.edit&property_id='
. $property_id),
! 'lang_done_statustext' => lang('Back
to the list'),
! 'lang_edit_statustext' => lang('Edit
this entry equipment'),
! 'lang_done'
=> lang('done'),
! 'lang_edit'
=> lang('Edit')
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.boproperty.inc.php,1.2,1.3 class.soproperty.inc.php,1.3,1.4 class.uibuilding.inc.php,1.6,1.7 class.uiequipment.inc.php,1.5,1.6 class.uiproperty.inc.php,1.7,1.8,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.16,1.17 class.boequipment.inc.php,1.5,1.6class.bostandard_entity.inc.php,1.5,1.6 class.socommon.inc.php,1.8,1.9 class.soequipment.inc.php,1.5,1.6 class.uiequipment.inc.php,1.4,1.5
- Next by Date:
[Phpgroupware-cvs] CVS: property/templates/default attributes_form.xsl,1.1,1.2 attributes_view.xsl,1.1,1.2 building.xsl,1.4,1.5 equipment.xsl,1.5,1.6 property.xsl,1.3,1.4
- Previous by thread:
[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.16,1.17 class.boequipment.inc.php,1.5,1.6class.bostandard_entity.inc.php,1.5,1.6 class.socommon.inc.php,1.8,1.9 class.soequipment.inc.php,1.5,1.6 class.uiequipment.inc.php,1.4,1.5
- Next by thread:
[Phpgroupware-cvs] CVS: property/templates/default attributes_form.xsl,1.1,1.2 attributes_view.xsl,1.1,1.2 building.xsl,1.4,1.5 equipment.xsl,1.5,1.6 property.xsl,1.3,1.4
- Index(es):