From 6a679d26ce1c2947e49c74f3b6a98a7ad770b325 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Sat, 27 Dec 2014 13:36:05 +0100 Subject: Fix #771, add tooltips to mail and intros count in channel manager, always show counts (even when 0, makes it easier to understand what the icons are) --- mod/manage.php | 4 +++- view/tpl/channel.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/manage.php b/mod/manage.php index 00c6db7f0..28fa8e658 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -49,7 +49,7 @@ function manage_content(&$a) { 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]; + $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'; @@ -153,6 +153,8 @@ function manage_content(&$a) { '$msg_make_default' => t('Make Default'), '$links' => $links, '$all_channels' => $channels, + '$mail_format' => t('%d new messages'), + '$intros_format' => t('%d new introductions'), '$channel_usage_message' => $channel_usage_message, )); diff --git a/view/tpl/channel.tpl b/view/tpl/channel.tpl index 55b122d9b..984421eec 100755 --- a/view/tpl/channel.tpl +++ b/view/tpl/channel.tpl @@ -7,7 +7,7 @@ {{/if}} {{/if}} {{$channel.channel_name}} -
{{if $channel.mail != 0}} {{$channel.mail}}{{else}}  {{/if}} {{if $channel.intros != 0}} {{$channel.intros}}{{else}}  {{/if}}
+
{{$channel.mail}}  {{$channel.intros}}
{{$channel.channel_name}}
-- cgit v1.2.3 From 40a327b68fe1bb37bbc2fc6bc1c6d761ee564898 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Sat, 27 Dec 2014 14:06:09 +0100 Subject: Allow quick access to mail and connections from Channel Manager --- mod/manage.php | 9 +++++++-- view/tpl/channel.tpl | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mod/manage.php b/mod/manage.php index 28fa8e658..21327a120 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -28,8 +28,13 @@ function manage_content(&$a) { if($change_channel) { $r = change_channel($change_channel); - if($r && $r['channel_startpage']) - goaway(z_root() . '/' . $r['channel_startpage']); + if((argc() > 2) && !(argv(2) === 'default')) { + goaway(z_root() . '/' . implode('/',array_slice($a->argv,2))); // Go to whatever is after /manage/, but with the new channel + } + else { + if($r && $r['channel_startpage']) + goaway(z_root() . '/' . $r['channel_startpage']); // If nothing extra is specified, go to the default page + } goaway(z_root()); } diff --git a/view/tpl/channel.tpl b/view/tpl/channel.tpl index 984421eec..c151ba8b2 100755 --- a/view/tpl/channel.tpl +++ b/view/tpl/channel.tpl @@ -7,7 +7,7 @@ {{/if}} {{/if}} {{$channel.channel_name}} -
{{$channel.mail}}  {{$channel.intros}}
+
{{$channel.channel_name}}
-- cgit v1.2.3