diff options
author | zotlabs <mike@macgirvin.com> | 2018-05-31 22:25:01 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-05-31 22:25:01 -0700 |
commit | 4df5d44ef9792b04a2653c92cba49a2fa69656ac (patch) | |
tree | 9717f82e7ccc8f19ed09bf3a958dbbdfd028eac4 /Zotlabs | |
parent | dd962027cce033b6bcdef7a2fef7b946a9f67a20 (diff) | |
parent | d03c27d18c10d287cbfd3133b3301934d0457636 (diff) | |
download | volse-hubzilla-4df5d44ef9792b04a2653c92cba49a2fa69656ac.tar.gz volse-hubzilla-4df5d44ef9792b04a2653c92cba49a2fa69656ac.tar.bz2 volse-hubzilla-4df5d44ef9792b04a2653c92cba49a2fa69656ac.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Widget/Activity_filter.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 40f294fa5..6ed1748ae 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -10,12 +10,14 @@ class Activity_filter { return ''; $cmd = \App::$cmd; + $filter_active = false; $tabs = []; if(feature_enabled(local_channel(),'personal_tab')) { if(x($_GET,'conv')) { $conv_active = (($_GET['conv'] == 1) ? 'active' : ''); + $filter_active = true; } $tabs[] = [ @@ -30,6 +32,7 @@ class Activity_filter { if(feature_enabled(local_channel(),'star_posts')) { if(x($_GET,'star')) { $starred_active = (($_GET['star'] == 1) ? 'active' : ''); + $filter_active = true; } $tabs[] = [ @@ -50,6 +53,7 @@ class Activity_filter { foreach($groups as $g) { if(x($_GET,'gid')) { $group_active = (($_GET['gid'] == $g['id']) ? 'active' : ''); + $filter_active = true; } $tabs[] = [ @@ -73,6 +77,7 @@ class Activity_filter { foreach($terms as $t) { if(x($_GET,'file')) { $file_active = (($_GET['file'] == $t['term']) ? 'active' : ''); + $filter_active = true; } $tabs[] = [ @@ -86,6 +91,21 @@ class Activity_filter { } } + if(x($_GET,'search')) { + $filter_active = true; + } + + if($filter_active) { + $reset = [ + 'label' => t('Remove Filter'), + 'icon' => 'remove', + 'url'=> z_root() . '/' . $cmd, + 'sel'=> 'active bg-danger', + 'title' => t('Remove active filter'), + ]; + array_unshift($tabs, $reset); + } + $arr = ['tabs' => $tabs]; call_hooks('network_tabs', $arr); |