From e69e59d260c311ceae4cbde3239c33d8caea4553 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 29 Dec 2014 22:07:40 +0100 Subject: Don't show current channel separately in channel manager, highlight it instead --- mod/manage.php | 7 ++----- view/css/mod_manage.css | 30 +++++++++++------------------- view/tpl/channel.tpl | 4 +--- view/tpl/channels.tpl | 8 -------- 4 files changed, 14 insertions(+), 35 deletions(-) diff --git a/mod/manage.php b/mod/manage.php index 21327a120..b0de945bf 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -46,15 +46,12 @@ function manage_content(&$a) { intval(PAGE_REMOVED) ); - $selected_channel = null; $account = get_app()->get_account(); if($r && count($r)) { $channels = $r; for($x = 0; $x < count($channels); $x ++) { $channels[$x]['link'] = 'manage/' . intval($channels[$x]['channel_id']); - if($channels[$x]['channel_id'] == local_user()) - $selected_channel = &$channels[$x]; // Needs to be a reference! $channels[$x]['default'] = (($channels[$x]['channel_id'] == $account['account_default_channel']) ? "1" : ''); $channels[$x]['default_links'] = '1'; @@ -152,8 +149,8 @@ function manage_content(&$a) { $o = replace_macros(get_markup_template('channels.tpl'), array( '$header' => t('Channel Manager'), '$msg_selected' => t('Current Channel'), - '$selected' => $selected_channel, - '$desc' => t('Attach to one of your channels by selecting it.'), + '$selected' => local_user(), + '$desc' => t('Switch to one of your channels by selecting it.'), '$msg_default' => t('Default Channel'), '$msg_make_default' => t('Make Default'), '$links' => $links, diff --git a/view/css/mod_manage.css b/view/css/mod_manage.css index 161b46757..bb7ef566d 100644 --- a/view/css/mod_manage.css +++ b/view/css/mod_manage.css @@ -1,7 +1,6 @@ #channels-selected { color: #666666; font-size: 0.8em; - } #channels-desc { @@ -14,33 +13,23 @@ .channels-break { margin-bottom: 15px; } -#selected-channel { - float: left; - margin-left: 0; -} - -.channels-end.selected { - clear: both; -} - -#selected-channel .channel-selection { - clear: both; - margin: 0 auto 0 auto; -} .channel-selection-default { font-size: 0.8em; margin-bottom: 10px; } -#all-channels .channel-selection { +.channel-selection { width: 12em; height: 16em; float: left; - margin: 0 15px 15px 0; + text-align: center; } -.channels-end { - clear: both; + +.channel-selection img { + display: block; + margin-left: auto; + margin-right: auto; } .channel-selection-name-link { @@ -50,7 +39,6 @@ .channel-selection-name-link .channel-name { padding-top: 10px; - text-align: left; word-wrap: break-word; overflow: hidden; } @@ -59,3 +47,7 @@ clear: both; padding-top: 10px; } + +.selected-channel img { + border: 2px solid #ff0000; +} diff --git a/view/tpl/channel.tpl b/view/tpl/channel.tpl index c151ba8b2..af80e7b4d 100755 --- a/view/tpl/channel.tpl +++ b/view/tpl/channel.tpl @@ -1,4 +1,4 @@ -
+
{{if $channel.default_links}} {{if $channel.default}}
{{$msg_default}}
@@ -10,5 +10,3 @@
{{$channel.channel_name}}
- -
diff --git a/view/tpl/channels.tpl b/view/tpl/channels.tpl index 0dec68a53..26d0e14d2 100755 --- a/view/tpl/channels.tpl +++ b/view/tpl/channels.tpl @@ -13,14 +13,6 @@ {{$channel_usage_message}}
{{/if}} -{{if $selected}} -
-
{{$msg_selected}}
-{{include file="channel.tpl" channel=$selected}} -
-
-{{/if}} -
{{$desc}}
-- cgit v1.2.3