We now have a single menu item again
This commit is contained in:
parent
3e8bde5730
commit
f66f631079
8 changed files with 22 additions and 39 deletions
|
@ -149,12 +149,8 @@ function nav_info(App $a)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array(Config::get('system', 'community_page_style'), [CP_USERS_ON_SERVER, CP_USERS_AND_GLOBAL])) {
|
if (Config::get('system', 'community_page_style') != CP_NO_COMMUNITY_PAGE) {
|
||||||
$nav['community'] = array('community/local', t('Community'), '', t('Conversations on this site'));
|
$nav['community'] = array('community', t('Community'), '', t('Conversations on this and other servers'));
|
||||||
}
|
|
||||||
|
|
||||||
if (in_array(Config::get('system', 'community_page_style'), [CP_GLOBAL_COMMUNITY, CP_USERS_AND_GLOBAL])) {
|
|
||||||
$nav['global'] = array('community/global', t('Global Timeline'), '', t('Conversations on the network'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_user()) {
|
if (local_user()) {
|
||||||
|
|
|
@ -57,6 +57,25 @@ function community_content(App $a, $update = 0) {
|
||||||
require_once 'include/conversation.php';
|
require_once 'include/conversation.php';
|
||||||
|
|
||||||
if (!$update) {
|
if (!$update) {
|
||||||
|
$tabs = [];
|
||||||
|
|
||||||
|
$tabs[] = array('label'=>t('Community'),
|
||||||
|
'url' => 'community/local',
|
||||||
|
'sel' => $content == 'local' ? 'active' : '',
|
||||||
|
'title' => t('Posts from local users on this server'),
|
||||||
|
'id' => 'community-local-tab',
|
||||||
|
'accesskey' => 'l');
|
||||||
|
|
||||||
|
$tabs[] = array('label' => t('Global Timeline'),
|
||||||
|
'url' => 'community/global',
|
||||||
|
'sel' => $content == 'global' ? 'active' : '',
|
||||||
|
'title' => t('Posts from users of the federated network'),
|
||||||
|
'id' => 'community-global-tab',
|
||||||
|
'accesskey' => 'g');
|
||||||
|
|
||||||
|
$tab_tpl = get_markup_template('common_tabs.tpl');
|
||||||
|
$o .= replace_macros($tab_tpl, array('$tabs' => $tabs));
|
||||||
|
|
||||||
nav_set_selected('community');
|
nav_set_selected('community');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +140,7 @@ function community_content(App $a, $update = 0) {
|
||||||
$t = get_markup_template("community.tpl");
|
$t = get_markup_template("community.tpl");
|
||||||
return replace_macros($t, array(
|
return replace_macros($t, array(
|
||||||
'$content' => $o,
|
'$content' => $o,
|
||||||
'$header' => $content == 'global' ? t("Global Timeline") : t("Community"),
|
'$header' => '',
|
||||||
'$show_global_community_hint' => ($content == 'global') && Config::get('system', 'show_global_community_hint'),
|
'$show_global_community_hint' => ($content == 'global') && Config::get('system', 'show_global_community_hint'),
|
||||||
'$global_community_hint' => t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
|
'$global_community_hint' => t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
|
||||||
));
|
));
|
||||||
|
|
|
@ -31,9 +31,6 @@
|
||||||
{{if $nav.community}}
|
{{if $nav.community}}
|
||||||
<a accesskey="c" id="nav-community-link" class="nav-commlink {{$nav.community.2}} {{$sel.community}}" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
<a accesskey="c" id="nav-community-link" class="nav-commlink {{$nav.community.2}} {{$sel.community}}" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $nav.global}}
|
|
||||||
<a accesskey="g" id="nav-global-link" class="nav-commlink {{$nav.global.2}} {{$sel.global}}" href="{{$nav.global.0}}" title="{{$nav.global.3}}" >{{$nav.global.1}}</a>
|
|
||||||
{{/if}}
|
|
||||||
{{if $nav.introductions}}
|
{{if $nav.introductions}}
|
||||||
<a id="nav-notify-link" class="nav-commlink {{$nav.introductions.2}} {{$sel.introductions}}" href="{{$nav.introductions.0}}" title="{{$nav.introductions.3}}" >{{$nav.introductions.1}}</a>
|
<a id="nav-notify-link" class="nav-commlink {{$nav.introductions.2}} {{$sel.introductions}}" href="{{$nav.introductions.0}}" title="{{$nav.introductions.3}}" >{{$nav.introductions.1}}</a>
|
||||||
<span id="intro-update" class="nav-ajax-left"></span>
|
<span id="intro-update" class="nav-ajax-left"></span>
|
||||||
|
|
|
@ -50,10 +50,6 @@
|
||||||
{{if $nav.community}}
|
{{if $nav.community}}
|
||||||
<a role="menuitem" class="nav-menu {{$sel.community}}" href="{{$nav.community.0}}" data-toggle="tooltip" title="{{$nav.community.3}}"><i class="fa fa-lg fa-bullseye" aria-hidden="true"></i></a>
|
<a role="menuitem" class="nav-menu {{$sel.community}}" href="{{$nav.community.0}}" data-toggle="tooltip" title="{{$nav.community.3}}"><i class="fa fa-lg fa-bullseye" aria-hidden="true"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $nav.global}}
|
|
||||||
<a role="menuitem" class="nav-menu {{$sel.global}}" href="{{$nav.global.0}}" data-toggle="tooltip" title="{{$nav.global.3}}"><i class="fa fa-lg fa-globe" aria-hidden="true"></i></a>
|
|
||||||
{{/if}}
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li id="nav-personal" class="nav-segment hidden-xs" role="presentation">
|
<li id="nav-personal" class="nav-segment hidden-xs" role="presentation">
|
||||||
|
|
|
@ -134,12 +134,6 @@
|
||||||
<a id="nav-community-link" class="{{$nav.community.2}} {{$sel.community}} nav-load-page-link" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
<a id="nav-community-link" class="{{$nav.community.2}} {{$sel.community}} nav-load-page-link" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $nav.global}}
|
|
||||||
<li>
|
|
||||||
<a id="nav-global-link" class="{{$nav.global.2}} {{$sel.global}} nav-load-page-link" href="{{$nav.global.0}}" title="{{$nav.global.3}}" >{{$nav.global.1}}</a>
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -130,12 +130,6 @@
|
||||||
<a id="nav-community-link" class="{{$nav.community.2}} {{$sel.community}} nav-load-page-link" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
<a id="nav-community-link" class="{{$nav.community.2}} {{$sel.community}} nav-load-page-link" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $nav.global}}
|
|
||||||
<li>
|
|
||||||
<a id="nav-global-link" class="{{$nav.global.2}} {{$sel.global}} nav-load-page-link" href="{{$nav.global.0}}" title="{{$nav.global.3}}" >{{$nav.global.1}}</a>
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,6 @@
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $nav.global}}
|
|
||||||
<li id="nav-global-link" class="nav-menu {{$sel.global}}">
|
|
||||||
<a class="{{$nav.global.2}}" href="{{$nav.global.0}}" title="{{$nav.global.3}}" >{{$nav.global.1}}</a>
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{if $nav.community}}
|
{{if $nav.community}}
|
||||||
<li id="nav-community-link" class="nav-menu {{$sel.community}}">
|
<li id="nav-community-link" class="nav-menu {{$sel.community}}">
|
||||||
<a class="{{$nav.community.2}}" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
<a class="{{$nav.community.2}}" href="{{$nav.community.0}}" title="{{$nav.community.3}}" >{{$nav.community.1}}</a>
|
||||||
|
|
|
@ -39,13 +39,6 @@
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $nav.global}}
|
|
||||||
<li role="menuitem" id="nav-global-link" class="nav-menu {{$sel.global}}">
|
|
||||||
<a accesskey="g" class="{{$nav.global.2}} desktop-view" href="{{$nav.global.0}}" title="{{$nav.global.3}}" >{{$nav.global.1}}</a>
|
|
||||||
<a class="{{$nav.global.2}} mobile-view" href="{{$nav.global.0}}" title="{{$nav.global.3}}" ><i class="icon s22 icon-bullseye"></i></a>
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<li role="menu" aria-haspopup="true" id="nav-site-linkmenu" class="nav-menu-icon"><a><span class="icon s22 icon-question"><span class="sr-only">{{$nav.help.3}}</span></span></a>
|
<li role="menu" aria-haspopup="true" id="nav-site-linkmenu" class="nav-menu-icon"><a><span class="icon s22 icon-question"><span class="sr-only">{{$nav.help.3}}</span></span></a>
|
||||||
<ul id="nav-site-menu" class="menu-popup">
|
<ul id="nav-site-menu" class="menu-popup">
|
||||||
{{if $nav.help}} <li role="menuitem"><a class="{{$nav.help.2}}" href="{{$nav.help.0}}" title="{{$nav.help.3}}" >{{$nav.help.1}}</a></li>{{/if}}
|
{{if $nav.help}} <li role="menuitem"><a class="{{$nav.help.2}}" href="{{$nav.help.0}}" title="{{$nav.help.3}}" >{{$nav.help.1}}</a></li>{{/if}}
|
||||||
|
|
Loading…
Reference in a new issue