diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index d0610f08af..49cdc9ba93 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -69,6 +69,10 @@ class bo_resources { $readonlys["bookable[$resource[id]]"] = true; } + if (!$resource['buyable']) + { + $readonlys["buyable[$resource[id]]"] = true; + } $rows[$num]['picture_thumb'] = $this->get_picture($resource['id']); } return $nr; diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index eab6cbad81..a2bde3f996 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:\"G\";s:2:\"3%\";s:1:\"H\";s:2:\"3%\";s:2:\"c1\";s:3:\"nmh\";s:2:\"c2\";s:7:\"nmr,top\";}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:18:\"Storage Inforation\";}}s:1:\"F\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Info\";}s:1:\"G\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"align\";s:5:\"right\";}s:1:\"H\";a:3:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:9:\"check.png\";s:5:\"align\";s:6:\"center\";}}i:2;a:8:{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: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:15:\"${row}[useable]\";}i:2;a:2:{s:4:\"type\";s:5:\"label\";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:2:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";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:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:1:{s:4:\"type\";s:5:\"label\";}i:2;a:1:{s:4:\"type\";s:5:\"label\";}}s:1:\"G\";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: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:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:10:\"delete.gif\";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:1:\"H\";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: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:4:\"rows\";i:2;s:4:\"cols\";i:8;}}','size' => '','style' => '','modified' => '1108644076',); +$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:5:{s:1:\"F\";s:2:\"3%\";s:1:\"G\";s:2:\"3%\";s:1:\"H\";s:2:\"3%\";s:2:\"c1\";s:3:\"nmh\";s:2:\"c2\";s:7:\"nmr,top\";}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:18:\"Storage Inforation\";}}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"G\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"align\";s:5:\"right\";}s:1:\"H\";a:3:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:9:\"check.png\";s:5:\"align\";s:6:\"center\";}}i:2;a:8:{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: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:15:\"${row}[useable]\";}i:2;a:2:{s:4:\"type\";s:5:\"label\";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:2:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";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: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\";}}s:1:\"G\";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: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:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:10:\"delete.gif\";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:1:\"H\";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: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:4:\"rows\";i:2;s:4:\"cols\";i:8;}}','size' => '','style' => '','modified' => '1108651040',); diff --git a/resources/templates/default/images/bookable.gif b/resources/templates/default/images/bookable.gif index bfc62ca87b..e91a2bbc86 100755 Binary files a/resources/templates/default/images/bookable.gif and b/resources/templates/default/images/bookable.gif differ diff --git a/resources/templates/default/images/bookable.png b/resources/templates/default/images/bookable.png index ea06f93b16..fb840c5310 100755 Binary files a/resources/templates/default/images/bookable.png and b/resources/templates/default/images/bookable.png differ diff --git a/resources/templates/default/images/buyable.png b/resources/templates/default/images/buyable.png new file mode 100644 index 0000000000..f2a11f070e Binary files /dev/null and b/resources/templates/default/images/buyable.png differ diff --git a/resources/templates/default/images/finance.png b/resources/templates/default/images/finance.png deleted file mode 100755 index 75036b2254..0000000000 Binary files a/resources/templates/default/images/finance.png and /dev/null differ