forked from extern/egroupware
This now takes the app header/footer as methods of the application ui. For this to work, each ui that plans on implementing this, will need to create public_functions header() and footer().
This commit is contained in:
parent
24f16fc191
commit
300c84ea9a
@ -864,10 +864,7 @@
|
||||
$this->navbar(False);
|
||||
include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $phpgw_info['server']['template_set']
|
||||
. '/navbar.inc.php');
|
||||
if ((!isset($phpgw_info['flags']['nonavbar']) ||
|
||||
!$phpgw_info['flags']['nonavbar']) &&
|
||||
(!isset($phpgw_info['flags']['navbar_target']) ||
|
||||
!$phpgw_info['flags']['navbar_target']))
|
||||
if (!@$phpgw_info['flags']['nonavbar'] && !@$phpgw_info['flags']['navbar_target'])
|
||||
{
|
||||
echo parse_navbar();
|
||||
}
|
||||
@ -875,7 +872,7 @@
|
||||
|
||||
function phpgw_footer()
|
||||
{
|
||||
global $phpgw, $phpgw_info, $HTMLCOMPLAINT;
|
||||
global $phpgw, $phpgw_info, $HTMLCOMPLIANT;
|
||||
|
||||
if (!isset($phpgw_info['flags']['nofooter']) || !$phpgw_info['flags']['nofooter'])
|
||||
{
|
||||
|
@ -41,7 +41,30 @@
|
||||
(!isset($phpgw_info['flags']['noappfooter']) ||
|
||||
!$phpgw_info['flags']['noappfooter']))
|
||||
{
|
||||
include(PHPGW_APP_INC . '/footer.inc.php');
|
||||
if ($menuaction)
|
||||
{
|
||||
list($app,$class,$method) = explode('.',$menuaction);
|
||||
if ($app && $class && $method)
|
||||
{
|
||||
$obj = CreateObject(sprintf('%s.%s',$app,$class));
|
||||
if (is_array($obj->public_functions) && $obj->public_functions['footer'])
|
||||
{
|
||||
eval("\$obj->footer();");
|
||||
}
|
||||
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
|
||||
{
|
||||
include(PHPGW_APP_INC . '/footer.inc.php');
|
||||
}
|
||||
}
|
||||
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
|
||||
{
|
||||
include(PHPGW_APP_INC . '/footer.inc.php');
|
||||
}
|
||||
}
|
||||
elseif(file_exists(PHPGW_APP_INC.'/footer.inc.php'))
|
||||
{
|
||||
include(PHPGW_APP_INC . '/footer.inc.php');
|
||||
}
|
||||
}
|
||||
|
||||
parse_navbar_end();
|
||||
|
@ -429,7 +429,7 @@
|
||||
/*************************************************************************\
|
||||
* These lines load up the templates class *
|
||||
\*************************************************************************/
|
||||
if(!$phpgw_info['flags']['disable_Template_class'])
|
||||
if(!@$phpgw_info['flags']['disable_Template_class'])
|
||||
{
|
||||
$phpgw->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
}
|
||||
@ -510,8 +510,7 @@
|
||||
/*************************************************************************\
|
||||
* Load the header unless the developer turns it off *
|
||||
\*************************************************************************/
|
||||
if (!isset($phpgw_info['flags']['noheader']) ||
|
||||
!$phpgw_info['flags']['noheader'])
|
||||
if (!@$phpgw_info['flags']['noheader'])
|
||||
{
|
||||
$phpgw->common->phpgw_header();
|
||||
}
|
||||
@ -520,15 +519,13 @@
|
||||
* Load the app include files if the exists *
|
||||
\*************************************************************************/
|
||||
/* Then the include file */
|
||||
if (! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && file_exists(PHPGW_APP_INC . '/functions.inc.php'))
|
||||
if (! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && file_exists(PHPGW_APP_INC . '/functions.inc.php') && !isset($menuaction))
|
||||
{
|
||||
include(PHPGW_APP_INC . '/functions.inc.php');
|
||||
}
|
||||
if ((!isset($phpgw_info['flags']['noheader']) ||
|
||||
!$phpgw_info['flags']['noheader']) &&
|
||||
(!isset($phpgw_info['flags']['noappheader']) ||
|
||||
!$phpgw_info['flags']['noappheader']) &&
|
||||
file_exists(PHPGW_APP_INC . '/header.inc.php'))
|
||||
if (!@$phpgw_info['flags']['noheader'] &&
|
||||
!@$phpgw_info['flags']['noappheader'] &&
|
||||
file_exists(PHPGW_APP_INC . '/header.inc.php') && !isset($menuaction))
|
||||
{
|
||||
include(PHPGW_APP_INC . '/header.inc.php');
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
function parse_navbar($force = False)
|
||||
{
|
||||
global $phpgw_info, $phpgw;
|
||||
global $phpgw_info, $phpgw, $menuaction;
|
||||
|
||||
$tpl = createobject("phpgwapi.Template",PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_unknowns("remove");
|
||||
@ -89,15 +89,20 @@
|
||||
$tpl->set_var("messages",$api_messages . "<br>" . checkcode($cd));
|
||||
}
|
||||
|
||||
// If the application has a header include, we now include it
|
||||
if ((isset($phpgw_info["flags"]["noheader"]) &&
|
||||
$phpgw_info['flags']['noheader']) &&
|
||||
(isset($phpgw_info['flags']['noappheader']) &&
|
||||
!$phpgw_info["flags"]["noappheader"]))
|
||||
{
|
||||
|
||||
}
|
||||
$tpl->pfp('out','navbar');
|
||||
$tpl->pfp('out','navbar');
|
||||
// If the application has a header include, we now include it
|
||||
if (!@$phpgw_info['flags']['noappheader'] && $menuaction)
|
||||
{
|
||||
list($app,$class,$method) = explode('.',$menuaction);
|
||||
if ($app && $class && $method)
|
||||
{
|
||||
$obj = CreateObject(sprintf('%s.%s',$app,$class));
|
||||
if (is_array($obj->public_functions) && $obj->public_functions['header'])
|
||||
{
|
||||
eval("\$obj->header();");
|
||||
}
|
||||
}
|
||||
}
|
||||
$phpgw->common->hook('after_navbar');
|
||||
return;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
function parse_navbar($force = False)
|
||||
{
|
||||
global $phpgw_info, $phpgw;
|
||||
global $phpgw_info, $phpgw, $menuaction;
|
||||
|
||||
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_unknowns('remove');
|
||||
@ -135,16 +135,20 @@
|
||||
$tpl->set_var('messages',$api_messages . '<br>' . checkcode($cd));
|
||||
}
|
||||
*/
|
||||
|
||||
// If the application has a header include, we now include it
|
||||
if ((isset($phpgw_info["flags"]["noheader"]) &&
|
||||
$phpgw_info['flags']['noheader']) &&
|
||||
(isset($phpgw_info['flags']['noappheader']) &&
|
||||
!$phpgw_info["flags"]["noappheader"]))
|
||||
{
|
||||
|
||||
}
|
||||
$tpl->pfp('out','navbar');
|
||||
// If the application has a header include, we now include it
|
||||
if (!@$phpgw_info['flags']['noappheader'] && $menuaction)
|
||||
{
|
||||
list($app,$class,$method) = explode('.',$menuaction);
|
||||
if ($app && $class && $method)
|
||||
{
|
||||
$obj = CreateObject(sprintf('%s.%s',$app,$class));
|
||||
if (is_array($obj->public_functions) && $obj->public_functions['header'])
|
||||
{
|
||||
eval("\$obj->header();");
|
||||
}
|
||||
}
|
||||
}
|
||||
$phpgw->common->hook('after_navbar');
|
||||
return;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
function parse_navbar($force = False)
|
||||
{
|
||||
global $phpgw_info, $phpgw, $PHP_SELF;
|
||||
global $phpgw_info, $phpgw, $PHP_SELF, $menuaction;
|
||||
|
||||
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
|
||||
@ -88,6 +88,19 @@
|
||||
} */
|
||||
|
||||
$tpl->pfp('out','navbar');
|
||||
// If the application has a header include, we now include it
|
||||
if (!@$phpgw_info['flags']['noappheader'] && $menuaction)
|
||||
{
|
||||
list($app,$class,$method) = explode('.',$menuaction);
|
||||
if ($app && $class && $method)
|
||||
{
|
||||
$obj = CreateObject(sprintf('%s.%s',$app,$class));
|
||||
if (is_array($obj->public_functions) && $obj->public_functions['header'])
|
||||
{
|
||||
eval("\$obj->header();");
|
||||
}
|
||||
}
|
||||
}
|
||||
$phpgw->common->hook('after_navbar');
|
||||
return;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
function parse_navbar($force = False)
|
||||
{
|
||||
global $phpgw_info, $phpgw, $PHP_SELF;
|
||||
global $phpgw_info, $phpgw, $PHP_SELF, $menuaction;
|
||||
|
||||
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
|
||||
@ -118,6 +118,19 @@
|
||||
$tpl->set_var('messages',$api_messages . '<br>' . checkcode($cd));
|
||||
}
|
||||
$tpl->pfp('out','navbar');
|
||||
// If the application has a header include, we now include it
|
||||
if (!@$phpgw_info['flags']['noappheader'] && $menuaction)
|
||||
{
|
||||
list($app,$class,$method) = explode('.',$menuaction);
|
||||
if ($app && $class && $method)
|
||||
{
|
||||
$obj = CreateObject(sprintf('%s.%s',$app,$class));
|
||||
if (is_array($obj->public_functions) && $obj->public_functions['header'])
|
||||
{
|
||||
eval("\$obj->header();");
|
||||
}
|
||||
}
|
||||
}
|
||||
$phpgw->common->hook('after_navbar');
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user