aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-06-01 03:43:11 -0700
committerzotlabs <mike@macgirvin.com>2018-06-01 03:43:11 -0700
commita6ab3dd36a78adbdd67ae9e7e25a3281cbcf9a58 (patch)
treee775eb73e1e5e5440b55a4e7dc0288a6b1689ce0 /Zotlabs
parent4df5d44ef9792b04a2653c92cba49a2fa69656ac (diff)
parent6bf0f4225c0fc7ecc1762ed5cfe2c4861cd1bd4e (diff)
downloadvolse-hubzilla-a6ab3dd36a78adbdd67ae9e7e25a3281cbcf9a58.tar.gz
volse-hubzilla-a6ab3dd36a78adbdd67ae9e7e25a3281cbcf9a58.tar.bz2
volse-hubzilla-a6ab3dd36a78adbdd67ae9e7e25a3281cbcf9a58.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Widget/Activity_filter.php65
-rw-r--r--Zotlabs/Widget/Activity_order.php16
2 files changed, 54 insertions, 27 deletions
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 6ed1748ae..b9c68da30 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -17,7 +17,7 @@ class Activity_filter {
if(feature_enabled(local_channel(),'personal_tab')) {
if(x($_GET,'conv')) {
$conv_active = (($_GET['conv'] == 1) ? 'active' : '');
- $filter_active = true;
+ $filter_active = 'personal';
}
$tabs[] = [
@@ -32,7 +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;
+ $filter_active = 'star';
}
$tabs[] = [
@@ -53,17 +53,26 @@ class Activity_filter {
foreach($groups as $g) {
if(x($_GET,'gid')) {
$group_active = (($_GET['gid'] == $g['id']) ? 'active' : '');
- $filter_active = true;
+ $filter_active = 'group';
}
-
- $tabs[] = [
+ $gsub[] = [
'label' => $g['gname'],
- 'icon' => 'users',
+ 'icon' => '',
'url' => z_root() . '/' . $cmd . '/?f=&gid=' . $g['id'],
'sel' => $group_active,
'title' => sprintf(t('Show posts related to the %s privacy group'), $g['gname']),
];
}
+ $tabs[] = [
+ 'id' => 'privacy_groups',
+ 'label' => t('Privacy Groups'),
+ 'icon' => 'users',
+ 'url' => '#',
+ 'sel' => (($filter_active == 'group') ? true : false),
+ 'title' => sprintf(t('Show posts that i have filed to %s'), $t['term']),
+ 'sub' => $gsub
+
+ ];
}
}
@@ -77,50 +86,64 @@ class Activity_filter {
foreach($terms as $t) {
if(x($_GET,'file')) {
$file_active = (($_GET['file'] == $t['term']) ? 'active' : '');
- $filter_active = true;
+ $filter_active = 'file';
}
-
- $tabs[] = [
+ $tsub[] = [
'label' => $t['term'],
- 'icon' => 'folder',
+ 'icon' => '',
'url' => z_root() . '/' . $cmd . '/?f=&file=' . $t['term'],
'sel' => $file_active,
- 'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']),
+ 'title' => '',
];
}
+
+ $tabs[] = [
+ 'label' => t('Saved Folders'),
+ 'icon' => 'folder',
+ 'url' => '#',
+ 'sel' => (($filter_active == 'file') ? true : false),
+ 'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']),
+ 'sub' => $tsub
+
+ ];
}
}
if(x($_GET,'search')) {
- $filter_active = true;
+ $filter_active = 'search';
}
+ $reset = [];
if($filter_active) {
$reset = [
- 'label' => t('Remove Filter'),
+ 'label' => '',
'icon' => 'remove',
'url'=> z_root() . '/' . $cmd,
- 'sel'=> 'active bg-danger',
+ 'sel'=> '',
'title' => t('Remove active filter'),
];
- array_unshift($tabs, $reset);
}
$arr = ['tabs' => $tabs];
call_hooks('network_tabs', $arr);
- $tpl = get_markup_template('common_pills.tpl');
+ $o = '';
if($arr['tabs']) {
- return replace_macros($tpl, [
+ $content = replace_macros(get_markup_template('common_pills.tpl'), [
+ '$pills' => $arr['tabs'],
+ ]);
+
+ $o .= replace_macros(get_markup_template('activity_filter_widget.tpl'), [
'$title' => t('Activity Filters'),
- '$tabs' => $arr['tabs'],
+ '$reset' => $reset,
+ '$content' => $content,
]);
}
- else {
- return '';
- }
+
+ return $o;
+
}
}
diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php
index 10ec142d9..93bfc5a26 100644
--- a/Zotlabs/Widget/Activity_order.php
+++ b/Zotlabs/Widget/Activity_order.php
@@ -105,17 +105,21 @@ class Activity_order {
call_hooks('network_tabs', $arr);
- $tpl = get_markup_template('common_pills.tpl');
+ $o = '';
if($arr['tabs']) {
- return replace_macros($tpl, [
+ $content = replace_macros(get_markup_template('common_pills.tpl'), [
+ '$pills' => $arr['tabs'],
+ ]);
+
+ $o = replace_macros(get_markup_template('common_widget.tpl'), [
'$title' => t('Activity Order'),
- '$tabs' => $arr['tabs'],
+ '$content' => $content,
]);
}
- else {
- return '';
- }
+
+ return $o;
+
}
}