Enh #6623: Add a hint in the "Dropdown space order" settings to infor… (#6624)

* Enh #6623: Add a hint in the "Dropdown space order" settings to inform that a manual sort is always applied first

* Changed wording

* Update DesignSettingsForm.php

---------

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Marc Farré 2023-10-20 20:11:17 +02:00 committed by GitHub
parent 8fd707e1f2
commit e49d03b9a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 6 deletions

View File

@ -5,6 +5,7 @@ HumHub Changelog
------------------------------- -------------------------------
- Enh #6619: Add a link to "Module Administration" from Marketplace - Enh #6619: Add a link to "Module Administration" from Marketplace
- Enh #6621: Avoid PHP error when trying to download a file without guid in the URL params (return 404 exception instead) - Enh #6621: Avoid PHP error when trying to download a file without guid in the URL params (return 404 exception instead)
- Enh #6623: Add a hint in the "Dropdown space order" settings to inform that a manual sort is always applied first
1.15.0-beta.2 (October 5, 2023) 1.15.0-beta.2 (October 5, 2023)
------------------------------- -------------------------------

View File

@ -8,16 +8,16 @@
namespace humhub\modules\admin\models\forms; namespace humhub\modules\admin\models\forms;
use humhub\libs\DynamicConfig;
use humhub\libs\LogoImage;
use humhub\modules\file\validators\ImageSquareValidator; use humhub\modules\file\validators\ImageSquareValidator;
use humhub\modules\stream\actions\Stream; use humhub\modules\stream\actions\Stream;
use humhub\modules\ui\view\helpers\ThemeHelper;
use humhub\modules\user\models\ProfileField; use humhub\modules\user\models\ProfileField;
use humhub\modules\web\pwa\widgets\SiteIcon; use humhub\modules\web\pwa\widgets\SiteIcon;
use Yii; use Yii;
use yii\base\Model; use yii\base\Model;
use yii\web\UploadedFile; use yii\web\UploadedFile;
use humhub\libs\LogoImage;
use humhub\libs\DynamicConfig;
use humhub\modules\ui\view\helpers\ThemeHelper;
/** /**
* DesignSettingsForm * DesignSettingsForm
@ -85,7 +85,7 @@ class DesignSettingsForm extends Model
'paginationSize' => Yii::t('AdminModule.settings', 'Default pagination size (Entries per page)'), 'paginationSize' => Yii::t('AdminModule.settings', 'Default pagination size (Entries per page)'),
'displayNameFormat' => Yii::t('AdminModule.settings', 'User Display Name'), 'displayNameFormat' => Yii::t('AdminModule.settings', 'User Display Name'),
'displayNameSubFormat' => Yii::t('AdminModule.settings', 'User Display Name Subtitle'), 'displayNameSubFormat' => Yii::t('AdminModule.settings', 'User Display Name Subtitle'),
'spaceOrder' => Yii::t('AdminModule.settings', 'Dropdown space order'), 'spaceOrder' => Yii::t('AdminModule.settings', '"My Spaces" Sorting'),
'logo' => Yii::t('AdminModule.settings', 'Logo upload'), 'logo' => Yii::t('AdminModule.settings', 'Logo upload'),
'icon' => Yii::t('AdminModule.settings', 'Icon upload'), 'icon' => Yii::t('AdminModule.settings', 'Icon upload'),
'dateInputDisplayFormat' => Yii::t('AdminModule.settings', 'Date input format'), 'dateInputDisplayFormat' => Yii::t('AdminModule.settings', 'Date input format'),
@ -93,6 +93,15 @@ class DesignSettingsForm extends Model
]; ];
} }
/**
* @inerhitdoc
*/
public function attributeHints()
{
return [
'spaceOrder' => Yii::t('AdminModule.settings', 'Custom sort order can be defined in the Space advanced settings.'),
];
}
/** /**
* @inheritdoc * @inheritdoc

View File

@ -2,9 +2,9 @@
use humhub\libs\LogoImage; use humhub\libs\LogoImage;
use humhub\modules\admin\models\forms\DesignSettingsForm; use humhub\modules\admin\models\forms\DesignSettingsForm;
use humhub\modules\ui\form\widgets\ActiveForm;
use humhub\modules\web\pwa\widgets\SiteIcon; use humhub\modules\web\pwa\widgets\SiteIcon;
use humhub\widgets\Button; use humhub\widgets\Button;
use humhub\modules\ui\form\widgets\ActiveForm;
use yii\helpers\Html; use yii\helpers\Html;
use yii\helpers\Url; use yii\helpers\Url;
@ -51,7 +51,10 @@ $iconUrl = SiteIcon::getUrl(140);
</div> </div>
<?= $form->field($model, 'spaceOrder')->dropDownList(['0' => Yii::t('AdminModule.settings', 'Alphabetical'), '1' => Yii::t('AdminModule.settings', 'Last visit')]); ?> <?= $form->field($model, 'spaceOrder')->dropDownList([
'0' => Yii::t('AdminModule.settings', 'Custom sort order (alphabetical if not defined)'),
'1' => Yii::t('AdminModule.settings', 'Last visit'),
]); ?>
<?= $form->field($model, 'defaultStreamSort')->dropDownList($model->getDefaultStreamSortOptions()); ?> <?= $form->field($model, 'defaultStreamSort')->dropDownList($model->getDefaultStreamSortOptions()); ?>