mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-25 14:51:35 +01:00
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);
|
$this->navbar(False);
|
||||||
include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $phpgw_info['server']['template_set']
|
include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $phpgw_info['server']['template_set']
|
||||||
. '/navbar.inc.php');
|
. '/navbar.inc.php');
|
||||||
if ((!isset($phpgw_info['flags']['nonavbar']) ||
|
if (!@$phpgw_info['flags']['nonavbar'] && !@$phpgw_info['flags']['navbar_target'])
|
||||||
!$phpgw_info['flags']['nonavbar']) &&
|
|
||||||
(!isset($phpgw_info['flags']['navbar_target']) ||
|
|
||||||
!$phpgw_info['flags']['navbar_target']))
|
|
||||||
{
|
{
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
}
|
}
|
||||||
@ -875,7 +872,7 @@
|
|||||||
|
|
||||||
function phpgw_footer()
|
function phpgw_footer()
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info, $HTMLCOMPLAINT;
|
global $phpgw, $phpgw_info, $HTMLCOMPLIANT;
|
||||||
|
|
||||||
if (!isset($phpgw_info['flags']['nofooter']) || !$phpgw_info['flags']['nofooter'])
|
if (!isset($phpgw_info['flags']['nofooter']) || !$phpgw_info['flags']['nofooter'])
|
||||||
{
|
{
|
||||||
|
@ -40,9 +40,32 @@
|
|||||||
$phpgw_info['flags']['currentapp'] != 'logout' &&
|
$phpgw_info['flags']['currentapp'] != 'logout' &&
|
||||||
(!isset($phpgw_info['flags']['noappfooter']) ||
|
(!isset($phpgw_info['flags']['noappfooter']) ||
|
||||||
!$phpgw_info['flags']['noappfooter']))
|
!$phpgw_info['flags']['noappfooter']))
|
||||||
|
{
|
||||||
|
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');
|
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();
|
parse_navbar_end();
|
||||||
$phpgw->db->disconnect();
|
$phpgw->db->disconnect();
|
||||||
|
@ -429,7 +429,7 @@
|
|||||||
/*************************************************************************\
|
/*************************************************************************\
|
||||||
* These lines load up the templates class *
|
* 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);
|
$phpgw->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||||
}
|
}
|
||||||
@ -510,8 +510,7 @@
|
|||||||
/*************************************************************************\
|
/*************************************************************************\
|
||||||
* Load the header unless the developer turns it off *
|
* Load the header unless the developer turns it off *
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
if (!isset($phpgw_info['flags']['noheader']) ||
|
if (!@$phpgw_info['flags']['noheader'])
|
||||||
!$phpgw_info['flags']['noheader'])
|
|
||||||
{
|
{
|
||||||
$phpgw->common->phpgw_header();
|
$phpgw->common->phpgw_header();
|
||||||
}
|
}
|
||||||
@ -520,15 +519,13 @@
|
|||||||
* Load the app include files if the exists *
|
* Load the app include files if the exists *
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/* Then the include file */
|
/* 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');
|
include(PHPGW_APP_INC . '/functions.inc.php');
|
||||||
}
|
}
|
||||||
if ((!isset($phpgw_info['flags']['noheader']) ||
|
if (!@$phpgw_info['flags']['noheader'] &&
|
||||||
!$phpgw_info['flags']['noheader']) &&
|
!@$phpgw_info['flags']['noappheader'] &&
|
||||||
(!isset($phpgw_info['flags']['noappheader']) ||
|
file_exists(PHPGW_APP_INC . '/header.inc.php') && !isset($menuaction))
|
||||||
!$phpgw_info['flags']['noappheader']) &&
|
|
||||||
file_exists(PHPGW_APP_INC . '/header.inc.php'))
|
|
||||||
{
|
{
|
||||||
include(PHPGW_APP_INC . '/header.inc.php');
|
include(PHPGW_APP_INC . '/header.inc.php');
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
function parse_navbar($force = False)
|
function parse_navbar($force = False)
|
||||||
{
|
{
|
||||||
global $phpgw_info, $phpgw;
|
global $phpgw_info, $phpgw, $menuaction;
|
||||||
|
|
||||||
$tpl = createobject("phpgwapi.Template",PHPGW_TEMPLATE_DIR);
|
$tpl = createobject("phpgwapi.Template",PHPGW_TEMPLATE_DIR);
|
||||||
$tpl->set_unknowns("remove");
|
$tpl->set_unknowns("remove");
|
||||||
@ -89,15 +89,20 @@
|
|||||||
$tpl->set_var("messages",$api_messages . "<br>" . checkcode($cd));
|
$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');
|
$phpgw->common->hook('after_navbar');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
function parse_navbar($force = False)
|
function parse_navbar($force = False)
|
||||||
{
|
{
|
||||||
global $phpgw_info, $phpgw;
|
global $phpgw_info, $phpgw, $menuaction;
|
||||||
|
|
||||||
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||||
$tpl->set_unknowns('remove');
|
$tpl->set_unknowns('remove');
|
||||||
@ -135,16 +135,20 @@
|
|||||||
$tpl->set_var('messages',$api_messages . '<br>' . checkcode($cd));
|
$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');
|
$phpgw->common->hook('after_navbar');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
function parse_navbar($force = False)
|
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);
|
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||||
|
|
||||||
@ -88,6 +88,19 @@
|
|||||||
} */
|
} */
|
||||||
|
|
||||||
$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');
|
$phpgw->common->hook('after_navbar');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
function parse_navbar($force = False)
|
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);
|
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||||
|
|
||||||
@ -118,6 +118,19 @@
|
|||||||
$tpl->set_var('messages',$api_messages . '<br>' . checkcode($cd));
|
$tpl->set_var('messages',$api_messages . '<br>' . checkcode($cd));
|
||||||
}
|
}
|
||||||
$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');
|
$phpgw->common->hook('after_navbar');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user