[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6591] property: remove obsolete
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6591] property: remove obsolete |
Date: |
Sun, 14 Nov 2010 20:10:10 +0000 |
Revision: 6591
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6591
Author: sigurdne
Date: 2010-11-14 20:10:08 +0000 (Sun, 14 Nov 2010)
Log Message:
-----------
property: remove obsolete
Removed Paths:
-------------
trunk/property/inc/class.bop_of_town.inc.php
trunk/property/inc/class.sop_of_town.inc.php
trunk/property/inc/class.uip_of_town.inc.php
trunk/property/templates/base/p_of_town.xsl
Deleted: trunk/property/inc/class.bop_of_town.inc.php
===================================================================
--- trunk/property/inc/class.bop_of_town.inc.php 2010-11-14 20:09:44 UTC
(rev 6590)
+++ trunk/property/inc/class.bop_of_town.inc.php 2010-11-14 20:10:08 UTC
(rev 6591)
@@ -1,258 +0,0 @@
-<?php
- /**
- * phpGroupWare - property: a Facilities Management System.
- *
- * @author Sigurd Nes <address@hidden>
- * @copyright Copyright (C) 2003,2004,2005,2006,2007 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/bbb_/ekstern/
- * @package property
- * @subpackage admin
- * @version $Id$
- */
-
- /**
- * Description
- * @package property
- */
-
- class property_bop_of_town
- {
- var $start;
- var $query;
- var $filter;
- var $sort;
- var $order;
- var $district_id;
-
- var $public_functions = array
- (
- 'read' => true,
- 'read_single' => true,
- 'save' => true,
- 'delete' => true,
- 'check_perms' => true
- );
-
- var $soap_functions = array(
- 'list' => array(
- 'in' =>
array('int','int','struct','string','int'),
- 'out' => array('array')
- ),
- 'read' => array(
- 'in' => array('int','struct'),
- 'out' => array('array')
- ),
- 'save' => array(
- 'in' => array('int','struct'),
- 'out' => array()
- ),
- 'delete' => array(
- 'in' => array('int','struct'),
- 'out' => array()
- )
- );
-
- function property_bop_of_town($session=false)
- {
- // $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->so = CreateObject('property.sop_of_town');
-
- if ($session)
- {
- $this->read_sessiondata();
- $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');
- $district_id = phpgw::get_var('district_id', 'int');
- $allrows =
phpgw::get_var('allrows', 'bool');
-
- if ($start)
- {
- $this->start=$start;
- }
- else
- {
- $this->start=0;
- }
-
- if(isset($query))
- {
- $this->query = $query;
- }
- if(!empty($filter))
- {
- $this->filter = $filter;
- }
- if(isset($sort))
- {
- $this->sort = $sort;
- }
- if(isset($order))
- {
- $this->order = $order;
- }
- if(isset($district_id) && !empty($district_id))
- {
- $this->district_id = $district_id;
- }
- else
- {
- unset($this->district_id);
- }
- if(isset($allrows))
- {
- $this->allrows = $allrows;
- }
- }
-
- function list_methods($_type='xmlrpc')
- {
- /*
- This handles introspection or discovery by the logged
in client,
- in which case the input might be an array. The
server always calls
- this function to fill the server dispatch map using a
string.
- */
- if (is_array($_type))
- {
- $_type = $_type['type'] ? $_type['type'] :
$_type[0];
- }
- switch($_type)
- {
- case 'xmlrpc':
- $xml_functions = array(
- 'read' => array(
- 'function' => 'read',
- 'signature' =>
array(array(xmlrpcInt,xmlrpcStruct)),
- 'docstring' =>
lang('Read a single entry by passing the id and fieldlist.')
- ),
- 'save' => array(
- 'function' => 'save',
- 'signature' =>
array(array(xmlrpcStruct,xmlrpcStruct)),
- 'docstring' =>
lang('Update a single entry by passing the fields.')
- ),
- 'delete' => array(
- 'function' => 'delete',
- 'signature' =>
array(array(xmlrpcBoolean,xmlrpcInt)),
- 'docstring' =>
lang('Delete a single entry by passing the id.')
- ),
- 'list' => array(
- 'function' => '_list',
- 'signature' =>
array(array(xmlrpcStruct,xmlrpcStruct)),
- 'docstring' =>
lang('Read a list of entries.')
- ),
- 'list_methods' => array(
- 'function' =>
'list_methods',
- 'signature' =>
array(array(xmlrpcStruct,xmlrpcString)),
- 'docstring' =>
lang('Read this list of methods.')
- )
- );
- return $xml_functions;
- break;
- case 'soap':
- return $this->soap_functions;
- break;
- default:
- return array();
- break;
- }
- }
-
- function save_sessiondata($data)
- {
- if ($this->use_session)
- {
-
$GLOBALS['phpgw']->session->appsession('session_data','p_of_town',$data);
- }
- }
-
- function read_sessiondata()
- {
- $data =
$GLOBALS['phpgw']->session->appsession('session_data','p_of_town');
-
- $this->start = $data['start'];
- $this->query = $data['query'];
- $this->filter = $data['filter'];
- $this->sort = $data['sort'];
- $this->order = $data['order'];
- $this->district_id = $data['district_id'];
- }
-
- function check_perms($has, $needed)
- {
- return (!!($has & $needed) == true);
- }
-
-
- function read_district_name($district_id='')
- {
- return $this->so->read_district_name($district_id);
- }
-
-
- function read()
- {
- $p_of_town = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
-
'filter' => $this->filter,'district_id' =>
$this->district_id,'allrows'=>$this->allrows));
- $this->total_records = $this->so->total_records;
-
- return $p_of_town;
- }
-
- function read_single($part_of_town_id)
- {
- return $this->so->read_single($part_of_town_id);
- }
-
- function save($p_of_town)
- {
-
- if ($p_of_town['part_of_town_id'])
- {
- if ($p_of_town['part_of_town_id'] != 0)
- {
- $part_of_town_id =
$p_of_town['part_of_town_id'];
- $receipt=$this->so->edit($p_of_town);
- }
- }
- else
- {
- $receipt = $this->so->add($p_of_town);
- }
- return $receipt;
- }
-
- function delete($params)
- {
- if (is_array($params))
- {
- $this->so->delete($params[0]);
- }
- else
- {
- $this->so->delete($params);
- }
- }
- }
-
Deleted: trunk/property/inc/class.sop_of_town.inc.php
===================================================================
--- trunk/property/inc/class.sop_of_town.inc.php 2010-11-14 20:09:44 UTC
(rev 6590)
+++ trunk/property/inc/class.sop_of_town.inc.php 2010-11-14 20:10:08 UTC
(rev 6591)
@@ -1,164 +0,0 @@
-<?php
- /**
- * phpGroupWare - property: a Facilities Management System.
- *
- * @author Sigurd Nes <address@hidden>
- * @copyright Copyright (C) 2003,2004,2005,2006,2007 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/bbb_/ekstern/
- * @package property
- * @subpackage admin
- * @version $Id$
- */
-
- /**
- * Description
- * @package property
- */
-
- class property_sop_of_town
- {
-
- function __construct()
- {
- $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
-
- $this->db = & $GLOBALS['phpgw']->db;
- $this->join = & $this->db->join;
- $this->like = & $this->db->like;
- }
-
- function read_district_name($id)
- {
- $this->db->query("SELECT descr FROM fm_district where
id='$id'");
- $this->db->next_record();
- return $this->db->f('descr');
- }
-
- function read($data)
- {
- if(is_array($data))
- {
- $start =
(isset($data['start'])?$data['start']:0);
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $district_id =
(isset($data['district_id'])?$data['district_id']:0);
- $allrows =
(isset($data['allrows'])?$data['allrows']:'');
- }
-
- if ($order)
- {
- $ordermethod = " order by $order $sort";
- }
- else
- {
- $ordermethod = ' order by part_of_town_id ASC';
- }
-
-
- $where = 'WHERE';
- if ($district_id > 0)
- {
- $filtermethod .= " $where
district_id='$district_id' ";
- $where = 'AND';
-
- }
-
- if($query)
- {
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
-
- $querymethod = " $where ( name $this->like
'%$query%')";
- }
-
- $sql = "SELECT fm_part_of_town.*, descr as category
FROM fm_part_of_town $this->join fm_district on
fm_part_of_town.district_id=fm_district.id $filtermethod $querymethod";
-
- $this->db->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db->num_rows();
-
- if(!$allrows)
- {
- $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
- }
- else
- {
- $this->db->query($sql .
$ordermethod,__LINE__,__FILE__);
- }
-
- while ($this->db->next_record())
- {
- $p_of_towns[] = array
- (
- 'part_of_town_id' =>
$this->db->f('part_of_town_id'),
- 'name' =>
stripslashes($this->db->f('name')),
- 'category' =>
stripslashes($this->db->f('category')),
- 'district_id' =>
$this->db->f('district_id')
- );
- }
- return $p_of_towns;
- }
-
- function read_single($part_of_town_id)
- {
- $this->db->query("select * from fm_part_of_town where
part_of_town_id='$part_of_town_id'",__LINE__,__FILE__);
-
- if ($this->db->next_record())
- {
- $p_of_town['id'] =
(int)$this->db->f('part_of_town_id');
- $p_of_town['name'] =
stripslashes($this->db->f('name'));
- $p_of_town['district_id'] =
(int)$this->db->f('district_id');
-
- return $p_of_town;
- }
- }
-
- function add($p_of_town)
- {
- $p_of_town['name'] =
$this->db->db_addslashes($p_of_town['name']);
-
- $this->db->query("INSERT INTO fm_part_of_town
(name,district_id) "
- . "VALUES ('" . $p_of_town['name']
- . "','" . $p_of_town['district_id'] .
"')",__LINE__,__FILE__);
-
- $receipt['part_of_town_id']=
$this->db->get_last_insert_id('fm_part_of_town','part_of_town_id');
- $receipt['message'][] = array('msg'=>lang('Part of town
%1 has been saved',$receipt['part_of_town_id']));
- return $receipt;
- }
-
- function edit($p_of_town)
- {
- $p_of_town['name'] =
$this->db->db_addslashes($p_of_town['name']);
-
- $this->db->query("UPDATE fm_part_of_town set name='" .
$p_of_town['name'] . "', district_id='"
- .
$p_of_town['district_id'] . "' WHERE part_of_town_id=" .
intval($p_of_town['part_of_town_id']),__LINE__,__FILE__);
-
- $receipt['part_of_town_id']=
$p_of_town['part_of_town_id'];
- $receipt['message'][] = array('msg'=>lang('Part of town
%1 has been edited',$p_of_town['part_of_town_id']));
- return $receipt;
- }
-
- function delete($part_of_town_id)
- {
- $this->db->query('DELETE FROM fm_part_of_town WHERE
part_of_town_id=' . intval($part_of_town_id),__LINE__,__FILE__);
- }
- }
-
Deleted: trunk/property/inc/class.uip_of_town.inc.php
===================================================================
--- trunk/property/inc/class.uip_of_town.inc.php 2010-11-14 20:09:44 UTC
(rev 6590)
+++ trunk/property/inc/class.uip_of_town.inc.php 2010-11-14 20:10:08 UTC
(rev 6591)
@@ -1,401 +0,0 @@
-<?php
- /**
- * phpGroupWare - property: a Facilities Management System.
- *
- * @author Sigurd Nes <address@hidden>
- * @copyright Copyright (C) 2003,2004,2005,2006,2007 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/bbb_/ekstern/
- * @package property
- * @subpackage admin
- * @version $Id$
- */
-
- /**
- * Description
- * @package property
- */
-
- class property_uip_of_town
- {
- var $grants;
- var $district_id;
- var $start;
- var $query;
- var $sort;
- var $order;
- var $filter;
-
- var $public_functions = array
- (
- 'index' => true,
- 'view' => true,
- 'edit' => true,
- 'delete' => true
- );
-
- function property_uip_of_town()
- {
- $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
- $GLOBALS['phpgw_info']['flags']['menu_selection'] =
'admin::property::location::town';
- // $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
- $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
-
- $this->bo =
CreateObject('property.bop_of_town',true);
- $this->bocommon =
CreateObject('property.bocommon');
-
- $this->acl = &
$GLOBALS['phpgw']->acl;
- $this->acl_location = '.admin';
- $this->acl_read =
$this->acl->check($this->acl_location, PHPGW_ACL_READ, 'property');
- $this->acl_add =
$this->acl->check($this->acl_location, PHPGW_ACL_ADD, 'property');
- $this->acl_edit =
$this->acl->check($this->acl_location, PHPGW_ACL_EDIT, 'property');
- $this->acl_delete =
$this->acl->check($this->acl_location, PHPGW_ACL_DELETE, 'property');
- $this->acl_manage =
$this->acl->check($this->acl_location, 16, 'property');
-
- $this->start = $this->bo->start;
- $this->query = $this->bo->query;
- $this->sort = $this->bo->sort;
- $this->order = $this->bo->order;
- $this->filter = $this->bo->filter;
- $this->district_id = $this->bo->district_id;
- $this->allrows = $this->bo->allrows;
- }
-
- function save_sessiondata()
- {
- $data = array
- (
- 'start' => $this->start,
- 'query' => $this->query,
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'filter' => $this->filter,
- 'district_id' => $this->district_id,
- 'this->allrows' => $this->allrows
- );
- $this->bo->save_sessiondata($data);
- }
-
- function index()
- {
- if(!$this->acl_read)
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=>1, 'acl_location'=> $this->acl_location));
- }
-
- $GLOBALS['phpgw']->xslttpl->add_file(array('p_of_town',
-
'receipt',
-
'search_field',
-
'nextmatchs'));
-
- $receipt =
$GLOBALS['phpgw']->session->appsession('session_data','p_of_town_receipt');
-
$GLOBALS['phpgw']->session->appsession('session_data','p_of_town_receipt','');
-
- $p_of_towns_list = $this->bo->read();
-
- if (isSet($p_of_towns_list) AND
is_array($p_of_towns_list))
- {
- foreach($p_of_towns_list as $p_of_town)
- {
- $content[] = array
- (
- 'part_of_town_id'
=> $p_of_town['part_of_town_id'],
- 'name'
=> $p_of_town['name'],
- 'category'
=> $p_of_town['category'],
- 'link_view'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uip_of_town.view', 'part_of_town_id'=>
$p_of_town['part_of_town_id'])),
- 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uip_of_town.edit', 'part_of_town_id'=>
$p_of_town['part_of_town_id'])),
- 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uip_of_town.delete', 'part_of_town_id'=>
$p_of_town['part_of_town_id'])),
- 'lang_view_statustext'
=> lang('view the part of town'),
- 'lang_edit_statustext'
=> lang('edit the part of town'),
- 'lang_delete_statustext'
=> lang('delete the part of town'),
- 'text_view'
=> lang('view'),
- 'text_edit'
=> lang('edit'),
- 'text_delete'
=> lang('delete')
- );
- }
- }
-
- $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_part_of_town_id' => lang('Part of town
id'),
- 'sort_name' =>
$this->nextmatchs->show_sort_order(array
-
(
-
'sort' => $this->sort,
-
'var' => 'name',
-
'order' => $this->order,
-
'extra' => array('menuaction' => 'property.uip_of_town.index',
-
'district_id' =>
$this->district_id,
-
'query' =>
$this->query,
-
'allrows' =>
$this->allrows)
-
)),
- 'sort_part_of_town_id' =>
$this->nextmatchs->show_sort_order(array
-
(
-
'sort' => $this->sort,
-
'var' => 'part_of_town_id',
-
'order' => $this->order,
-
'extra' => array('menuaction' => 'property.uip_of_town.index',
-
'district_id' =>
$this->district_id,
-
'query' =>
$this->query,
-
'allrows' =>
$this->allrows)
-
)),
- 'sort_category' =>
$this->nextmatchs->show_sort_order(array
-
(
-
'sort' => $this->sort,
-
'var' => 'descr',
-
'order' => $this->order,
-
'extra' => array('menuaction' => 'property.uip_of_town.index',
-
'district_id' =>
$this->district_id,
-
'query' =>
$this->query,
-
'allrows' =>
$this->allrows)
-
)),
- 'lang_category' => lang('category')
- );
-
- $table_add = array
- (
- 'lang_add' => lang('add'),
- 'lang_add_statustext' => lang('add a part of
town'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uip_of_town.edit'))
- );
-
- $link_data = array
- (
- 'menuaction' => 'property.uip_of_town.index',
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'district_id' => $this->district_id,
- 'filter' => $this->filter,
- 'query' => $this->query
- );
-
- if(!$this->allrows)
- {
- $record_limit =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
- }
- else
- {
- $record_limit = $this->bo->total_records;
- }
-
- $msgbox_data = $this->bocommon->msgbox_data($receipt);
-
- $data = array
- (
- 'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'allow_allrows'
=> true,
- 'allrows'
=> $this->allrows,
- 'start_record'
=> $this->start,
- 'record_limit'
=> $record_limit,
- 'num_records'
=> count($p_of_towns_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','default'),
- 'select_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
-
- 'district_list'
=> $this->bocommon->select_district_list('filter',$this->district_id),
- 'lang_no_district'
=> lang('no district'),
- 'lang_district_statustext'
=> lang('Select the district the selection belongs to. To do not use a district
select NO DISTRICT'),
- 'select_district_name'
=> 'district_id',
-
- 'lang_searchfield_statustext'
=> lang('Enter the search string. To show all entries, empty this field and
press the SUBMIT button again'),
- 'lang_searchbutton_statustext'
=> lang('Submit the search string'),
- 'query'
=> $this->query,
- 'lang_search'
=> lang('search'),
- 'table_header'
=> $table_header,
- 'values'
=> $content,
- 'table_add'
=> $table_add
- );
- $this->save_sessiondata();
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('part of town') . ': ' . lang('list part of town');
-
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
- }
-
-
- function edit()
- {
- if(!$this->acl_add)
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=> 2, 'acl_location'=> $this->acl_location));
- }
-
- $part_of_town_id =
phpgw::get_var('part_of_town_id', 'int');
- $values = phpgw::get_var('values');
-
- if($GLOBALS['phpgw']->is_repost())
- {
-// $receipt['error'][]=array('msg'=>lang('Repost
!'));
- }
-
-
$GLOBALS['phpgw']->xslttpl->add_file(array('p_of_town'));
-
- if ($values['save'] || $values['apply'])
- {
- if(!$values['district_id'])
- {
-
$receipt['error'][]=array('msg'=>lang('Please select a district !'));
- }
-
- if(!$values['name'])
- {
-
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
- }
-
- if(!$receipt['error'])
- {
- $values['part_of_town_id'] =
$part_of_town_id;
- $receipt = $this->bo->save($values);
- $part_of_town_id =
$receipt['part_of_town_id'];
- $this->district_id =
($values['district_id']?$values['district_id']:$this->district_id);
-
- if ($values['save'])
- {
-
$GLOBALS['phpgw']->session->appsession('session_data','p_of_town_receipt',$receipt);
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uip_of_town.index'));
- }
- }
- }
-
- if ($values['cancel'])
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uip_of_town.index'));
- }
-
-
- if ($part_of_town_id)
- {
- $values =
$this->bo->read_single($part_of_town_id);
- $this->district_id =
($values['district_id']?$values['district_id']:$this->district_id);
- }
-
- $link_data = array
- (
- 'menuaction' =>
'property.uip_of_town.edit',
- 'part_of_town_id' => $part_of_town_id
- );
-
- $msgbox_data = $this->bocommon->msgbox_data($receipt);
-
- $data = array
- (
- 'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'abook_data'
=> $abook_data,
- 'edit_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'lang_part_of_town_id'
=> lang('ID'),
- 'value_part_of_town_id'
=> $part_of_town_id,
- 'lang_name'
=> lang('name'),
- 'lang_district'
=> lang('District'),
- 'lang_save'
=> lang('save'),
- 'lang_cancel'
=> lang('cancel'),
- 'lang_apply'
=> lang('apply'),
- 'value_name'
=> $values['name'],
- 'lang_name_statustext'
=> lang('Enter a name for this part of town'),
- 'lang_apply_statustext'
=> lang('Apply the values'),
- 'lang_cancel_statustext'
=> lang('Leave the part of town untouched and return back to the list'),
- 'lang_save_statustext'
=> lang('Save the part of town and return back to the list'),
- 'lang_no_district'
=> lang('no district'),
- 'lang_district_statustext'
=> lang('Select the district the part of town belongs to.'),
- 'select_district_name'
=> 'values[district_id]',
- 'district_list'
=> $this->bocommon->select_district_list('select',$this->district_id)
- );
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('part of town') . ': ' . ($part_of_town_id?lang('edit part og
town'):lang('add part of town'));
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
- }
-
-
- function delete()
- {
- if(!$this->acl_delete)
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=> 8, 'acl_location'=> $this->acl_location));
- }
-
- $part_of_town_id =
phpgw::get_var('part_of_town_id', 'int');
-
- $confirm = phpgw::get_var('confirm', 'bool',
'POST');
-
- $link_data = array
- (
- 'menuaction' => 'property.uip_of_town.index'
- );
-
- if (phpgw::get_var('confirm', 'bool', 'POST'))
- {
- $this->bo->delete($part_of_town_id);
-
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
- }
-
-
$GLOBALS['phpgw']->xslttpl->add_file(array('app_delete'));
-
- $data = array
- (
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uip_of_town.delete', 'part_of_town_id'=> $part_of_town_id)),
- 'lang_confirm_msg' => lang('do you really
want to delete this entry'),
- 'lang_yes' => lang('yes'),
- 'lang_yes_statustext' => lang('Delete the
entry'),
- 'lang_no_statustext' => lang('Back to the
list'),
- 'lang_no' => lang('no')
- );
-
- $appname = lang('part of town');
- $function_msg = lang('delete part of town');
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
- }
-
- function view()
- {
- if(!$this->acl_read)
- {
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
'property.uilocation.stop', 'perm'=>1, 'acl_location'=> $this->acl_location));
- }
-
- $part_of_town_id =
phpgw::get_var('part_of_town_id', 'int', 'GET');
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('part of town') . ': ' . lang('view part of town');
-
- $GLOBALS['phpgw']->xslttpl->add_file('p_of_town');
-
- $p_of_town = $this->bo->read_single($part_of_town_id);
- $data = array
- (
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uip_of_town.index')),
- 'lang_id' => lang('ID'),
- 'lang_name' => lang('name'),
- 'lang_district' => lang('District'),
- 'lang_done' => lang('done'),
- 'value_id' => $p_of_town['id'],
- 'value_name' => $p_of_town['name'],
- 'value_district' =>
$this->bo->read_district_name($p_of_town['district_id']),
- 'value_date' =>
$GLOBALS['phpgw']->common->show_date($p_of_town['entry_date'])
- );
-
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
- }
- }
-
Deleted: trunk/property/templates/base/p_of_town.xsl
===================================================================
--- trunk/property/templates/base/p_of_town.xsl 2010-11-14 20:09:44 UTC (rev
6590)
+++ trunk/property/templates/base/p_of_town.xsl 2010-11-14 20:10:08 UTC (rev
6591)
@@ -1,265 +0,0 @@
-
- <xsl:template name="app_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:otherwise>
- <xsl:apply-templates select="list"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="list">
- <xsl:apply-templates select="menu"/>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <tr>
- <td align="left" colspan="3">
- <xsl:call-template
name="msgbox"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <tr>
- <td align="left">
- <xsl:call-template
name="filter_district"/>
- </td>
- <td align="right">
- <xsl:call-template name="search_field"/>
- </td>
- </tr>
- <tr>
- <td colspan="3" width="100%">
- <xsl:call-template name="nextmatchs"/>
- </td>
- </tr>
- </table>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:apply-templates select="table_header"/>
- <xsl:apply-templates select="values"/>
- <xsl:apply-templates select="table_add"/>
- </table>
- </xsl:template>
-
- <xsl:template match="table_header">
- <xsl:variable name="sort_time_created"
select="sort_time_created"/>
- <xsl:variable name="sort_part_of_town_id"
select="sort_part_of_town_id"/>
- <xsl:variable name="sort_name" select="sort_name"/>
- <xsl:variable name="sort_category" select="sort_category"/>
-
- <tr class="th">
- <td width="10%" align="right">
- <a href="{$sort_part_of_town_id}"
class="th_text"><xsl:value-of select="lang_part_of_town_id"/></a>
- </td>
- <td width="40%">
- <a href="{$sort_name}"
class="th_text"><xsl:value-of select="lang_name"/></a>
- </td>
- <td width="10%" align="center">
- <a href="{$sort_category}"
class="th_text"><xsl:value-of select="lang_category"/></a>
- </td>
- <td width="5%" align="center">
- <xsl:value-of select="lang_view"/>
- </td>
- <td width="5%" align="center">
- <xsl:value-of select="lang_edit"/>
- </td>
- <td width="5%" align="center">
- <xsl:value-of select="lang_delete"/>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template match="values">
- <xsl:variable name="lang_view_statustext"><xsl:value-of
select="lang_view_statustext"/></xsl:variable>
- <xsl:variable name="lang_edit_statustext"><xsl:value-of
select="lang_edit_statustext"/></xsl:variable>
- <xsl:variable name="lang_delete_statustext"><xsl:value-of
select="lang_delete_statustext"/></xsl:variable>
- <tr>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@class">
- <xsl:value-of
select="@class"/>
- </xsl:when>
- <xsl:when test="position() mod
2 = 0">
-
<xsl:text>row_off</xsl:text>
- </xsl:when>
- <xsl:otherwise>
-
<xsl:text>row_on</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
-
- <td align="right">
- <xsl:value-of select="part_of_town_id"/>
- </td>
- <td align="left">
- <xsl:value-of select="name"/>
- </td>
- <td align="left">
- <xsl:value-of select="category"/>
- </td>
- <td align="center">
- <xsl:variable
name="link_view"><xsl:value-of select="link_view"/></xsl:variable>
- <a href="{$link_view}"
onMouseover="window.status='{$lang_view_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of
select="text_view"/></a>
- </td>
- <td align="center">
- <xsl:variable
name="link_edit"><xsl:value-of select="link_edit"/></xsl:variable>
- <a href="{$link_edit}"
onMouseover="window.status='{$lang_edit_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of
select="text_edit"/></a>
- </td>
- <td align="center">
- <xsl:variable
name="link_delete"><xsl:value-of select="link_delete"/></xsl:variable>
- <a href="{$link_delete}"
onMouseover="window.status='{$lang_delete_statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of
select="text_delete"/></a>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template match="table_add">
- <tr>
- <td height="50">
- <xsl:variable
name="add_action"><xsl:value-of select="add_action"/></xsl:variable>
- <xsl:variable
name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
- <form method="post"
action="{$add_action}">
- <input type="submit" name="add"
value="{$lang_add}" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_add_statustext"/>
- <xsl:text>';
return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </td>
- </tr>
- </xsl:template>
-
-<!-- add / edit -->
-
- <xsl:template match="edit">
- <xsl:variable name="edit_url"><xsl:value-of
select="edit_url"/></xsl:variable>
- <div align="left">
- <form name="form" method="post" action="{$edit_url}">
- <table cellpadding="2" cellspacing="2" width="79%"
align="center">
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <tr>
- <td align="left" colspan="3">
- <xsl:call-template
name="msgbox"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="value_part_of_town_id!=''">
- <tr >
- <td width="25%" align="left">
- <xsl:value-of
select="lang_part_of_town_id"/>
- </td>
- <td width="75%" align="left">
- <xsl:value-of
select="value_part_of_town_id"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
-
- <tr >
- <td align="left">
- <xsl:value-of select="lang_district"/>
- </td>
- <td align="left">
- <xsl:call-template
name="select_district"/>
- </td>
- </tr>
- <tr align="left">
- <td valign="top" >
- <xsl:value-of select="lang_name"/>
- </td>
- <td align="left">
- <input type="text" name="values[name]"
value="{value_name}" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_name_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
-
- </td>
- </tr>
- <tr height="50">
- <td valign="bottom">
- <xsl:variable
name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
- <input type="submit"
name="values[save]" value="{$lang_save}" onMouseout="window.status='';return
true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_save_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- <td valign="bottom">
- <xsl:variable
name="lang_apply"><xsl:value-of select="lang_apply"/></xsl:variable>
- <input type="submit"
name="values[apply]" value="{$lang_apply}" onMouseout="window.status='';return
true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_apply_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- <td align="right" valign="bottom">
- <xsl:variable
name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
- <input type="submit"
name="values[cancel]" value="{$lang_cancel}"
onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_cancel_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- </tr>
- </table>
- </form>
- </div>
- </xsl:template>
-
-<!-- view -->
-
- <xsl:template match="view">
- <table cellpadding="2" cellspacing="2" width="79%"
align="center">
- <tr class="row_off">
- <td width="19%">
- <xsl:value-of select="lang_id"/>
- </td>
- <td width="81%">
- <xsl:value-of select="value_id"/>
- </td>
- </tr>
- <tr class="row_on">
- <td>
- <xsl:value-of select="lang_district"/>
- </td>
- <td>
- <xsl:value-of select="value_district"/>
- </td>
- </tr>
- <tr class="row_off">
- <td valign="top">
- <xsl:value-of select="lang_name"/>
- </td>
- <td>
- <xsl:value-of select="value_name"/>
- </td>
- </tr>
- <tr height="50">
- <td>
- <xsl:variable
name="done_action"><xsl:value-of select="done_action"/></xsl:variable>
- <xsl:variable
name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
- <form method="post"
action="{$done_action}">
- <input type="submit" class="forms"
name="done" value="{$lang_done}" onMouseover="window.status='Back to the
list.';return true;" onMouseout="window.status='';return true;"/>
- </form>
- </td>
- </tr>
- </table>
- </xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6591] property: remove obsolete,
Sigurd Nes <=