- Fix reservation not finding any resources

- Hide planner close button when reserving
This commit is contained in:
Nathan Gray 2014-05-15 15:59:27 +00:00
parent fc5e83bb37
commit 89f045a5c1

View File

@ -80,7 +80,9 @@ class module_resources_reservation extends sitemgr_module
$query = array( $query = array(
// Resources uses filter, not cat_id // Resources uses filter, not cat_id
'filter' => $this->block->arguments['category'], 'filter' => $this->block->arguments['category'],
'bookable' => true 'filter2' => -1,
'show_bookable' => true,
'csv_export' => true
); );
// Add resources from selected category // Add resources from selected category
@ -94,37 +96,38 @@ class module_resources_reservation extends sitemgr_module
} }
/** /**
* generate the module content AND process submitted forms * generate the module content AND process submitted forms
* Overridden from parent to pass arguments * Overridden from parent to pass arguments
* *
* @param array &$arguments $arguments['arg1']-$arguments['arg3'] will be passed for non-submitted forms (first call) * @param array &$arguments $arguments['arg1']-$arguments['arg3'] will be passed for non-submitted forms (first call)
* @param array $properties * @param array $properties
* @return string the html content * @return string the html content
*/ */
function get_content(&$arguments,$properties) function get_content(&$arguments,$properties)
{ {
list($app) = explode('.',$this->etemplate_method); list($app) = explode('.',$this->etemplate_method);
$GLOBALS['egw']->translation->add_app($app); $GLOBALS['egw']->translation->add_app($app);
$extra = "<style type=\"text/css\">\n<!--\n@import url(".$GLOBALS['egw_info']['server']['webserver_url']. $extra = "<style type=\"text/css\">\n<!--\n@import url(".$GLOBALS['egw_info']['server']['webserver_url'].
"/etemplate/templates/default/app.css);\n"; "/etemplate/templates/default/app.css);\n";
if ($app != 'etemplate' && file_exists(EGW_SERVER_ROOT.'/'.$app.'/templates/default/app.css')) if ($app != 'etemplate' && file_exists(EGW_SERVER_ROOT.'/'.$app.'/templates/default/app.css'))
{ {
$extra .= "@import url(".$GLOBALS['egw_info']['server']['webserver_url']. $extra .= "@import url(".$GLOBALS['egw_info']['server']['webserver_url'].
'/'.$app."/templates/default/app.css);\n"; '/'.$app."/templates/default/app.css);\n";
} }
$extra .= "-->\n</style>\n"; $extra .= '.calendar_plannerRowHeader > a { display: none; }';
$extra .= '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/etemplate/js/etemplate.js" type="text/javascript"></script>'."\n"; $extra .= "-->\n</style>\n";
$ret = false; $extra .= '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/etemplate/js/etemplate.js" type="text/javascript"></script>'."\n";
if($_POST['etemplate_exec_id']) $ret = false;
{ if($_POST['etemplate_exec_id'])
$ret = ExecMethod('etemplate.etemplate.process_exec'); {
} $ret = ExecMethod('etemplate.etemplate.process_exec');
}
if($_GET['date']) $arguments['date'] = strtotime($_GET['date']); if($_GET['date']) $arguments['date'] = strtotime($_GET['date']);
$arguments['link'] = $this->link(); $arguments['link'] = $this->link();
$arguments['sitemgr_version'] = $this->block->version; $arguments['sitemgr_version'] = $this->block->version;
return $extra.($ret ? $ret : ExecMethod2($this->etemplate_method,null,$arguments)); return $extra.($ret ? $ret : ExecMethod2($this->etemplate_method,null,$arguments));
} }
} }