mirror of
https://github.com/humhub/humhub.git
synced 2025-03-14 20:19:47 +01:00
Enh: Added configuration option to hide Activity sidebar widget on dashboard
This commit is contained in:
parent
73f02ddb8b
commit
fbf2659960
@ -13,6 +13,7 @@ HumHub Change Log
|
||||
- Fix #3533: Responsive design issues
|
||||
- Fix #3471: Display of Date Time Column in excel with empty/false value
|
||||
- Fix #3581: Search form with GET causes repeated sticking of url parameters (@Bhoft)
|
||||
- Enh: Added configuration option to hide Activity sidebar widget on dashboard
|
||||
|
||||
|
||||
1.3.13 (May 3, 2019)
|
||||
|
@ -10,7 +10,7 @@ namespace humhub\modules\dashboard;
|
||||
|
||||
/**
|
||||
* Dashboard Module
|
||||
*
|
||||
*
|
||||
* @author Luke
|
||||
*/
|
||||
class Module extends \humhub\components\Module
|
||||
@ -18,7 +18,7 @@ class Module extends \humhub\components\Module
|
||||
|
||||
/**
|
||||
* Possible options to include profile posts into the dashboard stream
|
||||
*
|
||||
*
|
||||
* Default/Null: Default, only include profile posts when user is followed
|
||||
* Always: Always include all user profile posts into dashboards
|
||||
* Admin Only: For admin users, always include all profile posts (without following)
|
||||
@ -33,8 +33,15 @@ class Module extends \humhub\components\Module
|
||||
|
||||
/**
|
||||
* @since 1.2.4
|
||||
* @var string profile
|
||||
* @var string profile
|
||||
*/
|
||||
public $autoIncludeProfilePosts = null;
|
||||
|
||||
|
||||
/**
|
||||
* @since 1.3.14
|
||||
* @var boolean hides the activities sidebar widget
|
||||
*/
|
||||
public $hideActivitySidebarWidget = true;
|
||||
|
||||
}
|
||||
|
@ -8,12 +8,34 @@
|
||||
|
||||
namespace humhub\modules\dashboard\widgets;
|
||||
|
||||
use humhub\modules\activity\widgets\ActivityStreamViewer;
|
||||
use humhub\modules\dashboard\Module;
|
||||
use humhub\widgets\BaseSidebar;
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* Sidebar implements the dashboards sidebar
|
||||
*/
|
||||
class Sidebar extends BaseSidebar
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
/** @var Module $module */
|
||||
$module = Yii::$app->getModule('dashboard');
|
||||
|
||||
if ($module->hideActivitySidebarWidget) {
|
||||
foreach ($this->widgets as $k => $widget) {
|
||||
if (isset($widget[0]) && $widget[0] === ActivityStreamViewer::class) {
|
||||
unset($this->widgets[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user