chore: sync module from working instance and add install guide

This commit is contained in:
Kelin Rescue Hub
2026-04-09 14:16:53 -04:00
parent 87a59e5a0a
commit 69c348ce27
9 changed files with 360 additions and 59 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace humhub\modules\space_profiles\widgets;
use humhub\components\Widget;
use humhub\modules\space\models\Space;
use humhub\modules\space_profiles\models\SpaceProfile;
class RescueInfoSidebar extends Widget
{
public Space $space;
public function run()
{
$profile = SpaceProfile::findOne(['contentcontainer_id' => $this->space->contentcontainer_id]);
$spaceDescription = trim((string)$this->space->about);
if ($spaceDescription === '') {
$spaceDescription = trim((string)$this->space->description);
}
if ($spaceDescription === '') {
$spaceDescription = trim((string)($profile?->description ?? ''));
}
return $this->render('rescueInfoSidebar', [
'space' => $this->space,
'profile' => $profile,
'spaceDescription' => $spaceDescription,
]);
}
}