Merge pull request #9280 from annando/account-selector
Account selector for the community page
This commit is contained in:
commit
4657a8c97a
|
@ -113,6 +113,17 @@ class Community extends BaseModule
|
||||||
|
|
||||||
$o .= $pager->renderMinimal(count($items));
|
$o .= $pager->renderMinimal(count($items));
|
||||||
|
|
||||||
|
DI::page()['aside'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/community_accounts.tpl'), [
|
||||||
|
'$title' => DI::l10n()->t('Accounts'),
|
||||||
|
'$content' => self::$content,
|
||||||
|
'$accounttype' => $parameters['accounttype'],
|
||||||
|
'$all' => DI::l10n()->t('All Accounts'),
|
||||||
|
'$person' => DI::l10n()->t('Personal Accounts'),
|
||||||
|
'$organisation' => DI::l10n()->t('Organisation Accounts'),
|
||||||
|
'$news' => DI::l10n()->t('News Accounts'),
|
||||||
|
'$community' => DI::l10n()->t('Communities'),
|
||||||
|
]);
|
||||||
|
|
||||||
if (Feature::isEnabled(local_user(), 'trending_tags')) {
|
if (Feature::isEnabled(local_user(), 'trending_tags')) {
|
||||||
DI::page()['aside'] .= TrendingTags::getHTML(self::$content);
|
DI::page()['aside'] .= TrendingTags::getHTML(self::$content);
|
||||||
}
|
}
|
||||||
|
|
11
view/templates/widget/community_accounts.tpl
Normal file
11
view/templates/widget/community_accounts.tpl
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<div id="sidebar-community-accounts" class="widget">
|
||||||
|
<h3>{{$title}}</h3>
|
||||||
|
|
||||||
|
<ul class="sidebar-community-accounts-ul">
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li{{if !$accounttype}} selected{{/if}}"><a href="community/{{$content}}">{{$all}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li{{if $accounttype == 'person'}} selected{{/if}}"><a href="community/{{$content}}/person">{{$person}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li{{if $accounttype == 'organisation'}} selected{{/if}}"><a href="community/{{$content}}/organisation">{{$organisation}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li{{if $accounttype == 'news'}} selected{{/if}}"><a href="community/{{$content}}/news">{{$news}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li{{if $accounttype == 'community'}} selected{{/if}}"><a href="community/{{$content}}/community">{{$community}}</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
Loading…
Reference in a new issue