Update wording for space advanced settings (#6131)

This commit is contained in:
Yuriy Bakhtin 2023-02-28 11:10:40 +04:00 committed by GitHub
parent 3b08a9c076
commit f132b170bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 11 deletions

View File

@ -82,7 +82,7 @@ class AdvancedSettings extends Model
return [
'url' => 'URL',
'indexUrl' => Yii::t('SpaceModule.base', 'Homepage'),
'indexGuestUrl' => Yii::t('SpaceModule.base', 'Homepage (Guests)'),
'indexGuestUrl' => Yii::t('SpaceModule.base', 'Homepage (Non-members)'),
'hideMembers' => Yii::t('SpaceModule.base', 'Hide Members'),
'hideActivities' => Yii::t('SpaceModule.base', 'Hide Activity Sidebar Widget'),
'hideAbout' => Yii::t('SpaceModule.base', 'Hide About Page'),
@ -90,6 +90,16 @@ class AdvancedSettings extends Model
];
}
/**
* @inheritdoc
*/
public function attributeHints()
{
return [
'indexUrl' => Yii::t('SpaceModule.base', 'The default homepage for members of this Space'),
'indexGuestUrl' => Yii::t('SpaceModule.base', 'The default homepage for non-members and guests visiting this Space'),
];
}
public function loadBySettings()
{

View File

@ -11,15 +11,14 @@ namespace humhub\modules\space\modules\manage\controllers;
use humhub\modules\content\components\ContentContainerControllerAccess;
use humhub\modules\content\widgets\richtext\RichText;
use humhub\modules\space\components\UrlRule;
use Yii;
use humhub\modules\space\models\Space;
use humhub\modules\space\models\AdvancedSettings;
use humhub\modules\space\widgets\Menu;
use humhub\modules\space\widgets\Chooser;
use humhub\modules\space\modules\manage\components\Controller;
use humhub\modules\space\modules\manage\models\DeleteForm;
use humhub\modules\space\activities\SpaceArchived;
use humhub\modules\space\activities\SpaceUnArchived;
use Yii;
use yii\helpers\Url;
/**

View File

@ -1,17 +1,15 @@
<?php
use humhub\modules\space\models\AdvancedSettings;
use humhub\modules\space\models\Space;
use humhub\modules\space\modules\manage\widgets\DefaultMenu;
use humhub\widgets\Button;
use humhub\modules\ui\form\widgets\ActiveForm;
use yii\helpers\Url;
/* @var $this \humhub\modules\ui\view\components\View
* @var $model \humhub\modules\space\modules\manage\models\AdvancedSettings
* @var $indexModuleSelection array
* @var $space Space
*/
/* @var $model AdvancedSettings */
/* @var $indexModuleSelection array */
/* @var $space Space */
?>
<div class="panel panel-default">
@ -33,8 +31,8 @@ use yii\helpers\Url;
<?= $form->field($model, 'hideAbout')->checkbox(); ?>
<?= $form->field($model, 'hideActivities')->checkbox(); ?>
<?= $form->field($model, 'hideFollowers')->checkbox(); ?>
<?= $form->field($model, 'indexUrl')->dropDownList($indexModuleSelection)->hint(Yii::t('SpaceModule.manage', 'the default start page of this space for members')) ?>
<?= $form->field($model, 'indexGuestUrl')->dropDownList($indexModuleSelection)->hint(Yii::t('SpaceModule.manage', 'the default start page of this space for visitors')) ?>
<?= $form->field($model, 'indexUrl')->dropDownList($indexModuleSelection) ?>
<?= $form->field($model, 'indexGuestUrl')->dropDownList($indexModuleSelection) ?>
<?= Button::save()->submit() ?>
<?= Button::danger(Yii::t('base', 'Delete'))->right()->link($space->createUrl('delete'))->visible($space->canDelete()) ?>