aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-16 11:11:06 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-16 11:11:06 +0100
commit78c9f752af8db5db290a57224fa1d0239a36a34d (patch)
tree97f75c296cceb5cb248fe7335b3c3b79e41941c0 /include
parentd13a6180be310cb184f891fa2b969542691c1863 (diff)
downloadvolse-hubzilla-78c9f752af8db5db290a57224fa1d0239a36a34d.tar.gz
volse-hubzilla-78c9f752af8db5db290a57224fa1d0239a36a34d.tar.bz2
volse-hubzilla-78c9f752af8db5db290a57224fa1d0239a36a34d.zip
provide ability to pin apps to navbar from /apps. this removes the ability to have per custom navbar pinned apps - this can be added later if desired
Diffstat (limited to 'include')
-rw-r--r--include/nav.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/nav.php b/include/nav.php
index 9df50c9fe..8d39d492a 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -253,7 +253,7 @@ EOT;
}
$syslist = array();
- $list = Zlib\Apps::app_list(local_channel(), false, 'nav_featured_app');
+ $list = Zlib\Apps::app_list(local_channel(), false, ['nav_featured_app', 'nav_pinned_app']);
if($list) {
foreach($list as $li) {
$syslist[] = Zlib\Apps::app_encode($li);
@@ -274,16 +274,20 @@ EOT;
$app['active'] = true;
if($is_owner) {
- $nav_apps[] = Zlib\Apps::app_render($app,'nav');
- if(strpos($app['categories'],'navbar_' . $template)) {
+ if(strpos($app['categories'],'nav_pinned_app')) {
$navbar_apps[] = Zlib\Apps::app_render($app,'navbar');
}
+ else {
+ $nav_apps[] = Zlib\Apps::app_render($app,'nav');
+ }
}
elseif(! $is_owner && strpos($app['requires'], 'local_channel') === false) {
- $nav_apps[] = Zlib\Apps::app_render($app,'nav');
- if(strpos($app['categories'],'navbar_' . $template)) {
+ if(strpos($app['categories'],'nav_pinned_app')) {
$navbar_apps[] = Zlib\Apps::app_render($app,'navbar');
}
+ else {
+ $nav_apps[] = Zlib\Apps::app_render($app,'nav');
+ }
}
}