From e11e99b2d1e2d94417e9f9934b759c88a70177ac Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 24 Apr 2018 17:09:51 +0200 Subject: fix regression with forum widget unseen count --- Zotlabs/Widget/Forums.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index f65a639ff..7415c0f0a 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -66,8 +66,8 @@ class Forums { for($x = 0; $x < count($r1); $x ++) { $r = q("select sum(item_unseen) as unseen from item where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ", - dbesc($r1[$x]['xchan_hash']), - intval(local_channel()) + intval(local_channel()), + dbesc($r1[$x]['xchan_hash']) ); if($r) $r1[$x]['unseen'] = $r[0]['unseen']; -- cgit v1.2.3 From 7d3dfc3ed8d530cdf7e268b4e2fc4e815b4c5f79 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 30 Apr 2018 09:13:26 +0200 Subject: missing class --- Zotlabs/Widget/Tasklist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Tasklist.php b/Zotlabs/Widget/Tasklist.php index 3961eecce..56342bd17 100644 --- a/Zotlabs/Widget/Tasklist.php +++ b/Zotlabs/Widget/Tasklist.php @@ -21,7 +21,7 @@ class Tasklist { '; $o .= '
' . '

' . t('Tasks') . '

'; - $o .= '
'; + $o .= '
'; $o .= ''; return $o; -- cgit v1.2.3 From 179eeb10a6e1b661dc7788d74d60a7c11dfca6bf Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Tue, 15 May 2018 19:57:40 -0400 Subject: Rename Permission Groups to Permission Categories and clarify feature settings text. --- Zotlabs/Widget/Settings_menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Settings_menu.php b/Zotlabs/Widget/Settings_menu.php index 9574becc3..f35d6f147 100644 --- a/Zotlabs/Widget/Settings_menu.php +++ b/Zotlabs/Widget/Settings_menu.php @@ -105,7 +105,7 @@ class Settings_menu { if(feature_enabled(local_channel(),'permcats')) { $tabs[] = array( - 'label' => t('Permission Groups'), + 'label' => t('Permission Categories'), 'url' => z_root() . '/settings/permcats', 'selected' => ((argv(1) === 'permcats') ? 'active' : ''), ); -- cgit v1.2.3 From 8d6441704bdc8d0628149dbb32321b6921f097ba Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 30 May 2018 14:06:18 +0200 Subject: add widget files and templates --- Zotlabs/Widget/Activity_filter.php | 66 ++++++++++++++++++++++ Zotlabs/Widget/Activity_order.php | 111 +++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 Zotlabs/Widget/Activity_filter.php create mode 100644 Zotlabs/Widget/Activity_order.php (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php new file mode 100644 index 000000000..a60144239 --- /dev/null +++ b/Zotlabs/Widget/Activity_filter.php @@ -0,0 +1,66 @@ + t('Personal Posts'), + 'icon' => 'user-circle', + 'url' => z_root() . '/' . $cmd . '?f=' . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : '') . '&conv=1', + 'sel' => $conv_active, + 'title' => t('Posts that mention or involve you'), + ); + } + + if(feature_enabled(local_channel(),'star_posts')) { + $tabs[] = array( + 'label' => t('Starred Posts'), + 'icon' => 'star', + 'url'=>z_root() . '/' . $cmd . '/?f=' . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : '') . '&star=1', + 'sel'=>$starred_active, + 'title' => t('Favourite Posts'), + ); + } + + + $arr = ['tabs' => $tabs]; + + call_hooks('network_tabs', $arr); + + $tpl = get_markup_template('common_pills.tpl'); + + if($arr['tabs']) { + return replace_macros($tpl, [ + '$title' => t('Additional Filters'), + '$tabs' => $arr['tabs'], + ]); + } + else { + return ''; + } + } + +} diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php new file mode 100644 index 000000000..ba288965f --- /dev/null +++ b/Zotlabs/Widget/Activity_order.php @@ -0,0 +1,111 @@ + t('Commented Date'), + 'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . $filter, + 'sel'=> $commentord_active, + 'title' => t('Sort by Comment Date'), + ]; + $tabs[] = [ + 'label' => t('Posted Date'), + 'url'=>z_root() . '/' . $cmd . '?f=&order=post' . $filter, + 'sel'=> $postord_active, + 'title' => t('Sort by Post Date'), + ]; + $tabs[] = array( + 'label' => t('Date Unthreaded'), + 'url' => z_root() . '/' . $cmd . '?f=&order=unthreaded' . $filter, + 'sel' => $unthreaded_active, + 'title' => t('Activity Stream - by date'), + ); + + $arr = ['tabs' => $tabs]; + + call_hooks('network_tabs', $arr); + + $tpl = get_markup_template('common_pills.tpl'); + + if($arr['tabs']) { + return replace_macros($tpl, [ + '$title' => t('Order Activity by'), + '$tabs' => $arr['tabs'], + ]); + } + else { + return ''; + } + } + +} -- cgit v1.2.3 From 6349a7417f41cd697ba2dea82653911a1abaaf94 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 30 May 2018 22:40:22 +0200 Subject: make navbar search use the module search function in /network and /channel --- Zotlabs/Widget/Activity_order.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php index ba288965f..edeef2c20 100644 --- a/Zotlabs/Widget/Activity_order.php +++ b/Zotlabs/Widget/Activity_order.php @@ -53,6 +53,12 @@ class Activity_order { } } + // override order for search results and filer results + if(x($_GET,'search') || x($_GET,'file')) { + $unthreaded_active = 'active'; + $commentord_active = $postord_active = ''; + } + $cmd = \App::$cmd; $filter = ''; @@ -69,6 +75,7 @@ class Activity_order { if(x($_GET,'conv')) $filter .= '&conv=' . $_GET['conv']; + // tabs $tabs = []; -- cgit v1.2.3 From cbaaa1c57ffed0b0a11a7d4cf9a492c26e577194 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 31 May 2018 13:05:32 +0200 Subject: merge groups and filed posts into activity filters --- Zotlabs/Widget/Activity_filter.php | 80 ++++++++++++++++++++++++++++---------- Zotlabs/Widget/Activity_order.php | 5 ++- 2 files changed, 64 insertions(+), 21 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index a60144239..e56d13fc1 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -9,42 +9,82 @@ class Activity_filter { if(! local_channel()) return ''; - $starred_active = ''; - $conv_active = ''; - - if(x($_GET,'star')) { - $starred_active = 'active'; - } - - if(x($_GET,'conv')) { - $conv_active = 'active'; - } - $cmd = \App::$cmd; - // tabs $tabs = []; if(feature_enabled(local_channel(),'personal_tab')) { - $tabs[] = array( + if(x($_GET,'conv')) { + $conv_active = (($_GET['conv'] == 1) ? 'active' : ''); + } + + $tabs[] = [ 'label' => t('Personal Posts'), 'icon' => 'user-circle', - 'url' => z_root() . '/' . $cmd . '?f=' . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : '') . '&conv=1', + 'url' => z_root() . '/' . $cmd . '/?f=&conv=1', 'sel' => $conv_active, - 'title' => t('Posts that mention or involve you'), - ); + 'title' => t('Show posts that mention or involve me'), + ]; } if(feature_enabled(local_channel(),'star_posts')) { - $tabs[] = array( + if(x($_GET,'star')) { + $starred_active = (($_GET['star'] == 1) ? 'active' : ''); + } + + $tabs[] = [ 'label' => t('Starred Posts'), 'icon' => 'star', - 'url'=>z_root() . '/' . $cmd . '/?f=' . ((x($_GET,'order')) ? '&order=' . $_GET['order'] : '') . '&star=1', + 'url'=>z_root() . '/' . $cmd . '/?f=&star=1', 'sel'=>$starred_active, - 'title' => t('Favourite Posts'), + 'title' => t('Show posts that i have starred'), + ]; + } + + if(feature_enabled(local_channel(),'groups')) { + $groups = q("SELECT * FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC", + intval(local_channel()) ); + + if($groups) { + foreach($groups as $g) { + if(x($_GET,'gid')) { + $group_active = (($_GET['gid'] == $g['id']) ? 'active' : ''); + } + + $tabs[] = [ + 'label' => $g['gname'], + 'icon' => 'users', + 'url' => z_root() . '/' . $cmd . '/?f=&gid=' . $g['id'], + 'sel' => $group_active, + 'title' => sprintf(t('Show posts related to the %s privacy group'), $g['gname']), + ]; + } + } } + if(feature_enabled(local_channel(),'filing')) { + $terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc", + intval(local_channel()), + intval(TERM_FILE) + ); + + if($terms) { + foreach($terms as $t) { + if(x($_GET,'file')) { + $file_active = (($_GET['file'] == $t['term']) ? 'active' : ''); + } + + $tabs[] = [ + 'label' => $t['term'], + 'icon' => 'folder', + 'url' => z_root() . '/' . $cmd . '/?f=&file=' . $t['term'], + 'sel' => $file_active, + 'title' => sprintf(t('Show posts that i have filed to %s'), $t['term']), + ]; + } + } + } $arr = ['tabs' => $tabs]; @@ -54,7 +94,7 @@ class Activity_filter { if($arr['tabs']) { return replace_macros($tpl, [ - '$title' => t('Additional Filters'), + '$title' => t('Activity Filters'), '$tabs' => $arr['tabs'], ]); } diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php index edeef2c20..c973e3809 100644 --- a/Zotlabs/Widget/Activity_order.php +++ b/Zotlabs/Widget/Activity_order.php @@ -56,7 +56,7 @@ class Activity_order { // override order for search results and filer results if(x($_GET,'search') || x($_GET,'file')) { $unthreaded_active = 'active'; - $commentord_active = $postord_active = ''; + $commentord_active = $postord_active = 'disabled'; } $cmd = \App::$cmd; @@ -75,6 +75,9 @@ class Activity_order { if(x($_GET,'conv')) $filter .= '&conv=' . $_GET['conv']; + if(x($_GET,'file')) + $filter .= '&file=' . $_GET['file']; + // tabs $tabs = []; -- cgit v1.2.3 From 7e8c7f86f0d103dbffa0ee4fc7538d89a0925a15 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 31 May 2018 13:13:46 +0200 Subject: change some strings --- Zotlabs/Widget/Activity_order.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php index c973e3809..10ec142d9 100644 --- a/Zotlabs/Widget/Activity_order.php +++ b/Zotlabs/Widget/Activity_order.php @@ -86,19 +86,19 @@ class Activity_order { 'label' => t('Commented Date'), 'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . $filter, 'sel'=> $commentord_active, - 'title' => t('Sort by Comment Date'), + 'title' => t('Order by last commented date'), ]; $tabs[] = [ 'label' => t('Posted Date'), 'url'=>z_root() . '/' . $cmd . '?f=&order=post' . $filter, 'sel'=> $postord_active, - 'title' => t('Sort by Post Date'), + 'title' => t('Order by last posted date'), ]; $tabs[] = array( 'label' => t('Date Unthreaded'), 'url' => z_root() . '/' . $cmd . '?f=&order=unthreaded' . $filter, 'sel' => $unthreaded_active, - 'title' => t('Activity Stream - by date'), + 'title' => t('Order unthreaded by date'), ); $arr = ['tabs' => $tabs]; @@ -109,7 +109,7 @@ class Activity_order { if($arr['tabs']) { return replace_macros($tpl, [ - '$title' => t('Order Activity by'), + '$title' => t('Activity Order'), '$tabs' => $arr['tabs'], ]); } -- cgit v1.2.3 From d03c27d18c10d287cbfd3133b3301934d0457636 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 31 May 2018 14:02:34 +0200 Subject: implement reset button for filters --- Zotlabs/Widget/Activity_filter.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index e56d13fc1..a85ab8dc1 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); -- cgit v1.2.3 From 7c05500392aea9d992919e1791c1557dd2f49424 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 31 May 2018 16:17:24 -0700 Subject: don't show forums in forum widget if archived flag is set --- Zotlabs/Widget/Forums.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index 7415c0f0a..d3e2f2534 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -51,7 +51,7 @@ class Forums { - $r1 = q("select abook_id, xchan_hash, xchan_name, xchan_url, xchan_photo_s from abook left join xchan on abook_xchan = xchan_hash where xchan_deleted = 0 and abook_channel = %d and abook_pending = 0 and abook_ignored = 0 and abook_blocked = 0 $sql_extra order by xchan_name $limit ", + $r1 = q("select abook_id, xchan_hash, xchan_name, xchan_url, xchan_photo_s from abook left join xchan on abook_xchan = xchan_hash where xchan_deleted = 0 and abook_channel = %d and abook_pending = 0 and abook_ignored = 0 and abook_blocked = 0 and abook_archived = 0 $sql_extra order by xchan_name $limit ", intval(local_channel()) ); -- cgit v1.2.3 From dd962027cce033b6bcdef7a2fef7b946a9f67a20 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 31 May 2018 21:14:12 -0700 Subject: proper pronoun --- Zotlabs/Widget/Activity_filter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index e56d13fc1..40f294fa5 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -80,7 +80,7 @@ class Activity_filter { 'icon' => 'folder', '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' => sprintf(t('Show posts that I have filed to %s'), $t['term']), ]; } } -- cgit v1.2.3 From 6bf0f4225c0fc7ecc1762ed5cfe2c4861cd1bd4e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 1 Jun 2018 12:11:07 +0200 Subject: move file and groups filter to submenu --- Zotlabs/Widget/Activity_filter.php | 65 ++++++++++++++++++++++++++------------ Zotlabs/Widget/Activity_order.php | 16 ++++++---- 2 files changed, 54 insertions(+), 27 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index a85ab8dc1..18207b37b 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; + } } -- cgit v1.2.3 From ec6d4f8ac34e584f07606a65a911e8b2bc8554f8 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 1 Jun 2018 13:30:02 +0200 Subject: add hover effect to dropdown caret --- Zotlabs/Widget/Activity_order.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php index 93bfc5a26..534d6caee 100644 --- a/Zotlabs/Widget/Activity_order.php +++ b/Zotlabs/Widget/Activity_order.php @@ -84,18 +84,21 @@ class Activity_order { $tabs[] = [ 'label' => t('Commented Date'), + 'icon' => '', 'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . $filter, 'sel'=> $commentord_active, 'title' => t('Order by last commented date'), ]; $tabs[] = [ 'label' => t('Posted Date'), + 'icon' => '', 'url'=>z_root() . '/' . $cmd . '?f=&order=post' . $filter, 'sel'=> $postord_active, 'title' => t('Order by last posted date'), ]; $tabs[] = array( 'label' => t('Date Unthreaded'), + 'icon' => '', 'url' => z_root() . '/' . $cmd . '?f=&order=unthreaded' . $filter, 'sel' => $unthreaded_active, 'title' => t('Order unthreaded by date'), -- cgit v1.2.3 From 56f0244360462d96e2737ca4407feb7909c170d8 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 1 Jun 2018 20:59:28 +0200 Subject: fixes for css fix --- Zotlabs/Widget/Activity_filter.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 18207b37b..38e45ea29 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -111,6 +111,13 @@ class Activity_filter { if(x($_GET,'search')) { $filter_active = 'search'; + $tabs[] = [ + 'label' => t('Search'), + 'icon' => 'search', + 'url' => z_root() . '/' . $cmd . '/?f=&search=' . $_GET['search'], + 'sel' => 'active disabled', + 'title' => t('Panel search'), + ]; } $reset = []; -- cgit v1.2.3 From 22a9e4c9a9e4a48f644deed0432dc05a7e5b189c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 1 Jun 2018 21:52:54 +0200 Subject: add manage privacy groups entry to the panel channel menu dropdown for now --- Zotlabs/Widget/Forums.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index 7415c0f0a..f3141031d 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -27,6 +27,8 @@ class Forums { $x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'", intval(local_channel()) ); +//print_r($x1);killme(); + if($x1) { $xc = ids_to_querystr($x1,'xchan',true); -- cgit v1.2.3 From 53efd4e470f10e123209ed63b90213b20a87e011 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 1 Jun 2018 23:22:52 +0200 Subject: unread forum notifications - wip/unfinished --- Zotlabs/Widget/Forums.php | 2 -- Zotlabs/Widget/Notifications.php | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index f3141031d..7415c0f0a 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -27,8 +27,6 @@ class Forums { $x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'", intval(local_channel()) ); -//print_r($x1);killme(); - if($x1) { $xc = ids_to_querystr($x1,'xchan',true); diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index fc78a2a39..1be467ba6 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -111,6 +111,21 @@ class Notifications { 'label' => t('Mark all notices seen') ] ]; + + $notifications[] = [ + 'type' => 'forums', + 'icon' => 'comments-o', + 'severity' => 'secondary', + 'label' => t('Forums'), + 'title' => t('Forums'), + 'viewall' => [ + //'url' => 'notifications/system', + //'label' => t('View all notices') + ], + 'markall' => [ + //'label' => t('Mark all notices seen') + ] + ]; } if(local_channel() && is_site_admin()) { -- cgit v1.2.3 From db0a3a753420e8722776094334759dd4ff61fc77 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 2 Jun 2018 15:39:38 +0200 Subject: some more work on forum notifications --- Zotlabs/Widget/Notifications.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index 1be467ba6..a4cf4e706 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -118,12 +118,8 @@ class Notifications { 'severity' => 'secondary', 'label' => t('Forums'), 'title' => t('Forums'), - 'viewall' => [ - //'url' => 'notifications/system', - //'label' => t('View all notices') - ], - 'markall' => [ - //'label' => t('Mark all notices seen') + 'filter' => [ + 'name_label' => t('Filter by name') ] ]; } -- cgit v1.2.3 From 8189408190333b4f6ac45f98623be0d1db8b9462 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 2 Jun 2018 22:11:11 +0200 Subject: finalize filters and forum notifications --- Zotlabs/Widget/Activity_filter.php | 48 +++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 38e45ea29..6a1ad6f0a 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -25,7 +25,7 @@ class Activity_filter { 'icon' => 'user-circle', 'url' => z_root() . '/' . $cmd . '/?f=&conv=1', 'sel' => $conv_active, - 'title' => t('Show posts that mention or involve me'), + 'title' => t('Show posts that mention or involve me') ]; } @@ -40,7 +40,7 @@ class Activity_filter { 'icon' => 'star', 'url'=>z_root() . '/' . $cmd . '/?f=&star=1', 'sel'=>$starred_active, - 'title' => t('Show posts that i have starred'), + 'title' => t('Show posts that i have starred') ]; } @@ -60,7 +60,7 @@ class Activity_filter { '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']), + 'title' => sprintf(t('Show posts related to the %s privacy group'), $g['gname']) ]; } $tabs[] = [ @@ -93,7 +93,7 @@ class Activity_filter { 'icon' => '', 'url' => z_root() . '/' . $cmd . '/?f=&file=' . $t['term'], 'sel' => $file_active, - 'title' => '', + 'title' => '' ]; } @@ -109,6 +109,38 @@ class Activity_filter { } } + if(feature_enabled(local_channel(),'forums_tab')) { + $forums = get_forum_channels(local_channel()); + + if($forums) { + foreach($forums as $f) { + if(x($_GET,'cid')) { + $forum_active = (($_GET['cid'] == $f['abook_id']) ? 'active' : ''); + $filter_active = 'forums'; + } + $fsub[] = [ + 'label' => $f['xchan_name'], + 'img' => $f['xchan_photo_s'], + 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&cid=' . $f['abook_id']), + 'sel' => $forum_active, + 'title' => t('Private forum'), + 'lock' => (($f['private_forum']) ? 'lock' : '') + ]; + } + + $tabs[] = [ + 'label' => t('Forums'), + 'icon' => 'comments-o', + 'url' => '#', + 'sel' => (($filter_active == 'forums') ? true : false), + 'title' => t('Show this forums posts'), + 'sub' => $fsub + + ]; + } + } + + if(x($_GET,'search')) { $filter_active = 'search'; $tabs[] = [ @@ -116,7 +148,7 @@ class Activity_filter { 'icon' => 'search', 'url' => z_root() . '/' . $cmd . '/?f=&search=' . $_GET['search'], 'sel' => 'active disabled', - 'title' => t('Panel search'), + 'title' => t('Panel search') ]; } @@ -127,7 +159,7 @@ class Activity_filter { 'icon' => 'remove', 'url'=> z_root() . '/' . $cmd, 'sel'=> '', - 'title' => t('Remove active filter'), + 'title' => t('Remove active filter') ]; } @@ -139,13 +171,13 @@ class Activity_filter { if($arr['tabs']) { $content = replace_macros(get_markup_template('common_pills.tpl'), [ - '$pills' => $arr['tabs'], + '$pills' => $arr['tabs'] ]); $o .= replace_macros(get_markup_template('activity_filter_widget.tpl'), [ '$title' => t('Activity Filters'), '$reset' => $reset, - '$content' => $content, + '$content' => $content ]); } -- cgit v1.2.3 From 2438af1cb5d8c4d439dae315bffb8eaeb5c153a5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 3 Jun 2018 00:16:46 +0200 Subject: the pf argument is required here for some functionality in /network --- Zotlabs/Widget/Activity_filter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index f9993759c..07389f2bc 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -40,7 +40,7 @@ class Activity_filter { 'icon' => 'star', 'url'=>z_root() . '/' . $cmd . '/?f=&star=1', 'sel'=>$starred_active, - 'title' => t('Show posts that i have starred') + 'title' => t('Show posts that I have starred') ]; } @@ -69,7 +69,7 @@ class Activity_filter { 'icon' => 'users', 'url' => '#', 'sel' => (($filter_active == 'group') ? true : false), - 'title' => sprintf(t('Show posts that i have filed to %s'), $t['term']), + 'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']), 'sub' => $gsub ]; @@ -121,7 +121,7 @@ class Activity_filter { $fsub[] = [ 'label' => $f['xchan_name'], 'img' => $f['xchan_photo_s'], - 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&cid=' . $f['abook_id']), + 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']), 'sel' => $forum_active, 'title' => t('Private forum'), 'lock' => (($f['private_forum']) ? 'lock' : '') -- cgit v1.2.3 From 8b76b5a0a6f6784f9d97332cc93b395504f6f527 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 3 Jun 2018 23:03:30 +0200 Subject: improve network cid query --- Zotlabs/Widget/Activity_filter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 07389f2bc..672225ef1 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -114,8 +114,8 @@ class Activity_filter { if($forums) { foreach($forums as $f) { - if(x($_GET,'cid')) { - $forum_active = (($_GET['cid'] == $f['abook_id']) ? 'active' : ''); + if(x($_GET,'pf') && x($_GET,'cid')) { + $forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : ''); $filter_active = 'forums'; } $fsub[] = [ -- cgit v1.2.3 From dd9f7ef6e926cb53f68216f58769552a6355993c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 3 Jun 2018 23:14:01 -0700 Subject: fix submenunavigation on activity filters --- Zotlabs/Widget/Activity_filter.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 672225ef1..36e24342d 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -89,6 +89,7 @@ class Activity_filter { $filter_active = 'file'; } $tsub[] = [ + 'id' => 'saved_folders', 'label' => $t['term'], 'icon' => '', 'url' => z_root() . '/' . $cmd . '/?f=&file=' . $t['term'], @@ -119,6 +120,7 @@ class Activity_filter { $filter_active = 'forums'; } $fsub[] = [ + 'id' => 'forums', 'label' => $f['xchan_name'], 'img' => $f['xchan_photo_s'], 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']), -- cgit v1.2.3 From 57231a88076289c5dbeff70c9b92dbbe2bcefd8d Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 3 Jun 2018 23:16:40 -0700 Subject: wrong level --- Zotlabs/Widget/Activity_filter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 36e24342d..18d81d8e3 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -89,7 +89,6 @@ class Activity_filter { $filter_active = 'file'; } $tsub[] = [ - 'id' => 'saved_folders', 'label' => $t['term'], 'icon' => '', 'url' => z_root() . '/' . $cmd . '/?f=&file=' . $t['term'], @@ -99,6 +98,7 @@ class Activity_filter { } $tabs[] = [ + 'id' => 'saved_folders', 'label' => t('Saved Folders'), 'icon' => 'folder', 'url' => '#', @@ -120,7 +120,6 @@ class Activity_filter { $filter_active = 'forums'; } $fsub[] = [ - 'id' => 'forums', 'label' => $f['xchan_name'], 'img' => $f['xchan_photo_s'], 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']), @@ -131,6 +130,7 @@ class Activity_filter { } $tabs[] = [ + 'id' => 'forums', 'label' => t('Forums'), 'icon' => 'comments-o', 'url' => '#', -- cgit v1.2.3 From 5a9e6c8a695f0adac35baf2d63f58fb27424140f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 3 Jun 2018 23:38:03 -0700 Subject: sort out some mismatched hovertips on the activity filter --- Zotlabs/Widget/Activity_filter.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 18d81d8e3..32da20bf6 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -69,7 +69,7 @@ class Activity_filter { 'icon' => 'users', 'url' => '#', 'sel' => (($filter_active == 'group') ? true : false), - 'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']), + 'title' => t('Show my privacy groups'), 'sub' => $gsub ]; @@ -93,7 +93,7 @@ class Activity_filter { 'icon' => '', 'url' => z_root() . '/' . $cmd . '/?f=&file=' . $t['term'], 'sel' => $file_active, - 'title' => '' + 'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']), ]; } @@ -103,7 +103,7 @@ class Activity_filter { 'icon' => 'folder', 'url' => '#', 'sel' => (($filter_active == 'file') ? true : false), - 'title' => sprintf(t('Show posts that I have filed to %s'), $t['term']), + 'title' => t('Show filed post categories'), 'sub' => $tsub ]; @@ -124,7 +124,7 @@ class Activity_filter { 'img' => $f['xchan_photo_s'], 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']), 'sel' => $forum_active, - 'title' => t('Private forum'), + 'title' => t('Show posts to this forum'), 'lock' => (($f['private_forum']) ? 'lock' : '') ]; } @@ -135,7 +135,7 @@ class Activity_filter { 'icon' => 'comments-o', 'url' => '#', 'sel' => (($filter_active == 'forums') ? true : false), - 'title' => t('Show this forums posts'), + 'title' => t('Show forums'), 'sub' => $fsub ]; -- cgit v1.2.3 From 468af29e3e4fb5c59f44afe8e870e21b66153992 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 8 Jun 2018 23:03:05 +0200 Subject: new feature filter network by name --- Zotlabs/Widget/Activity_filter.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 32da20bf6..78e439fdd 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -154,6 +154,20 @@ class Activity_filter { ]; } + $name = []; + if(feature_enabled(local_channel(),'name_tab')) { + if(x($_GET,'cid') && ! x($_GET,'pf')) { + $filter_active = 'name'; + } + $name = [ + 'label' => x($_GET,'name') ? $_GET['name'] : t('Filter by name'), + 'icon' => 'filter', + 'url'=> z_root() . '/' . $cmd . '/', + 'sel'=> $filter_active == 'name' ? 'is-valid' : '', + 'title' => '' + ]; + } + $reset = []; if($filter_active) { $reset = [ @@ -179,7 +193,8 @@ class Activity_filter { $o .= replace_macros(get_markup_template('activity_filter_widget.tpl'), [ '$title' => t('Activity Filters'), '$reset' => $reset, - '$content' => $content + '$content' => $content, + '$name' => $name ]); } -- cgit v1.2.3 From c4778e5e2494d262c18dd73815fb495964355fce Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 9 Jun 2018 10:58:01 +0200 Subject: restrict cid filter to unthreaded order (makes much more sense that way imho and the query is a lot faster) and slighty change order of the filters --- Zotlabs/Widget/Activity_filter.php | 65 +++++++++++++++++++------------------- Zotlabs/Widget/Activity_order.php | 4 +-- 2 files changed, 34 insertions(+), 35 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 78e439fdd..fadf39144 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -76,6 +76,38 @@ class Activity_filter { } } + if(feature_enabled(local_channel(),'forums_tab')) { + $forums = get_forum_channels(local_channel()); + + if($forums) { + foreach($forums as $f) { + if(x($_GET,'pf') && x($_GET,'cid')) { + $forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : ''); + $filter_active = 'forums'; + } + $fsub[] = [ + 'label' => $f['xchan_name'], + 'img' => $f['xchan_photo_s'], + 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']), + 'sel' => $forum_active, + 'title' => t('Show posts to this forum'), + 'lock' => (($f['private_forum']) ? 'lock' : '') + ]; + } + + $tabs[] = [ + 'id' => 'forums', + 'label' => t('Forums'), + 'icon' => 'comments-o', + 'url' => '#', + 'sel' => (($filter_active == 'forums') ? true : false), + 'title' => t('Show forums'), + 'sub' => $fsub + + ]; + } + } + if(feature_enabled(local_channel(),'filing')) { $terms = q("select distinct term from term where uid = %d and ttype = %d order by term asc", intval(local_channel()), @@ -110,39 +142,6 @@ class Activity_filter { } } - if(feature_enabled(local_channel(),'forums_tab')) { - $forums = get_forum_channels(local_channel()); - - if($forums) { - foreach($forums as $f) { - if(x($_GET,'pf') && x($_GET,'cid')) { - $forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : ''); - $filter_active = 'forums'; - } - $fsub[] = [ - 'label' => $f['xchan_name'], - 'img' => $f['xchan_photo_s'], - 'url' => (($f['private_forum']) ? $f['xchan_url'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']), - 'sel' => $forum_active, - 'title' => t('Show posts to this forum'), - 'lock' => (($f['private_forum']) ? 'lock' : '') - ]; - } - - $tabs[] = [ - 'id' => 'forums', - 'label' => t('Forums'), - 'icon' => 'comments-o', - 'url' => '#', - 'sel' => (($filter_active == 'forums') ? true : false), - 'title' => t('Show forums'), - 'sub' => $fsub - - ]; - } - } - - if(x($_GET,'search')) { $filter_active = 'search'; $tabs[] = [ diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php index 534d6caee..0e660afc3 100644 --- a/Zotlabs/Widget/Activity_order.php +++ b/Zotlabs/Widget/Activity_order.php @@ -53,8 +53,8 @@ class Activity_order { } } - // override order for search results and filer results - if(x($_GET,'search') || x($_GET,'file')) { + // override order for search, filer and cid results + if(x($_GET,'search') || x($_GET,'file') || (! x($_GET,'pf') && x($_GET,'cid'))) { $unthreaded_active = 'active'; $commentord_active = $postord_active = 'disabled'; } -- cgit v1.2.3 From 9c5df51141d68e50d3c1f5d3097160408debce48 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 17 Jun 2018 16:58:12 +0200 Subject: some work on mod group --- Zotlabs/Widget/Collections.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Collections.php b/Zotlabs/Widget/Collections.php index d2b29679a..bc9c812c6 100644 --- a/Zotlabs/Widget/Collections.php +++ b/Zotlabs/Widget/Collections.php @@ -8,6 +8,9 @@ class Collections { function widget($args) { + if(argc() < 2) + return; + $mode = ((array_key_exists('mode',$args)) ? $args['mode'] : 'conversation'); switch($mode) { case 'conversation': -- cgit v1.2.3 From fa6e5e4d754fec3acee019ed1edaa68357f0c2d0 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 28 Jun 2018 16:43:22 -0700 Subject: plugins -> addons --- Zotlabs/Widget/Admin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Admin.php b/Zotlabs/Widget/Admin.php index a761eebe3..f349377a0 100644 --- a/Zotlabs/Widget/Admin.php +++ b/Zotlabs/Widget/Admin.php @@ -24,7 +24,7 @@ class Admin { 'channels' => array(z_root() . '/admin/channels/', t('Channels'), 'channels'), 'security' => array(z_root() . '/admin/security/', t('Security'), 'security'), 'features' => array(z_root() . '/admin/features/', t('Features'), 'features'), - 'plugins' => array(z_root() . '/admin/plugins/', t('Plugins'), 'plugins'), + 'addons' => array(z_root() . '/admin/addons/', t('Addons'), 'addons'), 'themes' => array(z_root() . '/admin/themes/', t('Themes'), 'themes'), 'queue' => array(z_root() . '/admin/queue', t('Inspect queue'), 'queue'), 'profs' => array(z_root() . '/admin/profs', t('Profile Fields'), 'profs'), @@ -39,7 +39,7 @@ class Admin { if($r) { foreach ($r as $h){ $plugin = $h['aname']; - $plugins[] = array(z_root() . '/admin/plugins/' . $plugin, $plugin, 'plugin'); + $plugins[] = array(z_root() . '/admin/addons/' . $plugin, $plugin, 'plugin'); // temp plugins with admin \App::$plugins_admin[] = $plugin; } @@ -53,7 +53,7 @@ class Admin { $o .= replace_macros(get_markup_template('admin_aside.tpl'), array( '$admin' => $aside, '$admtxt' => t('Admin'), - '$plugadmtxt' => t('Plugin Features'), + '$plugadmtxt' => t('Addon Features'), '$plugins' => $plugins, '$logtxt' => t('Logs'), '$logs' => $logs, -- cgit v1.2.3 From c28e27357a1ce700b91021344050ec531bce3889 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 28 Jun 2018 23:17:50 -0700 Subject: add the missing link to manage privacy groups --- Zotlabs/Widget/Activity_filter.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index fadf39144..2df9e518a 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -63,6 +63,14 @@ class Activity_filter { 'title' => sprintf(t('Show posts related to the %s privacy group'), $g['gname']) ]; } + $gsub[] = [ + 'label' => t('Manage Privacy Groups'), + 'icon' => 'gear', + 'url' => z_root() . '/group', + 'sel' => '', + 'title' => t('Create and edit privacy groups and members') + ]; + $tabs[] = [ 'id' => 'privacy_groups', 'label' => t('Privacy Groups'), -- cgit v1.2.3 From 1387b88ba491c855e717cd3803dcaaa06901ae95 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 4 Jul 2018 19:04:12 -0700 Subject: remove manage group link from activity_filter, already in personal menu --- Zotlabs/Widget/Activity_filter.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php index 2df9e518a..fadf39144 100644 --- a/Zotlabs/Widget/Activity_filter.php +++ b/Zotlabs/Widget/Activity_filter.php @@ -63,14 +63,6 @@ class Activity_filter { 'title' => sprintf(t('Show posts related to the %s privacy group'), $g['gname']) ]; } - $gsub[] = [ - 'label' => t('Manage Privacy Groups'), - 'icon' => 'gear', - 'url' => z_root() . '/group', - 'sel' => '', - 'title' => t('Create and edit privacy groups and members') - ]; - $tabs[] = [ 'id' => 'privacy_groups', 'label' => t('Privacy Groups'), -- cgit v1.2.3 From f6e8ce5516eeaf2e0525f69099d68a55df9501e3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 4 Jul 2018 23:20:35 -0700 Subject: appstore changes --- Zotlabs/Widget/Appcategories.php | 3 +++ Zotlabs/Widget/Appstore.php | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Zotlabs/Widget/Appstore.php (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Appcategories.php b/Zotlabs/Widget/Appcategories.php index 8ff14230f..aebd144d0 100644 --- a/Zotlabs/Widget/Appcategories.php +++ b/Zotlabs/Widget/Appcategories.php @@ -17,6 +17,9 @@ class Appcategories { // Leaving this line which negates the effect of the two invalid lines prior $srchurl = z_root() . '/apps'; + if(argc() > 1 && argv(1) === 'available') + $srchurl .= '/available'; + $terms = array(); diff --git a/Zotlabs/Widget/Appstore.php b/Zotlabs/Widget/Appstore.php new file mode 100644 index 000000000..237707733 --- /dev/null +++ b/Zotlabs/Widget/Appstore.php @@ -0,0 +1,18 @@ + 1 && argv(1) === 'available') ? 1 : 0); + return replace_macros(get_markup_template('appstore.tpl'), [ + '$title' => t('App Collections'), + '$options' => [ + [ z_root() . '/apps/available', t('Available Apps'), $store ], + [ z_root() . '/apps', t('Installed apps'), 1 - $store ] + ] + ]); + } +} \ No newline at end of file -- cgit v1.2.3