From afa3e63895f1a63c0edbafe58540a6a5f1f49aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Sun, 9 Oct 2005 10:13:10 +0000 Subject: [PATCH] fixed buttons in list and details view --- resources/TODO | 2 +- resources/inc/class.ui_resources.inc.php | 64 ++++++++++++++++-------- resources/setup/etemplates.inc.php | 6 +-- 3 files changed, 46 insertions(+), 26 deletions(-) diff --git a/resources/TODO b/resources/TODO index ffd599fb80..4642273fd7 100644 --- a/resources/TODO +++ b/resources/TODO @@ -1,5 +1,4 @@ TODO: -- advanced search dialog, accessable via sideboxmenu - some artwork : general resource pictures like (room, car, beamer ...) (Benkom) - sitemgr module @@ -24,5 +23,6 @@ TODO: Long Term todo's: --------------------------- +advanced search dialog, accessable via sideboxmenu add prize functionality add location functionality diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index 595398b6bc..7773862a75 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -52,10 +52,11 @@ class ui_resources */ function index($content='') { -// _debug_array($content); if (is_array($content)) { $sessiondata = $content['nm']; + unset($sessiondata['rows']); + $GLOBALS['egw']->session->appsession('session_data','resources_index_nm',$sessiondata); if (isset($content['back'])) { @@ -64,31 +65,29 @@ class ui_resources return $this->index(); } if (isset($content['btn_delete_selected'])) - { - foreach($content['nm']['rows']['checkbox'] as $res_id) + { + foreach($content['nm']['rows'] as $row) { - $msg .= '

'. $this->bo->delete($res_id). '


'; + if($res_id = $row['checkbox'][0]) + { + $msg .= '

'. $this->bo->delete($res_id). '


'; + } } return $this->index($msg); } - if (isset($content['nm']['rows'])) + foreach($content['nm']['rows'] as $row) { - unset($sessiondata['rows']); - $GLOBALS['egw']->session->appsession('session_data','resources_index_nm',$sessiondata); - - unset($content['nm']['rows']['checkbox']); - switch (key($content['nm']['rows'])) + if(isset($row['delete'])) { - case 'delete': - list($id) = each($content['nm']['rows']['delete']); - return $this->index($this->bo->delete($id)); - case 'view_acc': - list($id) = each($content['nm']['rows']['view_acc']); - $sessiondata['view_accs_of'] = $id; - $GLOBALS['egw']->session->appsession('session_data','resources_index_nm',$sessiondata); - return $this->index(); - case 'buyable': + $res_id = array_search('pressed',$row['delete']); + return $this->index($this->bo->delete($res_id)); + } + if(isset($row['view_acc'])) + { + $sessiondata['view_accs_of'] = array_search('pressed',$row['view_acc']); + $GLOBALS['egw']->session->appsession('session_data','resources_index_nm',$sessiondata); + return $this->index(); } } } @@ -175,7 +174,7 @@ class ui_resources * @param $content Content from the eTemplate Exec call or id on inital call */ function edit($content=0,$accessory_of = -1) - { + { if (is_array($content)) { if(isset($content['save']) || isset($content['delete'])) @@ -243,7 +242,7 @@ class ui_resources $sel_options['cat_id'] = array($catofmaster => $sel_options['cat_id'][$catofmaster]); } - $content['general|page|pictures|links'] = 'resources.edit_tabs.page'; //debug +// $content['general|page|pictures|links'] = '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'); @@ -283,6 +282,27 @@ class ui_resources */ function show($res_id=0) { + if (is_array($content = $res_id)) + { + if(isset($content['btn_delete'])) + { + $content['msg'] = $this->bo->delete($content['res_id']); + if($content['msg']) + { + return $this->show($content); + } + $js = "opener.location.href='".$GLOBALS['egw']->link('/index.php', + array('menuaction' => 'resources.ui_resources.index'))."';"; + $js .= 'window.close();'; + echo "\n"; + $GLOBALS['egw']->common->egw_exit(); + } + if(isset($content['btn_edit'])) + { + return $this->edit($content['res_id']); + } + + } if (isset($_GET['res_id'])) $res_id = $_GET['res_id']; $content = array('res_id' => $res_id); @@ -329,7 +349,7 @@ class ui_resources $this->tmpl->exec('resources.ui_resources.show',$content,$sel_options,$no_button,$preserv,2); } - + /** * select resources * diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index cf2656ba77..1953a6195c 100644 --- a/resources/setup/etemplates.inc.php +++ b/resources/setup/etemplates.inc.php @@ -1,5 +1,5 @@ '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:4:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";s:4:"size";s:27:"resources.ui_resources.show";}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:"grid";s:5:"align";s:5:"right";s:4:"data";a:2:{i:0;a:0:{}i:1;a:4:{s:1:"A";a:9:{s:4:"type";s:4:"vbox";s:4:"span";s:10:",buttonbox";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";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:"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;";s:6:"needed";s:1:"1";}}i:2;a:1:{s:1:"A";a:5:{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:"help";s:17:"Buy this resource";}}}s:4:"rows";i:2;s:4:"cols";i:1;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:"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;";s:6:"needed";s:1:"1";}i:2;a:5:{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:"help";s:17:"Buy this resource";}s:7:"options";a:1:{i:0;s:1:"2";}}s:1:"B";a:11:{s:4:"type";s:4:"vbox";s:6:"needed";s:1:"1";s:5:"align";s:5:"right";s:4:"span";s:10:",buttonbox";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:6:{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:"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:1:{s:1:"A";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:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:1:"2";i:1;a:6:{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:"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:7:"options";a:1:{i:0;s:1:"2";}}s:1:"C";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:232:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.edit&res_id=0&accessory_of=$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: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";}s:1:"D";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:4:"rows";i:1;s:4:"cols";i:4;}}}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:4:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";s:4:"size";s:27:"resources.ui_resources.show";}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:"grid";s:5:"align";s:5:"right";s:4:"data";a:3:{i:0;a:0:{}i:1;a:4:{s:1:"A";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:"help";s:18:"Book this resource";s:7:"onclick";s:214:"window.open(egw::link(\'/index.php\',\'menuaction=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:1:"B";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:"help";s:15:"Edit this entry";s:7:"onclick";s:213:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.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: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[$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=$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: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[$cont[res_id]]";s:4:"help";s:15:"View this entry";s:7:"onclick";s:213:"window.open(egw::link(\'/index.php\',\'menuaction=resources.ui_resources.show&res_id=$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:1:"A";a:5:{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:"help";s:17:"Buy this resource";}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:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"size";s:10:"delete.gif";}s:1:"C";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[$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: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:2:"c5";s:2:"th";s:2:"h3";s:2:"1%";s:2:"c6";s:11:"row_off,top";s:1:"A";s:3:"100";}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: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:3:"Buy";s:4:"span";s:1:"2";s:4:"name";s:7:"btn_buy";s:4:"help";s:16:"Buy this article";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Book";s:4:"name";s:8:"btn_book";s:4:"help";s:18:"Book this resource";}i:3;a:4:{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";}i:4;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:7:"onclick";s:14:"window.close()";}}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:14:"window.close()";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;}}','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:2:"c5";s:2:"th";s:2:"h3";s:2:"1%";s:2:"c6";s:11:"row_off,top";s:1:"A";s:3:"100";}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: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:3:"Buy";s:4:"span";s:1:"2";s:4:"name";s:7:"btn_buy";s:4:"help";s:16:"Buy this article";}i:2;a:5:{s:4:"type";s:6:"button";s:5:"label";s:4:"Book";s:4:"name";s:8:"btn_book";s:4:"help";s:18:"Book this resource";s:7:"onclick";s:200:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.edit&participants=r$cont[res_id]\'),\'\',\'dependent=yes,width=750,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\');";}i:3;a:4:{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";}i:4;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:7:"onclick";s:14:"window.close()";}}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;}}','size' => '','style' => '','modified' => '1118568477',);