]> git.mxchange.org Git - friendica.git/commitdiff
Reworked expiration settings
authorMichael <heluecht@pirati.ca>
Sun, 16 Feb 2020 20:44:55 +0000 (20:44 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 16 Feb 2020 20:44:55 +0000 (20:44 +0000)
mod/settings.php
view/templates/settings/settings.tpl
view/theme/frio/templates/settings/settings.tpl

index 061e83fe0da55b87225599859f9a937bb99fcec5..89434e5583f92cda16b83cf76ae559112887ece3 100644 (file)
@@ -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']);
index 511dfdcb3d53399a46434fb5c1d662cfbe1883a4..3a847651dcb576bb58bf8ebfee271b64d228d3ab 100644 (file)
 
 {{$unkmail nofilter}}
 
-
 {{include file="field_input.tpl" field=$cntunkmail}}
 
-{{include file="field_input.tpl" field=$expire.days}}
-
-
-<div class="field input">
-       <span class="field_help"><a href="#advanced-expire-popup" id="advanced-expire" class='popupbox' title="{{$expire.advanced}}">{{$expire.label}}</a></span>
-       <div style="display: none;">
-               <div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
-                       <h3>{{$expire.advanced}}</h3>
-                       {{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}}
-               </div>
-       </div>
-
-</div>
-
-
 <div id="settings-default-perms" class="settings-default-perms" >
        <a href="#profile-jot-acl-wrapper" id="settings-default-perms-menu" class='popupbox'>{{$permissions}} {{$permdesc}}</a>
        <div id="settings-default-perms-menu-end"></div>
 <div id="settings-default-perms-end"></div>
 
 {{$group_select nofilter}}
-
-
 <div class="settings-submit-wrapper" >
 <input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
 </div>
 </div>
 
+<h3 class="settings-heading"><a href="javascript:;">{{$expire.label}}</a></h3>
+<div class="settings-content-block">
+<div id="settings-expiry">
+{{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}}
 
-
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
+</div>
+</div>
+</div>
 
 <h3 class="settings-heading"><a href="javascript:;">{{$h_not}}</a></h3>
 <div class="settings-content-block">
 </div>
 </div>
 
-
 <h3 class="settings-heading"><a href="javascript:;">{{$h_advn}}</a></h3>
 <div class="settings-content-block">
 <div id="settings-pagetype-desc">{{$h_descadvn}}</div>
 <input type="submit" name="resend_relocate" class="settings-submit" value="{{$relocate_button}}" />
 </div>
 </div>
-
-
-
index 1b8481155736ad1f00ce6bd6d004eb7aa827d5ac..87f76f946536f41c777b8e1e8895604dcb30d92f 100644 (file)
 
                                                {{include file="field_input.tpl" field=$cntunkmail}}
 
-                                               {{include file="field_input.tpl" field=$expire.days}}
-
-                                               <div id="settings-advanced-expire">
-                                                       <a id="advanced-expire-menu" title="{{$expire.advanced}}" data-toggle="modal" data-target="#aeModal">{{$expire.label}}</a>
-
-                                                       {{* The modal for advanced-expire *}}
-                                                       <div class="modal" id="aeModal">
-                                                               <div class="modal-dialog">
-                                                                       <div class="modal-content">
-                                                                               <div class="modal-header">
-                                                                                       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-                                                                                       <h4 class="modal-title">{{$expire.advanced}}</h4>
-                                                                               </div>
-                                                                               <div class="modal-body">
-                                                                                       {{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}}
-                                                                               </div>
-                                                                       </div>
-                                                               </div>
-                                                       </div>
-                                               </div>
-
                                                {{* Block for setting default permissions *}}
                                                <div id="settings-default-perms" class="settings-default-perms">
                                                        <a id="settings-default-perms-menu" class="settings-default-perms" data-toggle="modal" data-target="#aclModal">{{$permissions}} {{$permdesc}}</a>
                                                        </div>
                                                </div>
                                                <br/>
-                                               <div class="clear"></div>
 
                                                {{$group_select nofilter}}
 
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+
+                                       </div>
+                               </div>
+                       </div>
+
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="expire-settings">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#expire-settings-collapse" aria-expanded="false" aria-controls="expire-settings-collapse">
+                                                       {{$expire.label}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="expire-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="expire-settings">
+                                       <div class="section-content-tools-wrapper">
+
+                                               {{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}}
+
                                                <div class="form-group pull-right settings-submit-wrapper" >
                                                        <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
                                                </div>