diff --git a/protected/humhub/docs/CHANGELOG_DEV.md b/protected/humhub/docs/CHANGELOG_DEV.md index 2a3061de73..bbc1738f4d 100644 --- a/protected/humhub/docs/CHANGELOG_DEV.md +++ b/protected/humhub/docs/CHANGELOG_DEV.md @@ -18,3 +18,4 @@ HumHub Change Log - Enh: Added `humhub\modules\ui\form\widgets\JsInputWidget:emptyResult()` helper to manage render state of JsInputWidget - Enh: Added `humhub\modules\ui\form\widgets\JsInputWidget:field` in order to access ActiveField instances within JsInputWidget - Enh #4216: Added `humhub\modules\ui\filter\widgets\DropdownFilterInput` in order to support dropdown stream filters +- Enh: Show more information about installed module in marketplace when possible. Instead of limited README.md diff --git a/protected/humhub/modules/admin/controllers/ModuleController.php b/protected/humhub/modules/admin/controllers/ModuleController.php index 9926b679a2..a1d28d8e99 100644 --- a/protected/humhub/modules/admin/controllers/ModuleController.php +++ b/protected/humhub/modules/admin/controllers/ModuleController.php @@ -56,8 +56,6 @@ class ModuleController extends Controller public function actionIndex() { Yii::$app->moduleManager->flushCache(); - - return $this->redirect(['/admin/module/list']); } @@ -66,9 +64,33 @@ class ModuleController extends Controller { $installedModules = Yii::$app->moduleManager->getModules(); - return $this->render('list', ['installedModules' => $installedModules, 'deprecatedModuleIds' => $this->getDeprecatedModules()]); + return $this->render('list', [ + 'installedModules' => $installedModules, + 'deprecatedModuleIds' => $this->getDeprecatedModules(), + 'marketplaceUrls' => $this->getMarketplaceUrls() + ]); } + + private function getMarketplaceUrls() + { + $marketplaceUrls = []; + + if (Yii::$app->hasModule('marketplace')) { + try { + foreach (Yii::$app->getModule('marketplace')->onlineModuleManager->getModules() as $id => $module) { + if (!empty($module['marketplaceUrl'])) { + $marketplaceUrls[$id] = $module['marketplaceUrl']; + } + } + } catch (\Exception $ex) { + } + } + + return $marketplaceUrls; + } + + private function getDeprecatedModules() { $deprecatedModuleIds = []; @@ -79,7 +101,6 @@ class ModuleController extends Controller $deprecatedModuleIds[] = $id; } } - } catch (\Exception $ex) { } } diff --git a/protected/humhub/modules/admin/views/module/list.php b/protected/humhub/modules/admin/views/module/list.php index 4a62493937..08f2c82154 100644 --- a/protected/humhub/modules/admin/views/module/list.php +++ b/protected/humhub/modules/admin/views/module/list.php @@ -6,6 +6,7 @@ use yii\helpers\Url; /* @var $this \humhub\components\View */ /* @var $installedModules array */ /* @var $deprecatedModuleIds array */ +/* @var $marketplaceUrls array */ ?>