1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<?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;
}
}
|