diff --git a/CHANGELOG_DEV.md b/CHANGELOG_DEV.md
index ddab1e7f8d..40933f76e3 100644
--- a/CHANGELOG_DEV.md
+++ b/CHANGELOG_DEV.md
@@ -2,7 +2,8 @@
------------------
- Fix #5174: Tour module crashes with enabled tags field
-- Fix #5176: Closing the action confirmation modal window on top close icon
+- Fix #5176: Closing the action confirmation modal window on top close icon
+- Fix #5177: Move directory widgets
1.9.0-beta.2 (July 14, 2021)
diff --git a/protected/humhub/modules/dashboard/views/dashboard/index_guest.php b/protected/humhub/modules/dashboard/views/dashboard/index_guest.php
index f78d4f5311..80df977d6f 100644
--- a/protected/humhub/modules/dashboard/views/dashboard/index_guest.php
+++ b/protected/humhub/modules/dashboard/views/dashboard/index_guest.php
@@ -3,8 +3,8 @@
use humhub\libs\Html;
use humhub\modules\dashboard\widgets\DashboardContent;
use humhub\modules\dashboard\widgets\Sidebar;
-use humhub\modules\directory\widgets\NewMembers;
-use humhub\modules\directory\widgets\NewSpaces;
+use humhub\modules\space\widgets\NewSpaces;
+use humhub\modules\user\widgets\NewMembers;
use humhub\widgets\FooterMenu;
?>
diff --git a/protected/humhub/modules/directory/widgets/NewSpaces.php b/protected/humhub/modules/space/widgets/NewSpaces.php
similarity index 91%
rename from protected/humhub/modules/directory/widgets/NewSpaces.php
rename to protected/humhub/modules/space/widgets/NewSpaces.php
index dec5ce2e2a..4bfb37c509 100644
--- a/protected/humhub/modules/directory/widgets/NewSpaces.php
+++ b/protected/humhub/modules/space/widgets/NewSpaces.php
@@ -1,6 +1,6 @@
+}
\ No newline at end of file
diff --git a/protected/humhub/modules/directory/widgets/views/newSpaces.php b/protected/humhub/modules/space/widgets/views/newSpaces.php
similarity index 58%
rename from protected/humhub/modules/directory/widgets/views/newSpaces.php
rename to protected/humhub/modules/space/widgets/views/newSpaces.php
index f0a9f68ebf..80e21ec6e7 100644
--- a/protected/humhub/modules/directory/widgets/views/newSpaces.php
+++ b/protected/humhub/modules/space/widgets/views/newSpaces.php
@@ -1,19 +1,25 @@
- 'new-spaces-panel']); ?>
+ = PanelMenu::widget(['id' => 'new-spaces-panel']); ?>
- New spaces'); ?>
+ = Yii::t('SpaceModule.base', 'New spaces'); ?>
- = \humhub\modules\space\widgets\Image::widget([
+ = Image::widget([
'space' => $space,
'showTooltip' => true,
'width' => 40,
@@ -27,7 +33,7 @@ use yii\helpers\Html;
- 'btn btn-xl btn-primary']); ?>
+ = Html::a(Yii::t('SpaceModule.base', 'See all'), ['/space/spaces'], ['class' => 'btn btn-xl btn-primary']); ?>
\ No newline at end of file
diff --git a/protected/humhub/modules/directory/widgets/NewMembers.php b/protected/humhub/modules/user/widgets/NewMembers.php
similarity index 92%
rename from protected/humhub/modules/directory/widgets/NewMembers.php
rename to protected/humhub/modules/user/widgets/NewMembers.php
index 15bd1ce50e..713b0a210f 100644
--- a/protected/humhub/modules/directory/widgets/NewMembers.php
+++ b/protected/humhub/modules/user/widgets/NewMembers.php
@@ -6,7 +6,7 @@
* @license https://www.humhub.com/licences
*/
-namespace humhub\modules\directory\widgets;
+namespace humhub\modules\user\widgets;
use Yii;
use humhub\modules\user\models\User;
@@ -51,15 +51,13 @@ class NewMembers extends \yii\base\Widget
*/
public function run()
{
- $newUsers = User::find()->orderBy('created_at DESC')->visible();
+ $newUsers = User::find()->orderBy('created_at DESC')->visible()->limit(10);
return $this->render('newMembers', [
- 'newUsers' => $newUsers,
+ 'newUsers' => $newUsers->all(),
'showMoreButton' => $this->showMoreButton,
'showInviteButton' => $this->showInviteButton
]);
}
-}
-
-?>
+}
\ No newline at end of file
diff --git a/protected/humhub/modules/directory/widgets/views/newMembers.php b/protected/humhub/modules/user/widgets/views/newMembers.php
similarity index 66%
rename from protected/humhub/modules/directory/widgets/views/newMembers.php
rename to protected/humhub/modules/user/widgets/views/newMembers.php
index 217b38ebfd..e53c6d0079 100644
--- a/protected/humhub/modules/directory/widgets/views/newMembers.php
+++ b/protected/humhub/modules/user/widgets/views/newMembers.php
@@ -1,11 +1,12 @@
@@ -13,10 +14,10 @@ use humhub\modules\user\widgets\Image;
= PanelMenu::widget(['id' => 'new-people-panel']) ?>
- = Yii::t('DirectoryModule.base', 'New people') ?>
+ = Yii::t('UserModule.base', 'New people') ?>
- limit(10)->all() as $user) : ?>
+
= Image::widget(['user' => $user, 'width' => 40, 'showTooltip' => true]) ?>
@@ -25,12 +26,12 @@ use humhub\modules\user\widgets\Image;
- = ModalButton::primary(Yii::t('DirectoryModule.base', 'Send invite'))
+ = ModalButton::primary(Yii::t('UserModule.base', 'Send invite'))
->load(['/user/invite'])->icon('invite')->sm() ?>
- = Button::primary(Yii::t('DirectoryModule.base', 'See all'))
- ->link(['/directory/directory/members'])->icon('list-ul')->sm() ?>
+ = Button::primary(Yii::t('UserModule.base', 'See all'))
+ ->link(['/user/people'])->icon('list-ul')->sm() ?>