Upgrade to 3.7.0

This commit is contained in:
Bastian Allgeier
2022-06-27 10:02:22 +02:00
parent 0751a6510d
commit 1c22148d7b
674 changed files with 5052 additions and 3082 deletions

17
kirby/src/Panel/User.php Normal file → Executable file
View File

@@ -2,6 +2,9 @@
namespace Kirby\Panel;
use Kirby\Cms\Url;
use Kirby\Toolkit\I18n;
/**
* Provides information about the user model for the Panel
* @since 3.6.0
@@ -51,7 +54,7 @@ class User extends Model
$result[] = [
'dialog' => $url . '/changeName',
'icon' => 'title',
'text' => t($i18nPrefix . '.changeName'),
'text' => I18n::translate($i18nPrefix . '.changeName'),
'disabled' => $this->isDisabledDropdownOption('changeName', $options, $permissions)
];
@@ -60,28 +63,28 @@ class User extends Model
$result[] = [
'dialog' => $url . '/changeEmail',
'icon' => 'email',
'text' => t('user.changeEmail'),
'text' => I18n::translate('user.changeEmail'),
'disabled' => $this->isDisabledDropdownOption('changeEmail', $options, $permissions)
];
$result[] = [
'dialog' => $url . '/changeRole',
'icon' => 'bolt',
'text' => t('user.changeRole'),
'text' => I18n::translate('user.changeRole'),
'disabled' => $this->isDisabledDropdownOption('changeRole', $options, $permissions)
];
$result[] = [
'dialog' => $url . '/changePassword',
'icon' => 'key',
'text' => t('user.changePassword'),
'text' => I18n::translate('user.changePassword'),
'disabled' => $this->isDisabledDropdownOption('changePassword', $options, $permissions)
];
$result[] = [
'dialog' => $url . '/changeLanguage',
'icon' => 'globe',
'text' => t('user.changeLanguage'),
'text' => I18n::translate('user.changeLanguage'),
'disabled' => $this->isDisabledDropdownOption('changeLanguage', $options, $permissions)
];
@@ -90,7 +93,7 @@ class User extends Model
$result[] = [
'dialog' => $url . '/delete',
'icon' => 'trash',
'text' => t($i18nPrefix . '.delete'),
'text' => I18n::translate($i18nPrefix . '.delete'),
'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions)
];
@@ -119,7 +122,7 @@ class User extends Model
{
if ($home = ($this->model->blueprint()->home() ?? null)) {
$url = $this->model->toString($home);
return url($url);
return Url::to($url);
}
return Panel::url('site');