]> git.mxchange.org Git - friendica.git/commitdiff
Changed to radio buttons
authorMichael <heluecht@pirati.ca>
Fri, 15 Sep 2023 17:40:14 +0000 (17:40 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 15 Sep 2023 17:40:14 +0000 (17:40 +0000)
src/Module/Contact/Profile.php
view/templates/contact_edit.tpl
view/theme/frio/templates/contact_edit.tpl

index 7fa64cdceeb4a1afe7f2565bdf7f353d13d28afb..a2b6bc905815b6ef9d254ebe5aae5a4e093d8993 100644 (file)
@@ -446,7 +446,13 @@ class Profile extends BaseModule
                                $this->t('Depending on the type of the channel not all posts from contacts are displayed by default. They for example need to have a certain amount of comments to be displayed. On the other hand there can be contacts who flood the channel, so you might want to see only some of their posts. Or you don\'t want to see their content at all, but you don\'t want to block or hide the contact completely.'),
                                $channel_visibilities
                        ],
-               ]);
+                       '$visibility_label'       => $this->t('Visibility of this contact in appropriate channels'),
+                       '$visibility_description' => $this->t('Depending on the type of the channel not all posts from contacts are displayed by default. They for example need to have a certain amount of comments to be displayed. On the other hand there can be contacts who flood the channel, so you might want to see only some of their posts. Or you don\'t want to see their content at all, but you don\'t want to block or hide the contact completely.'),
+                       '$visibility_default'     => ['channel_visibility', $this->t('Default visibility'), Contact\User::VISIBILITY_DEFAULT, $this->t('When activated, posts by this contact are displayed in the "for you" channel, if either you interact often with this contact or if a post reached some level of interaction.'), $channel_visibility == Contact\User::VISIBILITY_DEFAULT],
+                       '$visibility_always'      => ['channel_visibility', $this->t('Display all posts of this contact'), Contact\User::VISIBILITY_ALWAYS, $this->t('If you follow this contact, then every post of this contact will appear on the "for you" channel'), $channel_visibility == Contact\User::VISIBILITY_ALWAYS],
+                       '$visibility_reduced'     => ['channel_visibility', $this->t('Display only few posts'), Contact\User::VISIBILITY_REDUCED, $this->t('When a contact creates a lot of posts in a short period, this setting reduces the number of displayed posts in every channel.'), $channel_visibility == Contact\User::VISIBILITY_REDUCED],
+                       '$visibility_never'       => ['channel_visibility', $this->t('Never display posts from this contact'), Contact\User::VISIBILITY_NEVER, $this->t('Posts from this contact will never be displayed in any channel'), $channel_visibility == Contact\User::VISIBILITY_NEVER],
+       ]);
 
                $arr = ['contact' => $contact, 'output' => $o];
 
index e997dcb2c7f701a88a2adf168935f9396eeb11cd..f17743f7652ca92b67618330971e553bde18d159 100644 (file)
                        {{/if}}
                        {{if $channel_settings_label}}
                                <h4>{{$channel_settings_label}}</h4>
-                               {{include file="field_select.tpl" field=$channel_visibility}}
+                               <label>{{$visibility_label}}</label>
+                               {{include file="field_radio.tpl" field=$visibility_default}}
+                               {{include file="field_radio.tpl" field=$visibility_always}}
+                               {{include file="field_radio.tpl" field=$visibility_reduced}}
+                               {{include file="field_radio.tpl" field=$visibility_never}}
+                               <p>{{$visibility_description}}</p>
                        {{/if}}
 
                        </div>
index ab40bde678b67b010212718d53e22ea178683c22..c9f8423602f8c707d06e33a75f636c94cf84a4d6 100644 (file)
                                                        <div id="contact-edit-channel-collapse" class="panel-body panel-collapse collapse" role="tabpanel" aria-labelledby="contact-edit-channel">
                                                                <div class="section-content-tools-wrapper">
        
-                                                                       {{include file="field_select.tpl" field=$channel_visibility}}
-       
+                                                                       <label>{{$visibility_label}}</label>
+                                                                       {{include file="field_radio.tpl" field=$visibility_default}}
+                                                                       {{include file="field_radio.tpl" field=$visibility_always}}
+                                                                       {{include file="field_radio.tpl" field=$visibility_reduced}}
+                                                                       {{include file="field_radio.tpl" field=$visibility_never}}
+                                                                       <p>{{$visibility_description}}</p>
+
                                                                        <div class="pull-right settings-submit-wrapper">
                                                                                <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
                                                                        </div>