Skip to content
Snippets Groups Projects
Select Git revision
  • 5fe538e2b58180fb23040831fe9f62ae1e6cd45f
  • main default protected
  • step-3263
  • feature/plugins-cli
  • feature/vite
  • step-2484-peerreview
  • biest/issue-5051
  • tests/simplify-jsonapi-tests
  • fix/typo-in-1a70031
  • feature/broadcasting
  • database-seeders-and-factories
  • feature/peer-review-2
  • feature-feedback-jsonapi
  • feature/peerreview
  • feature/balloon-plus
  • feature/stock-images-unsplash
  • tic-2588
  • 5.0
  • 5.2
  • biest/unlock-blocks
  • biest-1514
21 results

ActivityFeed.php

Blame
  • 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;
        }
    }