diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index 6ea8381a8b..9004d34565 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -42,6 +42,7 @@ class bo_resources 'short_description' => $query['search'] ); $cats = $query['filter'] ? array($query['filter'] => '') : $this->acl->get_cats(PHPGW_ACL_READ); + $accessory_of = $query['view_accs_of'] ? $query['view_accs_of'] : -1; $rows = array( 0 => array( 'id' => '', 'name' => '', @@ -56,7 +57,8 @@ class bo_resources $order_by = $query['order'] ? $query['order'].' '. $query['sort'] : ''; - $nr = $this->so->search($criteria,$cats,&$rows,$accessory_of=-1,$order_by,$offset=$query['start'],$num_rows=0); + $nr = $this->so->search($criteria,$cats,&$rows,$accessory_of,$order_by,$offset=$query['start'],$num_rows=0); + foreach($rows as $num => $resource) { if (!$this->acl->is_permitted($resource['cat_id'],PHPGW_ACL_EDIT)) @@ -67,6 +69,10 @@ class bo_resources { $readonlys["delete[$resource[id]]"] = true; } + if ((!$this->acl->is_permitted($resource['cat_id'],PHPGW_ACL_ADD)) || $accessory_of != -1) + { + $readonlys["new_acc[$resource[id]]"] = true; + } if (!$resource['bookable'] /* && calender-acl viewable */) { $readonlys["bookable[$resource[id]]"] = true; @@ -181,6 +187,10 @@ class bo_resources { $this->link->link('resources',$resource['id'],$resource['link_to']['to_id']); } + if($resource['accessory_of'] != -1) + { echo $resource['id'].', '.$resource['accessory_of']; + $this->link->link('resources',$resource['id'],'resources',$resource['accessory_of']); + } return $this->so->save($resource) ? false : lang('Something went wrong by saving resource'); } @@ -365,7 +375,7 @@ class bo_resources @param bool $size false = thumb, true = full pic @return string url of picture */ - function get_picture($id,$size=false) + function get_picture($id=0,$size=false) { if ($id > 0) { diff --git a/resources/inc/class.so_resources.inc.php b/resources/inc/class.so_resources.inc.php index 67609dfc02..693fafb2b1 100755 --- a/resources/inc/class.so_resources.inc.php +++ b/resources/inc/class.so_resources.inc.php @@ -69,6 +69,7 @@ class so_resources { $data[$n] = $this->db->row(); } + unset($data[0]); return $nr; } diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index 0d2475e11b..1080d1d207 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -51,22 +51,38 @@ class ui_resources { if (isset($content['nm']['rows'])) { - if (isset($content['nm']['rows']['edit'])) - { - list($id) = each($content['nm']['rows']['edit']); - return $this->edit($id); - } - elseif (isset($content['nm']['rows']['delete'])) + unset($content['nm']['rows']['checkbox']); + switch (key($content['nm']['rows'])) { - list($id) = each($content['nm']['rows']['delete']); - return $this->delete($id); + case 'edit': + list($id) = each($content['nm']['rows']['edit']); + return $this->edit($id); + case 'delete': + list($id) = each($content['nm']['rows']['delete']); + return $this->delete($id); + case 'new_acc': + list($id) = each($content['nm']['rows']['new_acc']); + return $this->edit(array('resource_id' => 0, 'accessory_of' => $id)); + case 'view_acc': + list($id) = each($content['nm']['rows']['view_acc']); + $content['view_accs_of'] = $id; + break; + case 'view': + case 'bookable': + case 'buyable': } } if (isset($content['add'])) { return $this->edit(0); } + if (isset($content['back'])) + { + return $this->index(); + } + } + $this->tmpl->read('resources.show'); $content['nm']['get_rows'] = 'resources.bo_resources.get_rows'; $content['nm']['no_filter'] = False; @@ -82,8 +98,17 @@ class ui_resources { $no_button['add'] = true; } + $no_button['back'] = true; - $this->tmpl->read('resources.show'); + if($content['view_accs_of']) + { + $content['nm']['get_rows'] = 'resources.bo_resources.get_rows'; + $content['nm']['no_filter'] = true; + $content['nm']['no_filter2'] = true; + $content['nm']['view_accs_of'] = $content['view_accs_of']; + $no_button['add'] = true; + $no_button['back'] = false; + } $this->tmpl->exec('resources.ui_resources.index',$content,$sel_options,$no_button,$preserv); } @@ -126,9 +151,6 @@ class ui_resources { $resource_id = $content; $content = array('resource_id' => $resource_id); - // some presetes - $content['quantity'] = $content['useable'] = 1; - $content['accessory_of'] = -1; if ($resource_id > 0) { @@ -139,13 +161,23 @@ class ui_resources 'to_id' => $resource_id, 'to_app' => 'resources' ); -// $sel_options += array('acc_list' => $this->bo->get_acc_list($resource_id)); } - $content['resource_picture'] = $this->bo->get_picture($resource_id,$content['picture_src'],$size=true); } - $sel_options['cat_id'] = $this->bo->acl->get_cats(PHPGW_ACL_ADD); + // some presetes + $content['resource_picture'] = $this->bo->get_picture($content['resource_id'],$content['picture_src'],$size=true); + $content['accessory_of'] = $content['accessory_of'] ? $content['accessory_of'] : -1; + $content['quantity'] = $content['quantity'] ? $content['quantity'] : 1; + $content['useable'] = $content['useable'] ? $content['useable'] : 1; + + $sel_options['cat_id'] = $this->bo->acl->get_cats(PHPGW_ACL_ADD); $sel_options['cat_id'] = count($sel_options['cat_id']) == 1 ? $sel_options['cat_id'] : array('' => lang('select one')) + $sel_options['cat_id']; + if($content['accessory_of'] != -1) + { + $catofmaster = $this->bo->so->get_value('cat_id',$content['accessory_of']); + $sel_options['cat_id'] = array($catofmaster => $sel_options['cat_id'][$catofmaster]); + } + $sel_options['gen_src_list'] = $this->bo->get_genpicturelist(); $no_button = array(); // TODO: show delete button only if allowed to delete resource diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index 0aca32d0d4..d9b3306244 100644 --- a/resources/setup/etemplates.inc.php +++ b/resources/setup/etemplates.inc.php @@ -1,5 +1,5 @@ 'resources.edit_tabs.pictures','template' => '', $templ_data[] = array('name' => 'resources.show','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:1:{s:1:"A";s:4:"100%";}i:1;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:2;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1108479422',); -$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:9:{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";}}}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:25:"${row}[short_description]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:15:"${row}[useable]";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:16:"${row}[quantity]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"select-cat";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[admin]";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}i:2;a:2:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"bookable.gif";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"bookable[$row_cont[id]]";s:4:"help";s:18:"Book this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:11:"buyable.gif";s:5:"label";s:17:"Buy this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"buyable[$row_cont[id]]";s:4:"help";s:17:"Buy this resource";}}i:2;a:6:{s:4:"type";s:4:"vbox";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:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this entry";}i:2;a:7:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"size";s:10:"delete.gif";}s:6:"needed";s:1:"1";s:5:"align";s:5:"right";}i:3;a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:7:"new.gif";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"new_acc[$row_cont[id]]";s:4:"help";s:38:"Create new accessory for this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"view_acc.gif";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"view_acc[$row_cont[id]]";s:4:"help";s:34:"View accessories for this resource";}}i:4;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:4:"View";s:5:"align";s:6:"center";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this entry";}i:2;a:3:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:8:"checkbox";}s:5:"align";s:5:"right";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108922292',); +$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:1:"C";s:2:"3%";s:2:"c1";s:3:"nmh";s:2:"c2";s:7:"nmr,top";s:1:"F";s:2:"5%";}i:1;a:6:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:17:"Short description";s:4:"name";s:17:"short_description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Useable";s:4:"name";s:7:"useable";s:4:"help";s:36:"How many of this resource are usable";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:8:"quantity";s:4:"help";s:32:"How many of this resource exists";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Administrator";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Location";s:4:"name";s:8:"location";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:18:"Storage Inforation";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:2:{s:4:"type";s:5:"label";s:6:"needed";s:1:"1";}s:5:"align";s:5:"right";i:4;a:9:{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";}}}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:25:"${row}[short_description]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:15:"${row}[useable]";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:16:"${row}[quantity]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"select-cat";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[admin]";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}i:2;a:2:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"bookable.gif";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"bookable[$row_cont[id]]";s:4:"help";s:18:"Book this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:11:"buyable.gif";s:5:"label";s:17:"Buy this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"buyable[$row_cont[id]]";s:4:"help";s:17:"Buy this resource";}s:4:"span";s:10:",buttonbox";}i:2;a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a: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:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this entry";}i:2;a:7:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"size";s:10:"delete.gif";}s:6:"needed";s:1:"1";s:5:"align";s:5:"right";s:4:"span";s:10:",buttonbox";}i:3;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:7:"new.gif";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"new_acc[$row_cont[id]]";s:4:"help";s:38:"Create new accessory for this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"view_acc.gif";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"view_acc[$row_cont[id]]";s:4:"help";s:34:"View accessories for this resource";}s:4:"span";s:10:",buttonbox";}i:4;a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:4:"View";s:5:"align";s:5:"right";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this entry";}i:2;a:3:{s:4:"type";s:8:"checkbox";s:5:"align";s:5:"right";s:4:"name";s:8:"checkbox";}s:5:"align";s:5:"right";s:4:"span";s:10:",buttonbox";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108922292',); diff --git a/resources/setup/etemplates.old.inc.php b/resources/setup/etemplates.old.inc.php index 2591255258..0aca32d0d4 100755 --- a/resources/setup/etemplates.old.inc.php +++ b/resources/setup/etemplates.old.inc.php @@ -1,5 +1,5 @@ 'resources.edit_tabs.pictures','template' => '', $templ_data[] = array('name' => 'resources.show','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:1:{s:1:"A";s:4:"100%";}i:1;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:2;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1108479422',); -$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:9:{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";}}}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:25:"${row}[short_description]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:15:"${row}[useable]";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:16:"${row}[quantity]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"select-cat";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[admin]";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}i:2;a:2:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"bookable.gif";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"name";s:19:"book[$row_cont[id]]";s:4:"help";s:18:"Book this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:11:"buyable.gif";s:5:"label";s:17:"Buy this resource";s:5:"align";s:6:"center";s:4:"name";s:18:"buy[$row_cont[id]]";s:4:"help";s:17:"Buy this resource";}}i:2;a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:7:"new.gif";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"new_acc[$row_cont[id]]";s:4:"help";s:38:"Create new accessory for this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"view_acc.gif";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"view_acc[$row_cont[id]]";s:4:"help";s:34:"View accessories for this resource";}}i:3;a:6:{s:4:"type";s:4:"vbox";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:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this entry";}i:2;a:7:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"size";s:10:"delete.gif";}s:6:"needed";s:1:"1";s:5:"align";s:5:"right";}i:4;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:4:"View";s:5:"align";s:6:"center";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this entry";}i:2;a:3:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:8:"checkbox";}s:5:"align";s:5:"right";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108922292',); +$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:1:"C";s:2:"3%";s:2:"c1";s:3:"nmh";s:2:"c2";s:7:"nmr,top";s:1:"F";s:2:"5%";}i:1;a:6:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:17:"Short description";s:4:"name";s:17:"short_description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Useable";s:4:"name";s:7:"useable";s:4:"help";s:36:"How many of this resource are usable";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:8:"quantity";s:4:"help";s:32:"How many of this resource exists";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Administrator";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Location";s:4:"name";s:8:"location";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:18:"Storage Inforation";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:2:{s:4:"type";s:5:"label";s:6:"needed";s:1:"1";}s:5:"align";s:5:"right";i:4;a:9:{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";}}}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:25:"${row}[short_description]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:15:"${row}[useable]";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:16:"${row}[quantity]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"select-cat";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[admin]";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}i:2;a:2:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";}}s:1:"F";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"bookable.gif";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"bookable[$row_cont[id]]";s:4:"help";s:18:"Book this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:11:"buyable.gif";s:5:"label";s:17:"Buy this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"buyable[$row_cont[id]]";s:4:"help";s:17:"Buy this resource";}}i:2;a:6:{s:4:"type";s:4:"vbox";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:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this entry";}i:2;a:7:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:61:"return confirm(\'Do you really want do delte this resource?\');";s:4:"size";s:10:"delete.gif";}s:6:"needed";s:1:"1";s:5:"align";s:5:"right";}i:3;a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:7:"new.gif";s:5:"label";s:38:"Create new accessory for this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"new_acc[$row_cont[id]]";s:4:"help";s:38:"Create new accessory for this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"view_acc.gif";s:5:"label";s:34:"View accessories for this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"view_acc[$row_cont[id]]";s:4:"help";s:34:"View accessories for this resource";}}i:4;a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:4:"View";s:5:"align";s:6:"center";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this entry";}i:2;a:3:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:8:"checkbox";}s:5:"align";s:5:"right";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108922292',); diff --git a/resources/templates/default/app.css b/resources/templates/default/app.css new file mode 100644 index 0000000000..d2562a4afc --- /dev/null +++ b/resources/templates/default/app.css @@ -0,0 +1 @@ +.buttonbox {vertical-align: top;}