From 03f382bf05d02855d6cfc51d83fc6d4d1a7e0808 Mon Sep 17 00:00:00 2001 From: buddh4 Date: Sat, 2 Feb 2019 13:03:00 +0100 Subject: [PATCH] Enh: Reorganized WallEntry context menu --- protected/humhub/docs/CHANGELOG_DEV.md | 1 + .../humhub/modules/content/widgets/WallEntry.php | 12 ++++++------ .../modules/content/widgets/WallEntryControls.php | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/protected/humhub/docs/CHANGELOG_DEV.md b/protected/humhub/docs/CHANGELOG_DEV.md index 044208f528..66d99129b3 100644 --- a/protected/humhub/docs/CHANGELOG_DEV.md +++ b/protected/humhub/docs/CHANGELOG_DEV.md @@ -20,3 +20,4 @@ HumHub Change Log (DEVELOP) - Enh: Added Icon abstraction `humhub\modules\ui\icon\widgets\Icon` - Enh: Added `humhub\libs\Html::addPjaxPrevention()` for link options - Enh: Added obj support for `humhub\libs\Sort` +- Enh: Reorganized WallEntry context menu diff --git a/protected/humhub/modules/content/widgets/WallEntry.php b/protected/humhub/modules/content/widgets/WallEntry.php index 46b09497b0..72e37828e2 100644 --- a/protected/humhub/modules/content/widgets/WallEntry.php +++ b/protected/humhub/modules/content/widgets/WallEntry.php @@ -190,12 +190,12 @@ class WallEntry extends Widget $this->addControl($result, [EditLink::class, ['model' => $this->contentObject, 'mode' => $this->editMode, 'url' => $this->getEditUrl()], ['sortOrder' => 200]]); } - $this->addControl($result, [VisibilityLink::class, ['contentRecord' => $this->contentObject], ['sortOrder' => 250]]); - $this->addControl($result, [NotificationSwitchLink::class, ['content' => $this->contentObject], ['sortOrder' => 300]]); - $this->addControl($result, [PermaLink::class, ['content' => $this->contentObject], ['sortOrder' => 400]]); - $this->addControl($result, [PinLink::class, ['content' => $this->contentObject], ['sortOrder' => 500]]); - $this->addControl($result, [MoveContentLink::class, ['model' => $this->contentObject], ['sortOrder' => 550]]); - $this->addControl($result, [ArchiveLink::class, ['content' => $this->contentObject], ['sortOrder' => 600]]); + $this->addControl($result, [PermaLink::class, ['content' => $this->contentObject], ['sortOrder' => 300]]); + $this->addControl($result, [VisibilityLink::class, ['contentRecord' => $this->contentObject], ['sortOrder' => 400]]); + $this->addControl($result, [NotificationSwitchLink::class, ['content' => $this->contentObject], ['sortOrder' => 500]]); + $this->addControl($result, [PinLink::class, ['content' => $this->contentObject], ['sortOrder' => 600]]); + $this->addControl($result, [MoveContentLink::class, ['model' => $this->contentObject], ['sortOrder' => 700]]); + $this->addControl($result, [ArchiveLink::class, ['content' => $this->contentObject], ['sortOrder' => 800]]); if(isset($this->controlsOptions['add'])) { foreach ($this->controlsOptions['add'] as $linkOptions) { diff --git a/protected/humhub/modules/content/widgets/WallEntryControls.php b/protected/humhub/modules/content/widgets/WallEntryControls.php index c5c7edfc1e..bec0189342 100644 --- a/protected/humhub/modules/content/widgets/WallEntryControls.php +++ b/protected/humhub/modules/content/widgets/WallEntryControls.php @@ -48,8 +48,8 @@ class WallEntryControls extends \humhub\widgets\BaseStack * * [MyWidget::class, [...], [...]] * - * @param type $menuItem - * @return type + * @param [] $menuItem + * @return array */ protected function getWallEntryLinkDefinition($menuItem) {