menu entry for "Delegations" moved to the settings.

This commit is contained in:
Michael Vogel 2014-04-24 10:16:02 +02:00
parent acb5748221
commit 30efb0c1e6
2 changed files with 20 additions and 8 deletions

View file

@ -127,7 +127,9 @@ function nav_info(&$a) {
elseif(! get_config('system','no_community_page')) elseif(! get_config('system','no_community_page'))
$nav['community'] = array('community', t('Community'), "", t('Conversations on this site')); $nav['community'] = array('community', t('Community'), "", t('Conversations on this site'));
$nav['directory'] = array($gdirpath, t('Directory'), "", t('People directory')); $nav['directory'] = array($gdirpath, t('Directory'), "", t('People directory'));
$nav['about'] = Array('friendica', t('Information'), "", t('Information about this friendica instance'));
/** /**
* *

View file

@ -32,7 +32,7 @@ function settings_init(&$a) {
$tabs = array( $tabs = array(
array( array(
'label' => t('Account settings'), 'label' => t('Account'),
'url' => $a->get_baseurl(true).'/settings', 'url' => $a->get_baseurl(true).'/settings',
'selected' => (($a->argc == 1)?'active':''), 'selected' => (($a->argc == 1)?'active':''),
), ),
@ -42,21 +42,26 @@ function settings_init(&$a) {
'selected' => (($a->argc > 1) && ($a->argv[1] === 'features') ? 'active' : ''), 'selected' => (($a->argc > 1) && ($a->argv[1] === 'features') ? 'active' : ''),
), ),
array( array(
'label' => t('Display settings'), 'label' => t('Display'),
'url' => $a->get_baseurl(true).'/settings/display', 'url' => $a->get_baseurl(true).'/settings/display',
'selected' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''), 'selected' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''),
), ),
array( array(
'label' => t('Connector settings'), 'label' => t('Social Networks'),
'url' => $a->get_baseurl(true).'/settings/connectors', 'url' => $a->get_baseurl(true).'/settings/connectors',
'selected' => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''), 'selected' => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''),
), ),
array( array(
'label' => t('Plugin settings'), 'label' => t('Plugins'),
'url' => $a->get_baseurl(true).'/settings/addon', 'url' => $a->get_baseurl(true).'/settings/addon',
'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''), 'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
), ),
array(
'label' => t('Delegations'),
'url' => $a->get_baseurl(true).'/delegate',
'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
),
array( array(
'label' => t('Connected apps'), 'label' => t('Connected apps'),
'url' => $a->get_baseurl(true) . '/settings/oauth', 'url' => $a->get_baseurl(true) . '/settings/oauth',
@ -719,8 +724,13 @@ function settings_content(&$a) {
call_hooks('connector_settings', $settings_connectors); call_hooks('connector_settings', $settings_connectors);
$diasp_enabled = sprintf( t('Built-in support for %s connectivity is %s'), t('Diaspora'), ((get_config('system','diaspora_enabled')) ? t('enabled') : t('disabled'))); if (is_site_admin()) {
$ostat_enabled = sprintf( t('Built-in support for %s connectivity is %s'), t('StatusNet'), ((get_config('system','ostatus_disabled')) ? t('disabled') : t('enabled'))); $diasp_enabled = sprintf( t('Built-in support for %s connectivity is %s'), t('Diaspora'), ((get_config('system','diaspora_enabled')) ? t('enabled') : t('disabled')));
$ostat_enabled = sprintf( t('Built-in support for %s connectivity is %s'), t('StatusNet'), ((get_config('system','ostatus_disabled')) ? t('disabled') : t('enabled')));
} else {
$diasp_enabled = "";
$ostat_enabled = "";
}
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
if(get_config('system','dfrn_only')) if(get_config('system','dfrn_only'))
@ -759,7 +769,7 @@ function settings_content(&$a) {
$o .= replace_macros($tpl, array( $o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_connectors"), '$form_security_token' => get_form_security_token("settings_connectors"),
'$title' => t('Connector Settings'), '$title' => t('Social Networks'),
'$diasp_enabled' => $diasp_enabled, '$diasp_enabled' => $diasp_enabled,
'$ostat_enabled' => $ostat_enabled, '$ostat_enabled' => $ostat_enabled,