From 101251668cd45dfd0eb2f355959a1a356c64fbdd Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 16 Feb 2020 20:44:55 +0000 Subject: [PATCH] Reworked expiration settings --- mod/settings.php | 13 +++-- view/templates/settings/settings.tpl | 39 +++++--------- .../frio/templates/settings/settings.tpl | 52 ++++++++++--------- 3 files changed, 46 insertions(+), 58 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index 061e83fe0d..89434e5583 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1151,13 +1151,12 @@ function settings_content(App $a) $expire_arr = [ 'days' => ['expire', DI::l10n()->t("Automatically expire posts after this many days:"), $expire, DI::l10n()->t('If empty, posts will not expire. Expired posts will be deleted')], - 'advanced' => DI::l10n()->t('Advanced expiration settings'), - 'label' => DI::l10n()->t('Advanced Expiration'), - 'items' => ['expire_items', DI::l10n()->t("Expire posts:"), $expire_items], - 'notes' => ['expire_notes', DI::l10n()->t("Expire personal notes:"), $expire_notes], - 'starred' => ['expire_starred', DI::l10n()->t("Expire starred posts:"), $expire_starred], - 'photos' => ['expire_photos', DI::l10n()->t("Expire photos:"), $expire_photos], - 'network_only' => ['expire_network_only', DI::l10n()->t("Only expire posts by others:"), $expire_network_only], + 'label' => DI::l10n()->t('Expiration settings'), + 'items' => ['expire_items', DI::l10n()->t('Expire posts'), $expire_items, DI::l10n()->t('When activated, posts and comments will be expired.')], + 'notes' => ['expire_notes', DI::l10n()->t('Expire personal notes'), $expire_notes, DI::l10n()->t('When activated, the personal notes on your profile page will be expired.')], + 'starred' => ['expire_starred', DI::l10n()->t('Expire starred posts'), $expire_starred, DI::l10n()->t('Starring posts keeps them from being expired. That behaviour is overwritten by this setting.')], + 'photos' => ['expire_photos', DI::l10n()->t('Expire photos'), $expire_photos, DI::l10n()->t('When activated, photos will be expired.')], + 'network_only' => ['expire_network_only', DI::l10n()->t('Only expire posts by others'), $expire_network_only, DI::l10n()->t('When activated, your own posts never expire. Then the settings above are only valid for posts you received.')], ]; $group_select = Group::displayGroupSelection(local_user(), $a->user['def_gid']); diff --git a/view/templates/settings/settings.tpl b/view/templates/settings/settings.tpl index 511dfdcb3d..3a847651dc 100644 --- a/view/templates/settings/settings.tpl +++ b/view/templates/settings/settings.tpl @@ -61,27 +61,8 @@ {{$unkmail nofilter}} - {{include file="field_input.tpl" field=$cntunkmail}} -{{include file="field_input.tpl" field=$expire.days}} - - -
- {{$expire.label}} -
-
-

{{$expire.advanced}}

- {{include file="field_checkbox.tpl" field=$expire.items}} - {{include file="field_checkbox.tpl" field=$expire.notes}} - {{include file="field_checkbox.tpl" field=$expire.starred}} - {{include file="field_checkbox.tpl" field=$expire.network_only}} -
-
- -
- -
{{$permissions}} {{$permdesc}}
@@ -100,15 +81,25 @@
{{$group_select nofilter}} - -
+

{{$expire.label}}

+
+
+{{include file="field_input.tpl" field=$expire.days}} +{{include file="field_checkbox.tpl" field=$expire.items}} +{{include file="field_checkbox.tpl" field=$expire.notes}} +{{include file="field_checkbox.tpl" field=$expire.starred}} +{{include file="field_checkbox.tpl" field=$expire.network_only}} - +
+ +
+
+

{{$h_not}}

@@ -171,7 +162,6 @@
-

{{$h_advn}}

{{$h_descadvn}}
@@ -202,6 +192,3 @@
- - - diff --git a/view/theme/frio/templates/settings/settings.tpl b/view/theme/frio/templates/settings/settings.tpl index 1b84811557..87f76f9465 100644 --- a/view/theme/frio/templates/settings/settings.tpl +++ b/view/theme/frio/templates/settings/settings.tpl @@ -99,30 +99,6 @@ {{include file="field_input.tpl" field=$cntunkmail}} - {{include file="field_input.tpl" field=$expire.days}} - -
- {{$expire.label}} - - {{* The modal for advanced-expire *}} - -
- {{* Block for setting default permissions *}}
{{$permissions}} {{$permdesc}} @@ -144,10 +120,36 @@

-
{{$group_select nofilter}} +
+ +
+
+ + + + + +
+ +
+
+ + {{include file="field_input.tpl" field=$expire.days}} + + {{include file="field_checkbox.tpl" field=$expire.items}} + {{include file="field_checkbox.tpl" field=$expire.notes}} + {{include file="field_checkbox.tpl" field=$expire.starred}} + {{include file="field_checkbox.tpl" field=$expire.network_only}} +