X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=f4a9fbe1f1b33eddf02422c16b8270e2c367fd80;hb=122ad0af14f046c2462a03fe33967dc41abfc8b5;hp=a7ce52cc466107f8ecaa1cbf1b9eb7c3ad799d24;hpb=c0aebd2bd495832ba857d9bc5ca9a0d918a71252;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index a7ce52cc46..f4a9fbe1f1 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -24,17 +24,13 @@ namespace Friendica\Content; use Friendica\Core\Addon; use Friendica\Core\Protocol; use Friendica\Core\Renderer; -use Friendica\Core\Session; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\FileTag; -use Friendica\Model\GContact; use Friendica\Model\Group; use Friendica\Model\Item; -use Friendica\Model\Profile; use Friendica\Util\DateTimeFormat; -use Friendica\Util\Strings; use Friendica\Util\Temporal; class Widget @@ -520,9 +516,31 @@ class Widget '$cutoff' => $cutoff, '$url' => $url, '$dates' => $ret, + '$showless' => DI::l10n()->t('show less'), '$showmore' => DI::l10n()->t('show more') ]); return $o; } + + /** + * Display the account types sidebar + * The account type value is added as a parameter to the url + * + * @param string $base Basepath + * @param int $accounttype Acount type + * @return string + */ + public static function accounttypes(string $base, $accounttype) + { + $accounts = [ + ['ref' => 'person', 'name' => DI::l10n()->t('Persons')], + ['ref' => 'organisation', 'name' => DI::l10n()->t('Organisations')], + ['ref' => 'news', 'name' => DI::l10n()->t('News')], + ['ref' => 'community', 'name' => DI::l10n()->t('Forums')], + ]; + + return self::filter('accounttype', DI::l10n()->t('Account Types'), '', + DI::l10n()->t('All'), $base, $accounts, $accounttype); + } }