From 147b9264908ce8ee55ee55c9b2caebf32374e2c4 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 26 Nov 2012 21:04:31 +0000 Subject: [PATCH] - Remove 'Add accessory button' - Fix bug in delete confirm - Fix link url --- resources/inc/class.resources_bo.inc.php | 19 +++++ resources/inc/class.resources_hooks.inc.php | 4 +- resources/inc/class.resources_ui.inc.php | 79 ++++++++++++--------- resources/setup/etemplates.inc.php | 10 +-- resources/templates/default/show.xet | 17 ++++- 5 files changed, 86 insertions(+), 43 deletions(-) diff --git a/resources/inc/class.resources_bo.inc.php b/resources/inc/class.resources_bo.inc.php index c9310a15f8..4dc30a3d94 100755 --- a/resources/inc/class.resources_bo.inc.php +++ b/resources/inc/class.resources_bo.inc.php @@ -188,9 +188,17 @@ class resources_bo $resource['class'] .= 'no_buy '; } $readonlys["view_acc[{$resource['res_id']}]"] = ($resource['acc_count'] == 0); + $resource['class'] .= ($resource['accessory_of']==-1 ? 'resource ' : 'accessory '); if($resource['acc_count']) { $resource['class'] .= 'hasAccessories '; + $accessories = $this->get_acc_list($resource['res_id']); + foreach($accessories as $acc_id => $acc_name) + { + $resource['accessories'][] = array('acc_id' => $acc_id, 'name' => $acc_name); + } + } elseif ($resource['accessory_of'] > 0) { + $resource['accessory_of_label'] = $this->link_title($resource['accessory_of']); } $rows[$num]['picture_thumb'] = $this->get_picture($resource); @@ -232,11 +240,16 @@ class resources_bo { return lang('You are not permitted to edit this resource!'); } + $old = array(); // we need an id to save pictures and make links... if(!$resource['res_id']) { $resource['res_id'] = $this->so->save($resource); } + else + { + $old = $this->read($resource['res_id']); + } switch ($resource['picture_src']) { @@ -279,11 +292,17 @@ class resources_bo $this->remove_picture($resource['res_id']); } + // Update link title + egw_link::notify_update('resources',$resource['res_id'], $resource); // save links if(is_array($resource['link_to']['to_id'])) { egw_link::link('resources',$resource['res_id'],$resource['link_to']['to_id']); } + if($resource['accessory_of'] != $old['accessory_of']) + { + egw_link::unlink(0,'resources',$resource['res_id'],'','resources',$old['accessory_of']); + } if($resource['accessory_of'] != -1) { egw_link::link('resources',$resource['res_id'],'resources',$resource['accessory_of']); diff --git a/resources/inc/class.resources_hooks.inc.php b/resources/inc/class.resources_hooks.inc.php index d09636c9e1..c2226543de 100644 --- a/resources/inc/class.resources_hooks.inc.php +++ b/resources/inc/class.resources_hooks.inc.php @@ -88,7 +88,7 @@ class resources_hooks 'title' => 'resources.resources_bo.link_title', 'titles' => 'resources.resources_bo.link_titles', 'view' => array( - 'menuaction' => 'resources.resources_ui.show' + 'menuaction' => 'resources.resources_ui.edit' ), 'view_id' => 'res_id', 'view_popup' => '850x600', @@ -126,7 +126,7 @@ class resources_hooks * Resources' ACL _requires_ a category. * Moves all resources to parent, if it exists. If it doesn't, another category is created. */ - function delete_category($args) + function delete_category($args) { $cat = categories::read($args['cat_id']); diff --git a/resources/inc/class.resources_ui.inc.php b/resources/inc/class.resources_ui.inc.php index 2d1eaa0d18..b4a60745e1 100755 --- a/resources/inc/class.resources_ui.inc.php +++ b/resources/inc/class.resources_ui.inc.php @@ -186,6 +186,8 @@ class resources_ui } $preserv = $content; + $options = array(); + $GLOBALS['egw']->session->appsession('session_data','resources_index_nm',$content['nm']); $this->tmpl->read('resources.show'); return $this->tmpl->exec('resources.resources_ui.index',$content,$sel_options,$no_button,$preserv); @@ -264,8 +266,20 @@ class resources_ui 'caption' => 'Delete', 'group' => ++$group, 'disableClass' => 'no_delete', - 'nm_action' => 'open_popup' + 'enableClass' => 'resource', + 'nm_action' => 'open_popup', + 'hideOnDisabled' => true ), + 'delete-acc' => array( + 'caption' => 'Delete', + 'icon' => 'delete', + 'group' => ++$group, + 'disableClass' => 'no_delete', + 'confirm' => 'Delete this accessory', + 'confirm_multiple' => 'Delete these accessories', + 'enableClass' => 'accessory', + 'hideOnDisabled' => true + ) ); return $actions; } @@ -376,10 +390,12 @@ class resources_ui { if (is_array($content)) { - if(isset($content['save']) || isset($content['delete'])) + list($button) = @each($content['button']); + unset($content['button']); + switch($button) { - if(isset($content['save'])) - { + case 'save': + case 'apply': unset($content['save']); // if($content['id'] != 0) // { @@ -387,17 +403,15 @@ class resources_ui // unset($resource['link_to']['to_id']); // } $content['msg'] = $this->bo->save($content); - } - if(isset($content['delete'])) - { + break; + case 'delete': unset($content['delete']); $content['msg'] = $this->bo->delete($content['res_id']); - } - - if($content['msg']) - { - return $this->edit($content); - } + break; + } + + if($button != 'apply' && !$content['msg']) + { $js = "opener.location.href='".$GLOBALS['egw']->link('/index.php', array('menuaction' => 'resources.resources_ui.index'))."';"; $js .= 'window.close();'; @@ -405,25 +419,24 @@ class resources_ui $GLOBALS['egw']->common->egw_exit(); } } - else - { - $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('res_id' => $res_id); - if ($res_id > 0) - { - $content = $this->bo->read($res_id); - $content['gen_src_list'] = strpos($content['picture_src'],'.') !== false ? $content['picture_src'] : false; - $content['picture_src'] = strpos($content['picture_src'],'.') !== false ? 'gen_src' : $content['picture_src']; - $content['link_to'] = array( - 'to_id' => $res_id, - 'to_app' => 'resources' - ); - } - if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']); + $res_id = is_numeric($content) ? (int)$content : $content['res_id']; + if (isset($_GET['res_id'])) $res_id = $_GET['res_id']; + if (isset($_GET['accessory_of'])) $accessory_of = $_GET['accessory_of']; + $content = array('res_id' => $res_id); + + if ($res_id > 0) + { + $content = $this->bo->read($res_id); + $content['gen_src_list'] = strpos($content['picture_src'],'.') !== false ? $content['picture_src'] : false; + $content['picture_src'] = strpos($content['picture_src'],'.') !== false ? 'gen_src' : $content['picture_src']; + $content['link_to'] = array( + 'to_id' => $res_id, + 'to_app' => 'resources' + ); } + if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']); + // some presetes $content['resource_picture'] = $this->bo->get_picture($content['res_id'],$content['picture_src'],$size=true); $content['quantity'] = $content['quantity'] ? $content['quantity'] : 1; @@ -433,15 +446,13 @@ class resources_ui $sel_options['gen_src_list'] = $this->bo->get_genpicturelist(); $sel_options['cat_id'] = $this->bo->acl->get_cats(EGW_ACL_ADD); $sel_options['cat_id'] = count($sel_options['cat_id']) == 1 ? $sel_options['cat_id'] : - $content['cat_id'] ? $sel_options['cat_id'] : array('' => lang('select one')) + $sel_options['cat_id']; + array('' => lang('select one')) + $sel_options['cat_id']; if($accessory_of > 0 || $content['accessory_of'] > 0) { $content['accessory_of'] = $content['accessory_of'] ? $content['accessory_of'] : $accessory_of; - $catofmaster = $this->bo->so->get_value('cat_id',$content['accessory_of']); - $sel_options['cat_id'] = array($catofmaster => $sel_options['cat_id'][$catofmaster]); } $search_options = array('accessory_of' => -1); - $sel_options['accessory_of'] = $this->bo->link_query('',$search_options); + $sel_options['accessory_of'] = array(-1 => lang('none')) + $this->bo->link_query('',$search_options); if($res_id) unset($sel_options['accessory_of'][$res_id]); // $content['general|page|pictures|links'] = 'resources.edit_tabs.page'; //debug diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index 6841201ad3..db1780fc76 100644 --- a/resources/setup/etemplates.inc.php +++ b/resources/setup/etemplates.inc.php @@ -2,7 +2,7 @@ /** * EGroupware - eTemplates for Application resources * http://www.egroupware.org - * generated by soetemplate::dump4setup() 2012-11-20 14:26 + * generated by soetemplate::dump4setup() 2012-11-26 13:27 * * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @package resources @@ -32,7 +32,7 @@ $templ_data[] = array('name' => 'resources.edit.page','template' => '','lang' => $templ_data[] = array('name' => 'resources.edit.pictures','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:4:",top";s:2:"h2";s:4:"100%";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"image";s:4:"name";s:16:"resource_picture";}i:2;a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";i:1;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:0:{}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;}s:5:"label";s:14:"picture source";}}}i:2;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1352913451',); -$templ_data[] = array('name' => 'resources.edit_buttons','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:1:"C";s:4:"100%";}i:1;a:3:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:21:"Saves entry and exits";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}s:1:"C";a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:6:"delete";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";}}}s:4:"rows";i:1;s:4:"cols";i:3;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1093597552',); +$templ_data[] = array('name' => 'resources.edit_buttons','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:7:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:1:"D";s:4:"100%";}i:1;a:4:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:21:"Saves entry and exits";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:5:"apply";}s:1:"C";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}s:1:"D";a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:6:"delete";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";}}}s:4:"rows";i:1;s:4:"cols";i:4;s:4:"size";s:4:"100%";s:4:"name";s:6:"button";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1093597552',); $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',); @@ -42,7 +42,7 @@ $templ_data[] = array('name' => 'resources.edit_tabs.accessories','template' => $templ_data[] = array('name' => 'resources.edit_tabs.custom','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:12:"customfields";}}i:2;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1131988154',); -$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:10:{i:0;a:2:{s:1:"C";s:2:"10";s:2:"h9";s:4:"100%";}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:12:"Accessory of";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"accessory_of";s:4:"size";s:4:"None";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:8;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Buyable";s:8:"disabled";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"buyable";s:4:"help";s:20:"Is resource buyable?";s:8:"disabled";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:5:"label";s:25:"Is this resource buyable?";s:8:"disabled";s:1:"1";}}i:9;a:4:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:9;s:4:"cols";i:4;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1093597682',); +$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:10:{i:0;a:2:{s:1:"C";s:2:"10";s:2:"h9";s:4:"100%";}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:12:"Accessory of";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"accessory_of";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:8;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Buyable";s:8:"disabled";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"buyable";s:4:"help";s:20:"Is resource buyable?";s:8:"disabled";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:5:"label";s:25:"Is this resource buyable?";s:8:"disabled";s:1:"1";}}i:9;a:4:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:9;s:4:"cols";i:4;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1093597682',); $templ_data[] = array('name' => 'resources.edit_tabs.links','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:7:{s:1:"A";s:3:"100";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";s:2:"h4";s:3:"164";s:2:"h5";s:4:"100%";}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";}}i:5;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:2;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1109248913',); @@ -60,7 +60,7 @@ $templ_data[] = array('name' => 'resources.resource_select.row','template' => '' $templ_data[] = array('name' => 'resources.resource_selectbox','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:1:{s:2:"c1";s:7:",bottom";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"select";s:4:"size";s:3:"14+";s:4:"name";s:9:"resources";s:7:"no_lang";s:1:"1";}s:1:"B";a:6:{s:4:"type";s:6:"button";s:7:"onclick";s:160:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.select\'),\'\',\'dependent=yes,width=600,height=450,scrollbars=yes,status=yes\'); return false;";s:5:"label";s:13:"Add resources";s:4:"size";s:6:"navbar";s:6:"needed";s:1:"1";s:4:"name";s:5:"popup";}}}s:4:"rows";i:1;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1118520536',); -$templ_data[] = array('name' => 'resources.show','template' => '','lang' => '','group' => '0','version' => '1.9.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:4:{s:1:"A";s:4:"100%";s:2:"h1";s:6:",!@msg";s:2:"h4";s:34:",!@nm[selectcols]=/legacy_actions/";s:2:"h2";s:2:",1";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:"all,message";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:8:"nm_right";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:19:"resources.show.rows";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"nm";}}i:4;a:1:{s:1:"A";a:6:{s:5:"align";s:5:"right";s:4:"span";s:3:"all";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:5:{s:5:"label";s:13:"Select action";s:7:"onclick";s:184:"if (!egw_globalObjectManager.getObjectById(\'resources.show.rows\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";s:4:"name";s:14:"legacy_actions";s:4:"type";s:10:"buttononly";s:4:"help";s:13:"Select action";}i:2;a:8:{s:5:"label";s:9:"Check all";s:6:"needed";s:1:"1";s:7:"onclick";s:95:"egw_globalObjectManager.getObjectById(\'resources.show.rows\').toggleAllSelected(); return false;";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:4:"help";s:9:"Check all";s:4:"span";s:14:",checkAllArrow";}}}i:5;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:7:"onclick";s:206:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";s:4:"name";s:3:"add";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:13:"Add accessory";s:4:"name";s:7:"add_sub";s:7:"onclick";s:235:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit&content=0&accessory_of=$cont[view_accs_of]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}i:3;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Back";s:4:"name";s:4:"back";}}}i:6;a:1:{s:1:"A";a:6:{s:5:"class";s:12:"action_popup";s:4:"name";s:12:"delete_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:5:"class";s:6:"prompt";s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Delete accessories?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:12:"Yes - Delete";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:6:"delete";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:24:"No - Make them resources";s:7:"onclick";s:75:"nm_popup_action.id = \'delete_promote\'; nm_submit_popup(this); return false;";s:4:"name";s:14:"delete_promote";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:11:"No - Cancel";s:7:"onclick";s:35:"nm_hide_popup(this,\'delete_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}}s:4:"rows";i:6;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.image16 img { +$templ_data[] = array('name' => 'resources.show','template' => '','lang' => '','group' => '0','version' => '1.9.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:4:{s:1:"A";s:4:"100%";s:2:"h1";s:6:",!@msg";s:2:"h4";s:34:",!@nm[selectcols]=/legacy_actions/";s:2:"h2";s:2:",1";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:"all,message";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:8:"nm_right";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:19:"resources.show.rows";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"nm";}}i:4;a:1:{s:1:"A";a:6:{s:5:"align";s:5:"right";s:4:"span";s:3:"all";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:5:{s:5:"label";s:13:"Select action";s:7:"onclick";s:184:"if (!egw_globalObjectManager.getObjectById(\'resources.show.rows\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";s:4:"name";s:14:"legacy_actions";s:4:"type";s:10:"buttononly";s:4:"help";s:13:"Select action";}i:2;a:8:{s:5:"label";s:9:"Check all";s:6:"needed";s:1:"1";s:7:"onclick";s:95:"egw_globalObjectManager.getObjectById(\'resources.show.rows\').toggleAllSelected(); return false;";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:4:"help";s:9:"Check all";s:4:"span";s:14:",checkAllArrow";}}}i:5;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"1";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:7:"onclick";s:206:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";s:4:"name";s:3:"add";}}}i:6;a:1:{s:1:"A";a:6:{s:5:"class";s:12:"action_popup";s:4:"name";s:12:"delete_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:5:"class";s:6:"prompt";s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Delete accessories?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:12:"Yes - Delete";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:6:"delete";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:24:"No - Make them resources";s:7:"onclick";s:75:"nm_popup_action.id = \'delete_promote\'; nm_submit_popup(this); return false;";s:4:"name";s:14:"delete_promote";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:11:"No - Cancel";s:7:"onclick";s:35:"nm_hide_popup(this,\'delete_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}}s:4:"rows";i:6;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.image16 img { max-width: 16px; max-height: 16px; } @@ -81,7 +81,7 @@ $templ_data[] = array('name' => 'resources.show.actions_header','template' => '' $templ_data[] = array('name' => 'resources.show.nm_right','template' => '','lang' => '','group' => '0','version' => '1.9.002','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:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:3:"Add";s:7:"onclick";s:206:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";s:4:"name";s:3:"add";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1331036827',); -$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:6:{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:24:"nmr $row_cont[class],top";s:1:"G";s:2:"5%";}i:1;a:7:{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:19:"Storage information";}}s:1:"F";a:2:{s:4:"type";s:22:"nextmatch-customfields";s:4:"name";s:12:"customfields";}s:1:"G";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"name";s:14:"legacy_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:76:"toggle_all(this.form,form::name(\'nm[rows][checkbox][]\'),true); return false;";}}}i:2;a:7:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";s:4:"size";s:24:"$row_cont[picture_thumb]";s:7:"onclick";s:216:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.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;";}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:2:{s:4:"type";s:17:"customfields-list";s:4:"name";s:4:"$row";}s:1:"G";a:7:{s:4:"type";s:4:"grid";s:5:"align";s:5:"right";s:4:"data";a:3:{i:0;a:0:{}i:1;a:4:{s:1:"A";a:8:{s:4:"type";s:6:"button";s:4:"size";s:17:"navbar,trams16x16";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"help";s:18:"Book this resource";s:7:"onclick";s:223:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiforms.edit&participants=r$cont[res_id]\'),\'\',\'dependent=yes,width=750,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:23:"bookable[$cont[res_id]]";s:4:"span";s:8:",image16";}s:1:"B";a:7:{s:4:"type";s:6:"button";s:4:"size";s:15:"edit,trans16x16";s:5:"label";s:4:"Edit";s:5:"align";s:6:"center";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:213:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit&res_id=$cont[res_id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:19:"edit[$cont[res_id]]";}s:1:"C";a:7:{s:4:"type";s:6:"button";s:4:"size";s:14:"new,trans16x16";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"new_acc[$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.resources_ui.edit&res_id=0&accessory_of=$cont[res_id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:7:{s:4:"type";s:6:"button";s:4:"size";s:27:"calendar/planner,trans16x16";s:5:"label";s:25:"Show calendar of resource";s:5:"align";s:6:"center";s:4:"help";s:25:"Show calendar of resource";s:4:"name";s:23:"calendar[$cont[res_id]]";s:7:"onclick";s:129:"location=egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiviews.planner&sortby=user&owner=0,r$cont[res_id]\'); return false;";}s:1:"B";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[$cont[res_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";s:4:"size";s:17:"delete,trans16x16";}s:1:"C";a:6:{s:4:"type";s:6:"button";s:4:"size";s:19:"view_acc,trans16x16";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"view_acc[$cont[res_id]]";s:4:"help";s:34:"View accessories for this resource";}s:1:"D";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:"$cont[res_id]";}}}s:4:"rows";i:2;s:4:"cols";i:4;s:4:"name";s:6:"${row}";s:7:"options";a:0:{}}}}s:4:"rows";i:2;s:4:"cols";i:7;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1352911617',); +$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:6:{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:24:"nmr $row_cont[class],top";s:1:"H";s:2:"5%";}i:1;a:8:{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:19:"Storage information";}}s:1:"F";a:2:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:22:"Resource / Accessories";}s:1:"G";a:2:{s:4:"type";s:22:"nextmatch-customfields";s:4:"name";s:12:"customfields";}s:1:"H";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"name";s:14:"legacy_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:76:"toggle_all(this.form,form::name(\'nm[rows][checkbox][]\'),true); return false;";}}}i:2;a:8:{s:1:"A";a:5:{s:4:"type";s:6:"button";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";s:4:"size";s:24:"$row_cont[picture_thumb]";s:7:"onclick";s:216:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.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;";}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:5:{s:4:"type";s:4:"vbox";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:26:"${row}[accessory_of_label]";s:4:"size";s:70:",resources.resources_ui.edit&res_id=$row_cont[accessory_of],,,,850x600";}i:2;a:7:{s:4:"type";s:4:"grid";s:4:"name";s:19:"${row}[accessories]";s:4:"size";s:4:"100%";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"size";s:64:",resources.resources_ui.edit&res_id=$row_cont[acc_id],,,,850x600";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:7:"options";a:1:{i:0;s:4:"100%";}}}s:1:"G";a:2:{s:4:"type";s:17:"customfields-list";s:4:"name";s:4:"$row";}s:1:"H";a:7:{s:4:"type";s:4:"grid";s:5:"align";s:5:"right";s:4:"data";a:3:{i:0;a:0:{}i:1;a:4:{s:1:"A";a:8:{s:4:"type";s:6:"button";s:4:"size";s:17:"navbar,trams16x16";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"help";s:18:"Book this resource";s:7:"onclick";s:223:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiforms.edit&participants=r$cont[res_id]\'),\'\',\'dependent=yes,width=750,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:23:"bookable[$cont[res_id]]";s:4:"span";s:8:",image16";}s:1:"B";a:7:{s:4:"type";s:6:"button";s:4:"size";s:15:"edit,trans16x16";s:5:"label";s:4:"Edit";s:5:"align";s:6:"center";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:213:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit&res_id=$cont[res_id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:19:"edit[$cont[res_id]]";}s:1:"C";a:7:{s:4:"type";s:6:"button";s:4:"size";s:14:"new,trans16x16";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"new_acc[$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.resources_ui.edit&res_id=0&accessory_of=$cont[res_id]\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:7:{s:4:"type";s:6:"button";s:4:"size";s:27:"calendar/planner,trans16x16";s:5:"label";s:25:"Show calendar of resource";s:5:"align";s:6:"center";s:4:"help";s:25:"Show calendar of resource";s:4:"name";s:23:"calendar[$cont[res_id]]";s:7:"onclick";s:129:"location=egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiviews.planner&sortby=user&owner=0,r$cont[res_id]\'); return false;";}s:1:"B";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[$cont[res_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";s:4:"size";s:17:"delete,trans16x16";}s:1:"C";a:6:{s:4:"type";s:6:"button";s:4:"size";s:19:"view_acc,trans16x16";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"view_acc[$cont[res_id]]";s:4:"help";s:34:"View accessories for this resource";}s:1:"D";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:"$cont[res_id]";}}}s:4:"rows";i:2;s:4:"cols";i:4;s:4:"name";s:6:"${row}";s:7:"options";a:0:{}}}}s:4:"rows";i:2;s:4:"cols";i:8;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1352911617',); $templ_data[] = array('name' => 'resources.showdetails','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:8:{s:2:"c1";s:3:"nmh";s:1:"B";s:4:"100%";s:2:"c5";s:2:"th";s:2:"h3";s:2:"1%";s:2:"c6";s:11:"row_off,top";s:1:"A";s:3:"43%";s:2:"h1";s:5:"240px";s:2:"h5";s:10:",@!link_to";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:4:"name";s:16:"resource_picture";s:5:"align";s:6:"center";}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:6:{s:4:"type";s:5:"label";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:5:"label";s:13:"Related links";}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:8:{s:4:"type";s:4:"hbox";s:5:"label";s:6:"Cancel";s:4:"span";s:1:"2";s:4:"size";s:1:"2";i:1;a:9:{s:4:"type";s:4:"hbox";s:5:"label";s:4:"Edit";s:4:"span";s:1:"2";s:4:"name";s:8:"btn_edit";s:4:"size";s:1:"4";i:1;a:5:{s:4:"type";s:6:"button";s:5:"label";s:4:"Edit";s:4:"span";s:1:"2";s:4:"name";s:8:"btn_edit";s:4:"help";s:16:"Buy this article";}i:2;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:7:"onclick";s:14:"window.close()";}i:3;a:6:{s:4:"type";s:6:"button";s:5:"label";s:8:"Calendar";s:4:"span";s:1:"2";s:4:"name";s:12:"btn_calendar";s:4:"help";s:25:"Show calendar of resource";s:7:"onclick";s:120:"opener.location=egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiviews.month&owner=r$cont[res_id]\'); return false;";}i:4;a:5:{s:4:"type";s:6:"button";s:5:"label";s:4:"Book";s:7:"onclick";s:209:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiforms.edit&participants=r$cont[res_id]\'),\'\',\'dependent=yes,width=750,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\');";s:4:"name";s:8:"btn_book";s:4:"help";s:18:"Book this resource";}}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"1";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"name";s:10:"btn_delete";}}i:3;a:1:{s:4:"type";s:5:"label";}i:4;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:10:"btn_delete";s:5:"align";s:5:"right";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;s:4:"size";s:7:"750,480";s:7:"options";a:2:{i:0;s:3:"750";i:1;s:3:"480";}}}','size' => '750,480','style' => '','modified' => '1129667646',); diff --git a/resources/templates/default/show.xet b/resources/templates/default/show.xet index 74bab73a52..970a139e69 100644 --- a/resources/templates/default/show.xet +++ b/resources/templates/default/show.xet @@ -22,6 +22,7 @@ + @@ -43,6 +44,7 @@ + @@ -73,6 +75,19 @@ + + + + + + + + + + + + + @@ -124,8 +139,6 @@