Select Git revision
ActivityFeed.php
Forked from
Stud.IP / Stud.IP
Source project has a limited visibility.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ActivityFeed.php 1.75 KiB
<?php
/**
* @author André Klaßen <klassen@elan-ev.de>
* @author Till Glöggler <tgloeggl@uos.de>
* @license GPL 2 or later
*/
class ActivityFeed extends CorePlugin implements PortalPlugin
{
public function getPluginName()
{
return _('Aktivitäten');
}
public function getMetadata()
{
return [
'description' => _('Mit diesem Widget haben Sie alle Aktivitäten im Überblick.')
];
}
public function getPortalTemplate()
{
$template = $GLOBALS['template_factory']->open('start/activityfeed');
$template->user_id = $GLOBALS['user']->id;
$template->scrolledfrom = strtotime('+1 day');
$template->config = UserConfig::get($GLOBALS['user']->id)->getValue('ACTIVITY_FEED');
$navigation = new Navigation('', 'dispatch.php/activityfeed/configuration');
$navigation->setImage(Icon::create('edit', 'clickable', ["title" => _('Konfigurieren'), 'size' => 20]), ['data-dialog'=>'size=auto']);
$icons[] = $navigation;
$navigation = new Navigation('', '#', ['cid' => null]);
$navigation->setImage(Icon::create('person-online', 'clickable'));
$navigation->setLinkAttributes([
'id' => 'toggle-user-activities',
'title' => _('Eigene Aktivitäten ein-/ausblenden'),
]);
$icons[] = $navigation;
$navigation = new Navigation('', '#', ['cid' => null]);
$navigation->setImage(Icon::create('no-activity', 'clickable'));
$navigation->setLinkAttributes([
'id' => 'toggle-all-activities',
'title' => _('Aktivitätsdetails ein-/ausblenden'),
]);
$icons[] = $navigation;
$template->icons = $icons;
return $template;
}
}