From e9d33a174d4085a37d246e29c9a36e5ec4027c4a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 8 Jun 2011 02:27:42 +0000 Subject: [PATCH] - Add more complicated actions - Some other UI changes --- resources/inc/class.resources_bo.inc.php | 8 +++- resources/inc/class.resources_ui.inc.php | 49 +++++++++++++++++++----- resources/js/resources.js | 14 +++++++ resources/setup/etemplates.inc.php | 11 ++++-- 4 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 resources/js/resources.js diff --git a/resources/inc/class.resources_bo.inc.php b/resources/inc/class.resources_bo.inc.php index 92af84b370..583dccfc1e 100755 --- a/resources/inc/class.resources_bo.inc.php +++ b/resources/inc/class.resources_bo.inc.php @@ -117,7 +117,7 @@ class resources_bo return $nr; } - foreach((array)$rows as $num => $resource) + foreach($rows as $num => &$resource) { if (!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_EDIT)) { @@ -126,23 +126,29 @@ class resources_bo if (!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_DELETE)) { $readonlys["delete[$resource[res_id]]"] = true; + $resource['class'] .= 'no_delete '; } if ((!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_ADD)) || $accessory_of != -1) { $readonlys["new_acc[$resource[res_id]]"] = true; + $resource['class'] .= 'no_new_accessory '; } if (!$resource['bookable']) { $readonlys["bookable[$resource[res_id]]"] = true; $readonlys["calendar[$resource[res_id]]"] = true; + $resource['class'] .= 'no_book '; + $resource['class'] .= 'no_view_calendar '; } if(!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_CALREAD)) { $readonlys["calendar[$resource[res_id]]"] = true; + $resource['class'] .= 'no_view_calendar '; } if (!$resource['buyable']) { $readonlys["buyable[$resource[res_id]]"] = true; + $resource['class'] .= 'no_buy '; } $readonlys["view_acc[$resource[res_id]]"] = true; $links = egw_link::get_links('resources',$resource['res_id']); diff --git a/resources/inc/class.resources_ui.inc.php b/resources/inc/class.resources_ui.inc.php index 5388c1e645..1a9e3c9c07 100755 --- a/resources/inc/class.resources_ui.inc.php +++ b/resources/inc/class.resources_ui.inc.php @@ -115,6 +115,7 @@ class resources_ui $content['msg'] = $msg; $content['nm']['header_left'] = 'resources.resource_select.header'; + $content['nm']['header_right'] = 'resources.show.nm_right'; $content['nm']['get_rows'] = 'resources.resources_bo.get_rows'; $content['nm']['no_filter'] = False; $content['nm']['filter_label'] = lang('Category'); @@ -174,6 +175,8 @@ class resources_ui } "; + egw_framework::validate_file('.','resources','resources'); + if($content['nm']['view_accs_of']) { $master = $this->bo->so->read(array('res_id' => $content['nm']['view_accs_of'])); @@ -188,6 +191,7 @@ class resources_ui ($master['short_description'] ? ' [' . $master['short_description'] . ']' : ''); } $preserv = $content; + $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); @@ -201,28 +205,55 @@ class resources_ui protected function get_actions() { $actions = array( - 'view' => array( - 'caption' => 'View', - 'allowOnMultiple' => false, - 'url' => 'menuaction=resources.resources_ui.show&res_id=$id', - 'popup' => egw_link::get_registry('resources', 'view_popup'), - 'group' => $group=1, - ), 'edit' => array( 'default' => true, - 'caption' => 'Edit', + 'caption' => 'open', 'allowOnMultiple' => false, 'url' => 'menuaction=resources.resources_ui.edit&res_id=$id', 'popup' => egw_link::get_registry('resources', 'add_popup'), 'group' => $group, 'disableClass' => 'rowNoEdit', ), + 'view' => array( + 'caption' => 'View', + 'allowOnMultiple' => false, + 'url' => 'menuaction=resources.resources_ui.show&res_id=$id', + 'popup' => egw_link::get_registry('resources', 'view_popup'), + 'group' => $group, + ), 'add' => array( 'caption' => 'Add', 'url' => 'menuaction=resources.resources_ui.edit', 'popup' => egw_link::get_registry('resources', 'add_popup'), 'group' => $group, ), + 'view_calendar' => array( + 'caption' => 'View calendar', + 'icon' => 'calendar/planner', + 'group' => ++$group, + 'allowOnMultiple' => true, + 'onExecute' => 'javaScript:view_calendar', + 'url' => 'menuaction=calendar.calendar_uiviews.planner&sortby=user&owner=0', + 'nm_action' => 'location', + 'disableClass' => 'no_view_calendar', + ), + 'book' => array( + 'caption' => 'Book resource', + 'icon' => 'navbar', + 'group' => $group, + 'allowOnMultiple' => true, + 'onExecute' => 'javaScript:view_calendar', + 'url' => 'menuaction=calendar.calendar_uiforms.edit&participants=', + 'popup' => egw_link::get_registry('calendar', 'add_popup'), + 'disableClass' => 'no_book', + ), + 'new_accessory' => array( + 'caption' => 'New accessory', + 'group' => $group, + 'url' => 'menuaction=resources.resources_ui.edit&res_id=0&accessory_of=$id', + 'popup' => egw_link::get_registry('resources', 'add_popup'), + 'disableClass' => 'no_new_accessory', + ), 'select_all' => array( 'caption' => 'Whole query', 'checkbox' => true, @@ -241,7 +272,7 @@ class resources_ui 'confirm' => 'Delete this entry', 'confirm_multiple' => 'Delete these entries', 'group' => ++$group, - 'disableClass' => 'rowNoDelete', + 'disableClass' => 'no_delete', ), ); return $actions; diff --git a/resources/js/resources.js b/resources/js/resources.js new file mode 100644 index 0000000000..2b73818bee --- /dev/null +++ b/resources/js/resources.js @@ -0,0 +1,14 @@ +/** + * Javascript for resources app + */ + +/** + * Calendar needs to have resource IDs prefixed with 'r' so it can tell them apart + * from calendar entries. + */ +function view_calendar(action, senders) { + for(var i = 0; i < senders.length; i++) { + action.data.url += ',r'+senders[i].id; + } + nm_action(action, senders); +} diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index 6bf1aac1a4..96b0428583 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() 2011-06-06 11:45 + * generated by soetemplate::dump4setup() 2011-06-07 20:26 * * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @package resources @@ -48,13 +48,18 @@ $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.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:1:"A";s:4:"100%";s:2:"h1";s:6:",!@msg";s:2:"h3";s:34:",!@nm[selectcols]=/legacy_actions/";}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: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:3;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:4:{s:1:"D";s:2:"1%";s:1:"E";s:4:"47px";s:1:"C";s:2:"1%";s:1:"B";s:2:"1%";}i:1;a:5:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:8:{s:4:"type";s:6:"button";s:4:"size";s:19:"bookable,trans16x16";s:5:"label";s:23:"book selected resources";s:4:"help";s:23:"book selected resources";s:5:"align";s:5:"right";s:7:"onclick";s:321:"var resources = js_btn_book_selected(this.form); if(resources == false) { return false; } else { window.open(egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiforms.edit\')+\'&participants=\'+resources,\'\',\'dependent=yes,width=750,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; }";s:6:"needed";s:1:"1";s:4:"name";s:17:"btn_book_selected";}s:1:"C";a:8:{s:4:"type";s:6:"button";s:5:"label";s:25:"Show calendar of resource";s:4:"size";s:19:"calendar,trans16x16";s:4:"name";s:16:"btn_cal_selected";s:4:"help";s:25:"Show calendar of resource";s:5:"align";s:5:"right";s:7:"onclick";s:227:"var resources = js_btn_book_selected(this.form); if(resources == false) { return false; } else { location=egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiviews.planner\')+\'&sortby=user&owner=0,\'+resources; return false; }";s:6:"needed";s:1:"1";}s:1:"D";a:8:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:25:"delete selected resources";s:4:"name";s:19:"btn_delete_selected";s:4:"help";s:25:"delete selected resources";s:5:"align";s:5:"right";s:7:"onclick";s:170:"var resources = js_btn_book_selected(this.form); if(resources == false) { return false; } else { return confirm(\'Do you really want do delete the selected resources?\'); }";s:6:"needed";s:1:"1";}s:1:"E";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:1:{s:4:"type";s:5:"label";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:19:"select/deselect all";s:4:"help";s:19:"select/deselect all";s:7:"onclick";s:76:"toggle_all(this.form,form::name(\'nm[rows][checkbox][]\'),true); return false;";s:6:"needed";s:1:"1";}i:3;a:1:{s:4:"type";s:5:"label";}}}}s:4:"rows";i:1;s:4:"cols";i:5;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}i:4;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";}}}}s:4:"rows";i:4;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1307382059',); +$templ_data[] = array('name' => 'resources.show','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:5:{i:0;a:3:{s:1:"A";s:4:"100%";s:2:"h1";s:6:",!@msg";s:2:"h3";s:34:",!@nm[selectcols]=/legacy_actions/";}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: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:3;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:4;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";}}}}s:4:"rows";i:4;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; +}','modified' => '1307382059',); $templ_data[] = array('name' => 'resources.show.actions','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:1:"F";s:2:"3%";s:2:"c1";s:3:"nmh";s:2:"c2";s:3:"nmr";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}s:1:"B";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:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Useable";s:4:"name";s:7:"useable";}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Location";s:4:"name";s:8:"location";}s:1:"F";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:29:"resources.show.actions_header";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}s:1:"B";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:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[usable]";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[category]";}s:1:"E";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}s:1:"F";a:3:{s:4:"type";s:6:"button";s:5:"align";s:5:"right";s:4:"name";s:20:"lukas[$row_cont[id]]";}}}s:4:"rows";i:2;s:4:"cols";i:6;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1098891355',); $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' => '1.9.001','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:7:"nmr,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:7:{s:4:"type";s:6:"button";s:4:"size";s:19:"bookable,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: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:7:{s:4:"type";s:6:"button";s:4:"size";s:15:"view,trans16x16";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.resources_ui.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:7:{s:4:"type";s:6:"button";s:4:"size";s:19:"calendar,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:61:"return confirm(\'Do you really want do delte this resource?\');";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' => '1300835999',); +$templ_data[] = array('name' => 'resources.show.nm_right','template' => '','lang' => '','group' => '0','version' => '1.9.001','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: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";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1307488434',); + +$templ_data[] = array('name' => 'resources.show.rows','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: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:7:{s:4:"type";s:6:"button";s:4:"size";s:15:"view,trans16x16";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.resources_ui.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: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:61:"return confirm(\'Do you really want do delte this resource?\');";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' => '1300835999',); $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',);