From: Michael Date: Sat, 16 Dec 2023 21:43:01 +0000 (+0000) Subject: Frio: Improved user defined channel page X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=62386e4c9e43537b6b2122b95bee61587c6b490e;p=friendica.git Frio: Improved user defined channel page --- diff --git a/src/Module/Settings/Channels.php b/src/Module/Settings/Channels.php index 5c638c8508..2595a84372 100644 --- a/src/Module/Settings/Channels.php +++ b/src/Module/Settings/Channels.php @@ -125,9 +125,11 @@ class Channels extends BaseSettings $circles[$circle['id']] = $circle['name']; } - $blocklistform = []; + $id = 0; + $channels = []; foreach ($this->channel->selectByUid($uid) as $channel) { - $blocklistform[] = [ + $channels[] = [ + 'id' => ++$id, 'label' => ["label[$channel->code]", $this->t('Label'), $channel->label, '', $this->t('Required')], 'description' => ["description[$channel->code]", $this->t("Description"), $channel->description], 'access_key' => ["access_key[$channel->code]", $this->t("Access Key"), $channel->accessKey], @@ -166,7 +168,7 @@ class Channels extends BaseSettings 'delentry' => $this->t('Delete entry from the channel list'), 'confirm_delete' => $this->t('Delete entry from the channel list?'), ], - '$entries' => $blocklistform, + '$entries' => $channels, '$baseurl' => $this->baseUrl, '$form_security_token' => self::getFormSecurityToken('settings_channels'), diff --git a/view/theme/frio/templates/settings/channels.tpl b/view/theme/frio/templates/settings/channels.tpl new file mode 100644 index 0000000000..d4ef83fb43 --- /dev/null +++ b/view/theme/frio/templates/settings/channels.tpl @@ -0,0 +1,64 @@ +
+

{{$l10n.title}}

+

{{$l10n.intro}}

+
+
+ +
+ + {{include file="field_input.tpl" field=$label}} + {{include file="field_input.tpl" field=$description}} + {{include file="field_input.tpl" field=$access_key}} + {{include file="field_select.tpl" field=$circle}} + {{include file="field_textarea.tpl" field=$include_tags}} + {{include file="field_textarea.tpl" field=$exclude_tags}} + {{include file="field_textarea.tpl" field=$text_search}} + {{include file="field_checkbox.tpl" field=$image}} + {{include file="field_checkbox.tpl" field=$video}} + {{include file="field_checkbox.tpl" field=$audio}} +
+ +
+
+
+ + {{if $entries}} +
+ + {{foreach $entries as $e}} +
+ +
+ {{include file="field_input.tpl" field=$e.label}} + {{include file="field_input.tpl" field=$e.description}} + {{include file="field_input.tpl" field=$e.access_key}} + {{include file="field_select.tpl" field=$e.circle}} + {{include file="field_textarea.tpl" field=$e.include_tags}} + {{include file="field_textarea.tpl" field=$e.exclude_tags}} + {{include file="field_textarea.tpl" field=$e.text_search}} + {{include file="field_checkbox.tpl" field=$e.image}} + {{include file="field_checkbox.tpl" field=$e.video}} + {{include file="field_checkbox.tpl" field=$e.audio}} + {{include file="field_checkbox.tpl" field=$e.delete}} +
+ +
+
+
+ {{/foreach}} + {{/if}} +
+
+