From 4be4498b138648d269c7371896e5fe49c1116a2a Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 24 Jul 2021 18:57:29 +0200 Subject: [PATCH] Update UX for Storage administration --- src/Module/Admin/Storage.php | 7 +++++-- view/templates/admin/storage.tpl | 20 +++++++++++++++----- view/theme/frio/templates/admin/storage.tpl | 18 ++++++++++++++---- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/Module/Admin/Storage.php b/src/Module/Admin/Storage.php index c74259c6e5..a8f0b59250 100644 --- a/src/Module/Admin/Storage.php +++ b/src/Module/Admin/Storage.php @@ -116,6 +116,7 @@ class Storage extends BaseAdmin 'name' => $name, 'prefix' => $storage_form_prefix, 'form' => $storage_form, + 'active' => $name === $current_storage_backend::getName(), ]; } @@ -125,8 +126,10 @@ class Storage extends BaseAdmin '$title' => DI::l10n()->t('Administration'), '$page' => DI::l10n()->t('Storage'), '$save' => DI::l10n()->t('Save'), - '$save_set' => DI::l10n()->t('Save & Activate'), - '$clear' => DI::l10n()->t('Clear'), + '$save_activate' => DI::l10n()->t('Save & Activate'), + '$activate' => DI::l10n()->t('Activate'), + '$save_reload' => DI::l10n()->t('Save & Reload'), + '$noconfig' => DI::l10n()->t('This backend doesn\'t have custom settings'), '$baseurl' => DI::baseUrl()->get(true), '$form_security_token' => self::getFormSecurityToken("admin_storage"), '$storagebackend' => $current_storage_backend, diff --git a/view/templates/admin/storage.tpl b/view/templates/admin/storage.tpl index bfe6511bf0..299ec8db46 100644 --- a/view/templates/admin/storage.tpl +++ b/view/templates/admin/storage.tpl @@ -9,14 +9,24 @@

{{$storage.name}}

- {{foreach from=$storage.form item=$field}} - {{include file=$field.field field=$field}} - {{/foreach}} + {{if $storage.form}} + {{foreach from=$storage.form item=$field}} + {{include file=$field.field field=$field}} + {{/foreach}} + {{else}} + {{$noconfig}} + {{/if}} {{if $storage.form}} -
+ + {{if $storage.active}} + + {{else}} + + {{/if}} + {{else}} +
{{/if}} -
{{/foreach}} diff --git a/view/theme/frio/templates/admin/storage.tpl b/view/theme/frio/templates/admin/storage.tpl index 0827c06acf..7607a08485 100644 --- a/view/theme/frio/templates/admin/storage.tpl +++ b/view/theme/frio/templates/admin/storage.tpl @@ -22,15 +22,25 @@
- {{foreach from=$storage.form item=$field}} - {{include file=$field.field field=$field}} - {{/foreach}} + {{if $storage.form}} + {{foreach from=$storage.form item=$field}} + {{include file=$field.field field=$field}} + {{/foreach}} + {{else}} + {{$noconfig}} + {{/if}}