diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-04-23 16:39:56 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-04-23 16:39:56 +0200 |
commit | b0a2e5d3f70cb4c87f32cbee2f9ca6f30ebb22eb (patch) | |
tree | 4476e7d85f1382348df2b9c69b1be62212a1514f /include | |
parent | 0463df62f0d7146b557ba881ac60b0a6916fefa6 (diff) | |
download | volse-hubzilla-b0a2e5d3f70cb4c87f32cbee2f9ca6f30ebb22eb.tar.gz volse-hubzilla-b0a2e5d3f70cb4c87f32cbee2f9ca6f30ebb22eb.tar.bz2 volse-hubzilla-b0a2e5d3f70cb4c87f32cbee2f9ca6f30ebb22eb.zip |
simplify context help js and move it to main.js where all the nav related js resides, do not close the context help if we click outside of it - members might want to work on something while help is open, move the link to /help to dropdown-menu.
Diffstat (limited to 'include')
-rw-r--r-- | include/nav.php | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/nav.php b/include/nav.php index c59aaae37..70faec598 100644 --- a/include/nav.php +++ b/include/nav.php @@ -143,19 +143,17 @@ EOT; if((App::$module != 'home') && (! (local_channel()))) $nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn'); - if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_channel())) $nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn'); - $help_url = z_root() . '/help?f=&cmd=' . App::$cmd; - if(! get_config('system','hide_help')) { + $help_url = z_root() . '/help?f=&cmd=' . App::$cmd; $context_help = ''; $enable_context_help = ((intval(get_config('system','enable_context_help')) === 1 || get_config('system','enable_context_help') === false) ? true : false); if($enable_context_help === true) { require_once('include/help.php'); $context_help = load_context_help(); - //direct directly to /help if $context_help is empty - this can be removed once we have context help for all modules + //point directly to /help if $context_help is empty - this can be removed once we have context help for all modules $enable_context_help = (($context_help) ? true : false); } $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'), 'help_nav_btn', $context_help, $enable_context_help); @@ -166,7 +164,6 @@ EOT; $nav['search'] = array('search', t('Search'), "", t('Search site @name, #tag, ?docs, content')); - $nav['directory'] = array('directory', t('Directory'), "", t('Channel Directory'),'directory_nav_btn'); @@ -240,16 +237,10 @@ $powered_by = ''; // $powered_by = '<strong>red<img class="smiley" src="' . z_root() . '/images/rm-16.png" alt="r#" />matrix</strong>'; - $tpl = get_markup_template('nav_header.tpl'); - - App::$page['htmlhead'] .= replace_macros($tpl, array( - '$enable_context_help' => $enable_context_help - )); - $tpl = get_markup_template('nav.tpl'); App::$page['nav'] .= replace_macros($tpl, array( - '$baseurl' => z_root(), + '$baseurl' => z_root(), '$sitelocation' => $sitelocation, '$nav' => $x['nav'], '$banner' => $banner, @@ -260,7 +251,7 @@ $powered_by = ''; '$powered_by' => $powered_by, '$help' => t('@name, #tag, ?doc, content'), '$pleasewait' => t('Please wait...') - )); + )); call_hooks('page_header', App::$page['nav']); } |