mirror of
https://github.com/friendica/friendica
synced 2024-11-10 06:22:53 +00:00
Account selector for the community page
This commit is contained in:
parent
04f993b611
commit
5a48002575
2 changed files with 26 additions and 0 deletions
|
@ -113,6 +113,21 @@ 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'), [
|
||||||
|
'$content' => self::$content,
|
||||||
|
'$title' => DI::l10n()->t('Accounts'),
|
||||||
|
'$all' => DI::l10n()->t('All Accounts'),
|
||||||
|
'$all_selected' => ($parameters['accounttype'] == '') ? 'selected' : '',
|
||||||
|
'$person' => DI::l10n()->t('Personal Accounts'),
|
||||||
|
'$person_selected' => ($parameters['accounttype'] == 'person') ? 'selected' : '',
|
||||||
|
'$organisation' => DI::l10n()->t('Organisation Accounts'),
|
||||||
|
'$organisation_selected' => ($parameters['accounttype'] == 'organisation') ? 'selected' : '',
|
||||||
|
'$news' => DI::l10n()->t('News Accounts'),
|
||||||
|
'$news_selected' => ($parameters['accounttype'] == 'news') ? 'selected' : '',
|
||||||
|
'$community' => DI::l10n()->t('Communities'),
|
||||||
|
'$community_selected' => ($parameters['accounttype'] == 'community') ? 'selected' : '',
|
||||||
|
]);
|
||||||
|
|
||||||
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 {{$all_selected}}"><a href="community/{{$content}}">{{$all}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li {{$person_selected}}"><a href="community/{{$content}}/person">{{$person}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li {{$organisation_selected}}"><a href="community/{{$content}}/organisation">{{$organisation}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li {{$news_selected}}"><a href="community/{{$content}}/news">{{$news}}</a></li>
|
||||||
|
<li role="menuitem" class="sidebar-community-accounts-li {{$community_selected}}"><a href="community/{{$content}}/community">{{$community}}</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
Loading…
Reference in a new issue