From c98ae369683cbf324b6dda5d958b97df85a277ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Wed, 29 Jun 2005 09:30:08 +0000 Subject: [PATCH] - change field id --> res_id due to database compability - add inventory number - add storage information - show nm-header on bottom --- resources/TODO | 4 - resources/inc/class.bo_resources.inc.php | 105 ++++++++++++----------- resources/inc/class.so_resources.inc.php | 10 +-- resources/inc/class.ui_resources.inc.php | 51 +++++------ resources/setup/etemplates.inc.php | 10 +-- resources/setup/setup.inc.php | 5 +- resources/setup/tables_current.inc.php | 8 +- resources/setup/tables_update.inc.php | 57 ++++++++++++ 8 files changed, 149 insertions(+), 101 deletions(-) diff --git a/resources/TODO b/resources/TODO index e1af7f8659..38924e2ee7 100644 --- a/resources/TODO +++ b/resources/TODO @@ -3,11 +3,9 @@ TODO: - some artwork : general resource pictures like (room, car, beamer ...) (Benkom) - sitemgr module -- rename table column id -> res_id for compability with other databases - list select all button --> add actions for selected: move to other cat,... popup on picture --> show - show nm-header on page bottom make button-alignment nicer add show-calender button @@ -15,8 +13,6 @@ TODO: bug: loose html and picture on tab-switch (eTemplate bug --> Ralf) bug: inputvalidation on selectbox --> eTemplate --> Ralf bug: accessories aren't moved to cat of master if it changes - insert --> storage information - delete --> calendar tab add pictureupload for htmlarea - admin section diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index 80dc0fb67a..abec0bd576 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -31,9 +31,10 @@ class bo_resources $this->conf =& CreateObject('phpgwapi.config'); $this->conf->read_repository(); - $this->cal_right_transform = array( EGW_ACL_CALREAD => EGW_ACL_READ, - EGW_ACL_DIRECT_BOOKING => EGW_ACL_READ | EGW_ACL_ADD | EGW_ACL_EDIT | EGW_ACL_DELETE, - EGW_ACL_CAT_ADMIN => EGW_ACL_READ | EGW_ACL_ADD | EGW_ACL_EDIT | EGW_ACL_DELETE, + $this->cal_right_transform = array( + EGW_ACL_CALREAD => EGW_ACL_READ, + EGW_ACL_DIRECT_BOOKING => EGW_ACL_READ | EGW_ACL_ADD | EGW_ACL_EDIT | EGW_ACL_DELETE, + EGW_ACL_CAT_ADMIN => EGW_ACL_READ | EGW_ACL_ADD | EGW_ACL_EDIT | EGW_ACL_DELETE, ); } @@ -47,7 +48,7 @@ class bo_resources if ($this->debug) _debug_array($query); $query['search'] = $query['search'] ? $query['search'] : '*'; $criteria = array('name' => $query['search'], 'short_description' => $query['search']); - $read_onlys = 'id,name,short_description,quantity,useable,bookable,buyable,cat_id,location'; + $read_onlys = 'res_id,name,short_description,quantity,useable,bookable,buyable,cat_id,location,storage_info'; $accessory_of = $query['view_accs_of'] ? $query['view_accs_of'] : -1; $filter = array('accessory_of' => $accessory_of); @@ -74,40 +75,40 @@ class bo_resources { if (!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_EDIT)) { - $readonlys["edit[$resource[id]]"] = true; + $readonlys["edit[$resource[res_id]]"] = true; } if (!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_DELETE)) { - $readonlys["delete[$resource[id]]"] = true; + $readonlys["delete[$resource[res_id]]"] = true; } if ((!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_ADD)) || $accessory_of != -1) { - $readonlys["new_acc[$resource[id]]"] = true; + $readonlys["new_acc[$resource[res_id]]"] = true; } if (!$resource['bookable'] /* && calender-acl viewable */) { - $readonlys["bookable[$resource[id]]"] = true; + $readonlys["bookable[$resource[res_id]]"] = true; } if (!$resource['buyable']) { - $readonlys["buyable[$resource[id]]"] = true; + $readonlys["buyable[$resource[res_id]]"] = true; } - $readonlys["view_acc[$resource[id]]"] = true; - $links = $this->link->get_links('resources',$resource['id']); + $readonlys["view_acc[$resource[res_id]]"] = true; + $links = $this->link->get_links('resources',$resource['res_id']); if(count($links) != 0) { foreach ($links as $link_num => $link) { if($link['app'] == 'resources') { - if($this->so->get_value('accessory_of',$link['id']) != -1) + if($this->so->get_value('accessory_of',$link['res_id']) != -1) { - $readonlys["view_acc[$resource[id]]"] = false; + $readonlys["view_acc[$resource[res_id]]"] = false; } } } } - $rows[$num]['picture_thumb'] = $this->get_picture($resource['id']); + $rows[$num]['picture_thumb'] = $this->get_picture($resource['res_id']); $rows[$num]['admin'] = $this->acl->get_cat_admin($resource['cat_id']); } return $nr; @@ -117,18 +118,18 @@ class bo_resources * reads a resource exept binary datas * * Cornelius Weiss - * @param int $id resource id + * @param int $res_id resource id * @return array with key => value or false if not found or allowed */ - function read($id) + function read($res_id) { - if(!$this->acl->is_permitted($this->so->get_value('cat_id',$id),EGW_ACL_READ)) + if(!$this->acl->is_permitted($this->so->get_value('cat_id',$res_id),EGW_ACL_READ)) { echo lang('You are not permitted to get information about this resource!') . '
'; echo lang('Notify your administrator to correct this situation') . '
'; return false; } - return $this->so->read(array('id' => $id)); + return $this->so->read(array('res_id' => $res_id)); } /** @@ -146,18 +147,18 @@ class bo_resources } // we need an id to save pictures and make links... - if(!$resource['id']) + if(!$resource['res_id']) { - $resource['id'] = $this->so->save($resource); + $resource['res_id'] = $this->so->save($resource); } switch ($resource['picture_src']) { case 'own_src': - $vfs_data = array('string' => $this->pictures_dir.$resource['id'].'.jpg','relatives' => array(RELATIVE_ROOT)); + $vfs_data = array('string' => $this->pictures_dir.$resource['res_id'].'.jpg','relatives' => array(RELATIVE_ROOT)); if($resource['own_file']['size'] > 0) { - $msg = $this->save_picture($resource['own_file'],$resource['id']); + $msg = $this->save_picture($resource['own_file'],$resource['res_id']); break; } elseif($this->vfs->file_exists($vfs_data)) @@ -174,7 +175,7 @@ class bo_resources if($resource['own_file']['size'] > 0) { $resource['picture_src'] = 'own_src'; - $msg = $this->save_picture($resource['own_file'],$resource['id']); + $msg = $this->save_picture($resource['own_file'],$resource['res_id']); } else { @@ -190,17 +191,17 @@ class bo_resources // delete old pictures if($resource['picture_src'] != 'own_src') { - $this->remove_picture($resource['id']); + $this->remove_picture($resource['res_id']); } // save links if(is_array($resource['link_to']['to_id'])) { - $this->link->link('resources',$resource['id'],$resource['link_to']['to_id']); + $this->link->link('resources',$resource['res_id'],$resource['link_to']['to_id']); } if($resource['accessory_of'] != -1) - { echo $resource['id'].', '.$resource['accessory_of']; - $this->link->link('resources',$resource['id'],'resources',$resource['accessory_of']); + { echo $resource['res_id'].', '.$resource['accessory_of']; + $this->link->link('resources',$resource['res_id'],'resources',$resource['accessory_of']); } return $this->so->save($resource) ? false : lang('Something went wrong by saving resource'); @@ -210,29 +211,29 @@ class bo_resources * deletes resource including pictures and links * * @author Lukas Weiss - * @param int $id id of resource + * @param int $res_id id of resource */ - function delete($id) + function delete($res_id) { - $this->remove_picture($id); - $this->link->unlink(0,'resources',$id); - return $this->so->delete(array('id'=>$id)) ? false : lang('Something went wrong by deleting resource'); + $this->remove_picture($res_id); + $this->link->unlink(0,'resources',$res_id); + return $this->so->delete(array('res_id'=>$res_id)) ? false : lang('Something went wrong by deleting resource'); } /** * gets list of accessories for resource * * Cornelius Weiss - * @param int $id id of resource + * @param int $res_id id of resource * @return array */ - function get_acc_list($id) + function get_acc_list($res_id) { - if($id < 1){return;} - $data = $this->so->search('','id,name','','','','','',$start,array('accessory_of' => $id),'',$need_full_no_count=true); + if($res_id < 1){return;} + $data = $this->so->search('','res_id,name','','','','','',$start,array('accessory_of' => $res_id),'',$need_full_no_count=true); foreach($data as $num => $resource) { - $acc_list[$resource['id']] = $resource['name']; + $acc_list[$resource['res_id']] = $resource['name']; } return $acc_list; } @@ -248,7 +249,7 @@ class bo_resources //echo "

bo_resources::get_calendar_info(".print_r($res_id,true)."

\n"; if(!is_array($res_id) && $res_id < 1) return; - $data = $this->so->search(array('id' => $res_id),'id,cat_id,name,useable'); + $data = $this->so->search(array('res_id' => $res_id),'res_id,cat_id,name,useable'); foreach($data as $num => $resource) { @@ -286,13 +287,13 @@ class bo_resources function link_query( $pattern ) { $criteria = array('name' => $pattern, 'short_description' => $pattern); - $only_keys = 'id,name,short_description'; + $only_keys = 'res_id,name,short_description'; $data = $this->so->search($criteria,$only_keys,$order_by='',$extra_cols='',$wildcard='%',$empty,$op='OR'); foreach($data as $num => $resource) { if($num != 0) { - $list[$resource['id']] = $resource['name']. ($resource['short_description'] ? ', ['.$resource['short_description'].']':''); + $list[$resource['res_id']] = $resource['name']. ($resource['short_description'] ? ', ['.$resource['short_description'].']':''); } } return $list; @@ -300,14 +301,14 @@ class bo_resources /** * @author Cornelius Weiss - * get title for an infolog entry identified by $id + * get title for an infolog entry identified by $res_id * */ function link_title( $resource ) { if (!is_array($resource) && $resource > 0) { - $resource = $this->so->read(array('id' => $resource)); + $resource = $this->so->read(array('res_id' => $resource)); $title = $resource['name']. ($resource['short_description'] ? ', ['.$resource['short_description'].']':''); } return $title ? $title : false; @@ -421,25 +422,25 @@ class bo_resources /** * get resource picture either from vfs or from symlink * Cornelius Weiss - * @param int $id id of resource + * @param int $res_id id of resource * @param bool $size false = thumb, true = full pic * @return string url of picture */ - function get_picture($id=0,$size=false) + function get_picture($res_id=0,$size=false) { - if ($id > 0) + if ($res_id > 0) { - $src = $this->so->get_value('picture_src',$id); + $src = $this->so->get_value('picture_src',$res_id); } switch($src) { case 'own_src': $picture = $this->conf->config_data['dont_use_vfs'] ? $GLOBALS['egw_info']['server']['webserver_url'] : 'vfs:'; - $picture .= $size ? $this->pictures_dir.$id.'.jpg' : $this->thumbs_dir.$id.'.jpg'; + $picture .= $size ? $this->pictures_dir.$res_id.'.jpg' : $this->thumbs_dir.$res_id.'.jpg'; break; case 'cat_src': - list($picture) = $this->cats->return_single($this->so->get_value('cat_id',$id)); + list($picture) = $this->cats->return_single($this->so->get_value('cat_id',$res_id)); $picture = unserialize($picture['data']); if($picture['icon']) { @@ -459,17 +460,17 @@ class bo_resources * removes picture from vfs * * Cornelius Weiss - * @param int $id id of resource + * @param int $res_id id of resource * @return bool succsess or not */ - function remove_picture($id) + function remove_picture($res_id) { - $vfs_data = array('string' => $this->pictures_dir.$id.'.jpg','relatives' => array(RELATIVE_ROOT)); + $vfs_data = array('string' => $this->pictures_dir.$res_id.'.jpg','relatives' => array(RELATIVE_ROOT)); $this->vfs->override_acl = 1; if($this->vfs->file_exists($vfs_data)) { $this->vfs->rm($vfs_data); - $vfs_data['string'] = $this->thumbs_dir.$id.'.jpg'; + $vfs_data['string'] = $this->thumbs_dir.$res_id.'.jpg'; $this->vfs->rm($vfs_data); } $this->vfs->override_acl = 0; diff --git a/resources/inc/class.so_resources.inc.php b/resources/inc/class.so_resources.inc.php index a146f9e533..c5068ac3ad 100755 --- a/resources/inc/class.so_resources.inc.php +++ b/resources/inc/class.so_resources.inc.php @@ -23,16 +23,16 @@ class so_resources extends so_sql } /** - * gets the value of $key from resource of $id + * gets the value of $key from resource of $res_id * * Cornelius Weiss * @param string $key key of value to get - * @param int $id resource id + * @param int $res_id resource id * @return mixed value of key and resource, false if key or id not found. */ - function get_value($key,$id) + function get_value($key,$res_id) { - if($this->db->select($this->table_name,$key,array('id' => $id),__LINE__,__FILE__)) + if($this->db->select($this->table_name,$key,array('res_id' => $res_id),__LINE__,__FILE__)) { $value = $this->db->row(row); return $value[$key]; @@ -50,7 +50,7 @@ class so_resources extends so_sql function save($resource) { $this->data = $resource; - return parent::save() == 0 ? $this->data['id'] : false; + return parent::save() == 0 ? $this->data['res_id'] : false; } } diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index f0bcc60f77..dbb309d6e1 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -104,6 +104,7 @@ class ui_resources $content['nm']['no_filter2'] = true; $content['nm']['filter_no_lang'] = true; $content['nm']['no_cat'] = true; + $content['nm']['bottom_too'] = true; $content['nm']['order'] = 'name'; $content['nm']['sort'] = 'ASC'; @@ -124,7 +125,7 @@ class ui_resources if($content['nm']['view_accs_of']) { - $master = $this->bo->so->read(array('id' => $content['nm']['view_accs_of'])); + $master = $this->bo->so->read(array('res_id' => $content['nm']['view_accs_of'])); $content['view_accs_of'] = $content['nm']['view_accs_of']; $content['nm']['get_rows'] = 'resources.bo_resources.get_rows'; $content['nm']['no_filter'] = true; @@ -166,7 +167,7 @@ class ui_resources if(isset($content['delete'])) { unset($content['delete']); - $content['msg'] = $this->bo->delete($content['id']); + $content['msg'] = $this->bo->delete($content['res_id']); } if($content['msg']) @@ -182,25 +183,25 @@ class ui_resources } else { - $id = $content; - if (isset($_GET['id'])) $id = $_GET['id']; + $res_id = $content; + if (isset($_GET['res_id'])) $res_id = $_GET['res_id']; if (isset($_GET['accessory_of'])) $accessory_of = $_GET['accessory_of']; - $content = array('id' => $id); + $content = array('res_id' => $res_id); - if ($id > 0) + if ($res_id > 0) { - $content = $this->bo->read($id); + $content = $this->bo->read($res_id); $content['gen_src_list'] = strstr($content['picture_src'],'.') ? $content['picture_src'] : false; $content['picture_src'] = strstr($content['picture_src'],'.') ? 'gen_src' : $content['picture_src']; $content['link_to'] = array( - 'to_id' => $id, + 'to_id' => $res_id, 'to_app' => 'resources' ); } } // some presetes - $content['resource_picture'] = $this->bo->get_picture($content['id'],$content['picture_src'],$size=true); + $content['resource_picture'] = $this->bo->get_picture($content['res_id'],$content['picture_src'],$size=true); $content['quantity'] = $content['quantity'] ? $content['quantity'] : 1; $content['useable'] = $content['useable'] ? $content['useable'] : 1; $content['accessory_of'] = $accessory_of; @@ -216,7 +217,7 @@ class ui_resources $sel_options['cat_id'] = array($catofmaster => $sel_options['cat_id'][$catofmaster]); } - $content['general|page|pictures|links|calendar'] = 'resources.edit_tabs.page'; //debug +// $content['general|page|pictures|links|calendar'] = 'resources.edit_tabs.page'; //debug $no_button = array(); // TODO: show delete button only if allowed to delete resource $preserv = $content; $this->tmpl->read('resources.edit'); @@ -251,23 +252,23 @@ class ui_resources /** * showes a single resource * - * @param int $id resource id + * @param int $res_id resource id * @author Lukas Weiss */ - function show($id=0) + function show($res_id=0) { - if (isset($_GET['id'])) $id = $_GET['id']; + if (isset($_GET['res_id'])) $res_id = $_GET['res_id']; - $content = array('id' => $id); - $content = $this->bo->read($id); + $content = array('res_id' => $res_id); + $content = $this->bo->read($res_id); $content['gen_src_list'] = strstr($content['picture_src'],'.') ? $content['picture_src'] : false; $content['picture_src'] = strstr($content['picture_src'],'.') ? 'gen_src' : $content['picture_src']; $content['link_to'] = array( - 'to_id' => $id, + 'to_id' => $res_id, 'to_app' => 'resources' ); - $content['resource_picture'] = $this->bo->get_picture($content['id'],$content['picture_src'],$size=true); + $content['resource_picture'] = $this->bo->get_picture($content['res_id'],$content['picture_src'],$size=true); $content['quantity'] = $content['quantity'] ? $content['quantity'] : 1; $content['useable'] = $content['useable'] ? $content['useable'] : 1; @@ -287,7 +288,7 @@ class ui_resources $content['description'] = chop($content['long_description']) ? $content['long_description'] : (chop($content['short_description']) ? $content['short_description'] : lang("no description available")); $content['description'] = $content['description'] ? $content['description'] : lang('no description available'); $content['link_to'] = array( - 'to_id' => $id, + 'to_id' => $res_id, 'to_app' => 'resources' ); $sel_options = array(); @@ -421,18 +422,6 @@ class ui_resources $no_button = array(); $this->tmpl->read('resources.resource_select'); $this->tmpl->exec('resources.ui_resources.select',$content,$sel_options,$no_button,$preserv,2); + } } - /** - * deletes a resource (lets do this only in bo ok?) - * - * @param int $id resource id - * @author Lukas Weiss - */ -/* function delete($id) - { - $this->bo->delete($id); - return $this->index(); - } -*/ -} diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index 8a6995e63e..293f9b1767 100644 --- a/resources/setup/etemplates.inc.php +++ b/resources/setup/etemplates.inc.php @@ -1,5 +1,5 @@ 'resources.edit_buttons','template' => '','lang' $templ_data[] = array('name' => 'resources.edit_pictures','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:2:"c1";s:3:"nmr";s:2:"c2";s:3:"nmr";s:2:"c3";s:3:"nmr";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:26:"Use general resources icon";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"gen_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"gen_src_list";}}i:2;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:23:"Use the category\'s icon";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"cat_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:15:"Use own picture";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"own_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:2:{s:4:"type";s:4:"file";s:4:"name";s:8:"own_file";}}}s:4:"rows";i:3;s:4:"cols";i:3;}}','size' => '','style' => '','modified' => '1108638846',); -$templ_data[] = array('name' => 'resources.edit_tabs','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:1:"A";s:3:"550";s:2:"c1";s:6:"row_on";s:2:"c2";s:7:"row_off";}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:4:"text";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";s:4:"help";s:16:"Name of resource";s:6:"needed";s:1:"1";}s:1:"B";a:6:{s:4:"type";s:6:"select";s:5:"label";s:8:"Category";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"cat_id";s:6:"needed";s:1:"1";s:4:"help";s:44:"Which category does this resource belong to?";}}i:2;a:2:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:42:"General|Description|Picture|Links|Calendar";s:4:"name";s:36:"general|page|pictures|links|calendar";s:4:"help";s:194:"General informations about resource|Informations about the location of resource|Prizeing information for booking or buying|Web-Page of resource|Pictures or resource|The Calendar of this resource";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:3;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1116664222',); +$templ_data[] = array('name' => 'resources.edit_tabs','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:2:{s:2:"c1";s:6:"row_on";s:2:"c2";s:7:"row_off";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:4:"text";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";s:4:"help";s:16:"Name of resource";s:6:"needed";s:1:"1";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:5:"label";s:16:"Inventory number";s:4:"name";s:16:"inventory_number";}s:1:"C";a:7:{s:4:"type";s:6:"select";s:5:"label";s:8:"Category";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"cat_id";s:6:"needed";s:1:"1";s:4:"help";s:44:"Which category does this resource belong to?";s:5:"align";s:5:"right";}}i:2;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:33:"General|Description|Picture|Links";s:4:"name";s:27:"general|page|pictures|links";s:4:"help";s:164:"General informations about resource|Informations about the location of resource|Prizeing information for booking or buying|Web-Page of resource|Pictures or resource";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:3;s:4:"cols";i:3;}}','size' => '','style' => '','modified' => '1116664222',); $templ_data[] = array('name' => 'resources.edit_tabs.accessories','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:19:"resources.show.rows";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1109668181',); -$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:1:{s:1:"C";s:2:"10";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Description (short)";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:17:"short_description";s:4:"help";s:29:"Short description of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:29:"Short description of resource";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:8:"location";s:4:"help";s:20:"Location of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:28:"Where to find this resource?";}}i:3;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:8:"quantity";s:4:"help";s:20:"Quantity of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Quantity of resource";}}i:4;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Useable";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:7:"useable";s:4:"help";s:29:"How many of them are useable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:38:"How many of the resources are useable?";}}i:5;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Bookable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"bookable";s:4:"help";s:21:"Is resource bookable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:26:"Is this resource bookable?";}}i:6;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Buyable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"buyable";s:4:"help";s:20:"Is resource buyable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:25:"Is this resource buyable?";}}}s:4:"rows";i:6;s:4:"cols";i:4;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1093597682',); +$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:1:{s:1:"C";s:2:"10";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Description (short)";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:17:"short_description";s:4:"help";s:29:"Short description of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:29:"Short description of resource";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:8:"location";s:4:"help";s:20:"Location of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:28:"Where to find this resource?";}}i:3;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Storage information";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:12:"storage_info";s:4:"help";s:25:"Information about storage";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:25:"Information about storage";}}i:4;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:8:"quantity";s:4:"help";s:20:"Quantity of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Quantity of resource";}}i:5;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Useable";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:7:"useable";s:4:"help";s:29:"How many of them are useable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:38:"How many of the resources are useable?";}}i:6;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Bookable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"bookable";s:4:"help";s:21:"Is resource bookable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:26:"Is this resource bookable?";}}i:7;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Buyable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"buyable";s:4:"help";s:20:"Is resource buyable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:25:"Is this resource buyable?";}}}s:4:"rows";i:7;s:4:"cols";i:4;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1093597682',); $templ_data[] = array('name' => 'resources.edit_tabs.links','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:6:{s:1:"A";s:3:"100";s:2:"h4";s:3:"164";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:2:"c3";s:2:"th";s:2:"c4";s:11:"row_off,top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:16:"Create new links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:7:"link-to";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:14:"Existing links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:9:"link-list";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1109248913',); @@ -45,7 +45,7 @@ $templ_data[] = array('name' => 'resources.show.actions','template' => '','lang' $templ_data[] = array('name' => 'resources.show.actions_header','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:4:"size";s:9:"check.png";s:4:"name";s:30:"javascript:check_all(\'select\')";}}}s:4:"rows";i:1;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1094025049',); -$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:1:"C";s:2:"3%";s:2:"c1";s:3:"nmh";s:2:"c2";s:7:"nmr,top";s:1:"F";s:2:"5%";}i:1;a:6:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:17:"Short description";s:4:"name";s:17:"short_description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Useable";s:4:"name";s:7:"useable";s:4:"help";s:36:"How many of this resource are usable";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:8:"quantity";s:4:"help";s:32:"How many of this resource exists";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Administrator";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Location";s:4:"name";s:8:"location";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:18:"Storage Inforation";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:2:{s:4:"type";s:5:"label";s:6:"needed";s:1:"1";}s:5:"align";s:5:"right";i:4;a:11:{s:4:"type";s:6:"button";s:4:"size";s:9:"check.png";s:5:"label";s:9:"Check all";s:5:"align";s:5:"right";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";i:1;a:1:{s:4:"type";s:5:"label";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:1:{s:4:"type";s:5:"label";}s:6:"needed";s:1:"1";s:7:"onclick";s:61:"toggle_all(this.form,form::name(\'checkbox[]\')); return false;";}}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:25:"${row}[short_description]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:15:"${row}[useable]";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:16:"${row}[quantity]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"select-cat";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[admin]";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}i:2;a:2:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:12:"bookable.gif";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"bookable[$row_cont[id]]";s:4:"help";s:18:"Book this resource";s:7:"onclick";s:214:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.edit&participants=r$row_cont[id]\'),\'\',\'dependent=yes,width=750,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:11:"buyable.gif";s:5:"label";s:17:"Buy this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"buyable[$row_cont[id]]";s:4:"help";s:17:"Buy this resource";}s:4:"span";s:10:",buttonbox";}i:2;a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:8:"edit.gif";s:5:"label";s:4:"Edit";s:5:"align";s:6:"center";s:4:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:209:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.edit&id=$row_cont[id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:7:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"size";s:10:"delete.gif";}s:6:"needed";s:1:"1";s:5:"align";s:5:"right";s:4:"span";s:10:",buttonbox";}i:3;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:7:"new.gif";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"new_acc[$row_cont[id]]";s:4:"help";s:38:"Create new accessory for this resource";s:7:"onclick";s:224:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.edit&id=0&accessory_of=$row_cont[id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"view_acc.gif";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"view_acc[$row_cont[id]]";s:4:"help";s:34:"View accessories for this resource";}s:4:"span";s:10:",buttonbox";}i:4;a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:4:"View";s:5:"align";s:5:"right";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this entry";s:7:"onclick";s:209:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.show&id=$row_cont[id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:4:{s:4:"type";s:8:"checkbox";s:5:"align";s:5:"right";s:4:"name";s:10:"checkbox[]";s:4:"size";s:13:"$row_cont[id]";}s:5:"align";s:5:"right";s:4:"span";s:10:",buttonbox";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108922292',); +$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:1:"C";s:2:"3%";s:2:"c1";s:3:"nmh";s:2:"c2";s:7:"nmr,top";s:1:"F";s:2:"5%";}i:1;a:6:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:17:"Short description";s:4:"name";s:17:"short_description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Useable";s:4:"name";s:7:"useable";s:4:"help";s:36:"How many of this resource are usable";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:8:"quantity";s:4:"help";s:32:"How many of this resource exists";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Administrator";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Location";s:4:"name";s:8:"location";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:18:"Storage Inforation";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:2:{s:4:"type";s:5:"label";s:6:"needed";s:1:"1";}s:5:"align";s:5:"right";i:4;a:11:{s:4:"type";s:6:"button";s:4:"size";s:9:"check.png";s:5:"label";s:9:"Check all";s:5:"align";s:5:"right";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";i:1;a:1:{s:4:"type";s:5:"label";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:1:{s:4:"type";s:5:"label";}s:6:"needed";s:1:"1";s:7:"onclick";s:61:"toggle_all(this.form,form::name(\'checkbox[]\')); return false;";}}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:25:"${row}[short_description]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:15:"${row}[useable]";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:16:"${row}[quantity]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"select-cat";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[admin]";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[storage_info]";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:12:"bookable.gif";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"name";s:27:"bookable[$row_cont[res_id]]";s:4:"help";s:18:"Book this resource";s:7:"onclick";s:218:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.edit&participants=r$row_cont[res_id]\'),\'\',\'dependent=yes,width=750,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:11:"buyable.gif";s:5:"label";s:17:"Buy this resource";s:5:"align";s:6:"center";s:4:"name";s:26:"buyable[$row_cont[res_id]]";s:4:"help";s:17:"Buy this resource";}s:4:"span";s:10:",buttonbox";}i:2;a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:8:"edit.gif";s:5:"label";s:4:"Edit";s:5:"align";s:6:"center";s:4:"name";s:23:"edit[$row_cont[res_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:217:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.edit&res_id=$row_cont[res_id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:7:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:25:"delete[$row_cont[res_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"size";s:10:"delete.gif";}s:6:"needed";s:1:"1";s:5:"align";s:5:"right";s:4:"span";s:10:",buttonbox";}i:3;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:7:"new.gif";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:26:"new_acc[$row_cont[res_id]]";s:4:"help";s:38:"Create new accessory for this resource";s:7:"onclick";s:228:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.edit&res_id=0&accessory_of=$row_cont[id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"view_acc.gif";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:27:"view_acc[$row_cont[res_id]]";s:4:"help";s:34:"View accessories for this resource";}s:4:"span";s:10:",buttonbox";}i:4;a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:4:"View";s:5:"align";s:5:"right";s:4:"name";s:23:"view[$row_cont[res_id]]";s:4:"help";s:15:"View this entry";s:7:"onclick";s:217:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.show&res_id=$row_cont[res_id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:2;a:4:{s:4:"type";s:8:"checkbox";s:5:"align";s:5:"right";s:4:"name";s:10:"checkbox[]";s:4:"size";s:17:"$row_cont[res_id]";}s:5:"align";s:5:"right";s:4:"span";s:10:",buttonbox";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108922292',); -$templ_data[] = array('name' => 'resources.showdetails','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:6:{s:2:"c1";s:7:"nmh,top";s:1:"B";s:4:"100%";s:1:"A";s:3:"100";s:2:"c5";s:2:"th";s:2:"h3";s:2:"1%";s:2:"c6";s:11:"row_off,top";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"image";s:4:"name";s:16:"resource_picture";}s:1:"B";a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:2:"c4";s:4:",top";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:1:"b";s:4:"name";s:4:"name";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:1:"i";s:4:"name";s:8:"cat_name";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:14:"select-account";s:5:"label";s:13:"Responsible: ";s:4:"name";s:9:"cat_admin";s:7:"no_lang";s:1:"1";s:8:"readonly";s:1:"1";}}i:4;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:10:"Quantity: ";s:4:"name";s:8:"quantity";}}}s:4:"rows";i:4;s:4:"cols";i:1;}}i:2;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"html";s:4:"span";s:1:"2";s:4:"name";s:11:"description";s:8:"readonly";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:5:{s:4:"type";s:4:"grid";s:4:"span";s:1:"2";s:4:"data";a:2:{i:0;a:1:{s:1:"A";s:4:"100%";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Related links";}s:1:"B";a:6:{s:4:"type";s:6:"button";s:5:"label";s:17:"Buy this resource";s:5:"align";s:5:"right";s:4:"size";s:7:"buyable";s:4:"help";s:17:"Buy this resource";s:4:"name";s:11:"btn_buyable";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:18:"Book this resource";s:4:"name";s:12:"btn_bookable";s:4:"size";s:8:"bookable";}s:1:"D";a:5:{s:4:"type";s:6:"button";s:5:"label";s:4:"edit";s:4:"name";s:8:"btn_edit";s:4:"size";s:4:"edit";s:4:"help";s:4:"edit";}}}s:4:"rows";i:1;s:4:"cols";i:4;}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"link-list";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";s:8:"readonly";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Close";s:4:"span";s:1:"2";s:7:"onclick";s:14:"window.close()";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1118568477',); +$templ_data[] = array('name' => 'resources.showdetails','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:6:{s:2:"c1";s:7:"nmh,top";s:1:"B";s:4:"100%";s:1:"A";s:3:"100";s:2:"c5";s:2:"th";s:2:"h3";s:2:"1%";s:2:"c6";s:11:"row_off,top";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"image";s:4:"name";s:16:"resource_picture";}s:1:"B";a:4:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:1:{s:2:"c5";s:4:",top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:1:"b";s:5:"label";s:5:"Name:";}s:1:"B";a:4:{s:4:"type";s:5:"label";s:4:"size";s:1:"b";s:7:"no_lang";s:1:"1";s:4:"name";s:4:"name";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"Inventory number:";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"inventory_number";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Category:";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"name";s:6:"cat_id";s:8:"readonly";s:1:"1";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Responsible: ";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:9:"cat_admin";s:8:"readonly";s:1:"1";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:10:"Quantity: ";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:8:"quantity";}}i:6;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Useable:";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:7:"useable";}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Location:";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:8:"location";}}i:8;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Storage information:";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:12:"storage_info";}}}s:4:"rows";i:8;s:4:"cols";i:2;}}i:2;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"html";s:4:"span";s:1:"2";s:4:"name";s:11:"description";s:8:"readonly";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:5:{s:4:"type";s:4:"grid";s:4:"span";s:1:"2";s:4:"data";a:2:{i:0;a:1:{s:1:"A";s:4:"100%";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Related links";}s:1:"B";a:6:{s:4:"type";s:6:"button";s:5:"label";s:17:"Buy this resource";s:5:"align";s:5:"right";s:4:"size";s:7:"buyable";s:4:"help";s:17:"Buy this resource";s:4:"name";s:11:"btn_buyable";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:18:"Book this resource";s:4:"name";s:12:"btn_bookable";s:4:"size";s:8:"bookable";}s:1:"D";a:5:{s:4:"type";s:6:"button";s:5:"label";s:4:"edit";s:4:"name";s:8:"btn_edit";s:4:"size";s:4:"edit";s:4:"help";s:4:"edit";}}}s:4:"rows";i:1;s:4:"cols";i:4;}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"link-list";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";s:8:"readonly";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Close";s:4:"span";s:1:"2";s:7:"onclick";s:14:"window.close()";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1118568477',); diff --git a/resources/setup/setup.inc.php b/resources/setup/setup.inc.php index 14c40e4adc..5c818dc34b 100755 --- a/resources/setup/setup.inc.php +++ b/resources/setup/setup.inc.php @@ -15,7 +15,7 @@ $setup_info['resources']['name'] = 'resources'; $setup_info['resources']['title'] = 'resources'; - $setup_info['resources']['version'] = '0.0.1.017'; + $setup_info['resources']['version'] = '0.0.1.020'; $setup_info['resources']['app_order'] = 1; $setup_info['resources']['tables'] = array('egw_resources'); $setup_info['resources']['enable'] = 1; @@ -68,3 +68,6 @@ + + + diff --git a/resources/setup/tables_current.inc.php b/resources/setup/tables_current.inc.php index 0f1b3508e2..775bca97c8 100755 --- a/resources/setup/tables_current.inc.php +++ b/resources/setup/tables_current.inc.php @@ -16,7 +16,7 @@ $phpgw_baseline = array( 'egw_resources' => array( 'fd' => array( - 'id' => array('type' => 'auto'), + 'res_id' => array('type' => 'auto'), 'name' => array('type' => 'varchar','precision' => '100'), 'short_description' => array('type' => 'varchar','precision' => '100'), 'cat_id' => array('type' => 'int','precision' => '11','nullable' => False), @@ -28,9 +28,11 @@ 'prize' => array('type' => 'varchar','precision' => '200'), 'long_description' => array('type' => 'longtext'), 'picture_src' => array('type' => 'varchar','precision' => '20'), - 'accessory_of' => array('type' => 'int','precision' => '11','default' => '-1') + 'accessory_of' => array('type' => 'int','precision' => '11','default' => '-1'), + 'storage_info' => array('type' => 'varchar','precision' => '200'), + 'inventory_number' => array('type' => 'varchar','precision' => '20') ), - 'pk' => array('id'), + 'pk' => array('res_id'), 'fk' => array(), 'ix' => array(), 'uc' => array() diff --git a/resources/setup/tables_update.inc.php b/resources/setup/tables_update.inc.php index a862baf319..f0c95ce49c 100755 --- a/resources/setup/tables_update.inc.php +++ b/resources/setup/tables_update.inc.php @@ -204,4 +204,61 @@ $GLOBALS['setup_info']['resources']['currentver'] = '0.0.1.017'; return $GLOBALS['setup_info']['resources']['currentver']; } + + + $test[] = '0.0.1.017'; + function resources_upgrade0_0_1_017() + { + $GLOBALS['phpgw_setup']->oProc->RenameColumn('egw_resources','id','res_id'); + $GLOBALS['phpgw_setup']->oProc->RefreshTable('egw_resources',array( + 'fd' => array( + 'res_id' => array('type' => 'auto'), + 'name' => array('type' => 'varchar','precision' => '100'), + 'short_description' => array('type' => 'varchar','precision' => '100'), + 'cat_id' => array('type' => 'int','precision' => '11','nullable' => False), + 'quantity' => array('type' => 'int','precision' => '11','default' => '1'), + 'useable' => array('type' => 'int','precision' => '11','default' => '1'), + 'location' => array('type' => 'varchar','precision' => '100'), + 'bookable' => array('type' => 'varchar','precision' => '1'), + 'buyable' => array('type' => 'varchar','precision' => '1'), + 'prize' => array('type' => 'varchar','precision' => '200'), + 'long_description' => array('type' => 'longtext'), + 'picture_src' => array('type' => 'varchar','precision' => '20'), + 'accessory_of' => array('type' => 'int','precision' => '11','default' => '-1') + ), + 'pk' => array('res_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + )); + + $GLOBALS['setup_info']['resources']['currentver'] = '0.0.1.018'; + return $GLOBALS['setup_info']['resources']['currentver']; + } + + + $test[] = '0.0.1.018'; + function resources_upgrade0_0_1_018() + { + $GLOBALS['phpgw_setup']->oProc->AddColumn('egw_resources','storage_info',array( + 'type' => 'varchar', + 'precision' => '200' + )); + + $GLOBALS['setup_info']['resources']['currentver'] = '0.0.1.019'; + return $GLOBALS['setup_info']['resources']['currentver']; + } + + + $test[] = '0.0.1.019'; + function resources_upgrade0_0_1_019() + { + $GLOBALS['phpgw_setup']->oProc->AddColumn('egw_resources','inventory_number',array( + 'type' => 'varchar', + 'precision' => '20' + )); + + $GLOBALS['setup_info']['resources']['currentver'] = '0.0.1.020'; + return $GLOBALS['setup_info']['resources']['currentver']; + } ?>