only explain how to select a channel if there are channels to select

This commit is contained in:
Mario 2018-09-23 20:54:36 +02:00
parent 9b7c6e96f7
commit e735220691
2 changed files with 4 additions and 2 deletions

View File

@ -129,7 +129,7 @@ class Manage extends \Zotlabs\Web\Controller {
} }
} }
$r = q("select count(channel_id) as total from channel where channel_account_id = %d and channel_removed = 0", $r = q("select count(channel_id) as total from channel where channel_account_id = %d and channel_removed = 0",
intval(get_account_id()) intval(get_account_id())
); );
@ -170,7 +170,7 @@ class Manage extends \Zotlabs\Web\Controller {
'$header' => t('Channel Manager'), '$header' => t('Channel Manager'),
'$msg_selected' => t('Current Channel'), '$msg_selected' => t('Current Channel'),
'$selected' => local_channel(), '$selected' => local_channel(),
'$desc' => t('Switch to one of your channels by selecting it.'), '$desc' => ((count($channels) > 1 || $delegates) ? t('Switch to one of your channels by selecting it.') : ''),
'$msg_default' => t('Default Channel'), '$msg_default' => t('Default Channel'),
'$msg_make_default' => t('Make Default'), '$msg_make_default' => t('Make Default'),
'$create' => $create, '$create' => $create,

View File

@ -9,9 +9,11 @@
{{$channel_usage_message}} {{$channel_usage_message}}
</div> </div>
{{/if}} {{/if}}
{{if $desc}}
<div id="channels-desc" class="section-content-info-wrapper"> <div id="channels-desc" class="section-content-info-wrapper">
{{$desc}} {{$desc}}
</div> </div>
{{/if}}
{{foreach $all_channels as $chn}} {{foreach $all_channels as $chn}}
{{include file="channel.tpl" channel=$chn}} {{include file="channel.tpl" channel=$chn}}
{{/foreach}} {{/foreach}}