aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-01-27 17:51:49 +0100
committerMario Vavti <mario@mariovavti.com>2017-01-27 17:51:49 +0100
commit8b5793e629baaf2084909d310d967abda277ae81 (patch)
tree57009debebe6ea5dea06367a2a62f1e2cd4c1da9
parentde668f5999f0741e85c6791c2a76c0a30a7591f7 (diff)
downloadvolse-hubzilla-8b5793e629baaf2084909d310d967abda277ae81.tar.gz
volse-hubzilla-8b5793e629baaf2084909d310d967abda277ae81.tar.bz2
volse-hubzilla-8b5793e629baaf2084909d310d967abda277ae81.zip
more work on app-bin
-rw-r--r--Zotlabs/Module/Apps.php1
-rw-r--r--include/nav.php5
-rwxr-xr-xview/tpl/nav.tpl10
-rw-r--r--view/tpl/navapps.tpl7
4 files changed, 14 insertions, 9 deletions
diff --git a/Zotlabs/Module/Apps.php b/Zotlabs/Module/Apps.php
index 9186848df..1ccd792eb 100644
--- a/Zotlabs/Module/Apps.php
+++ b/Zotlabs/Module/Apps.php
@@ -17,7 +17,6 @@ class Apps extends \Zotlabs\Web\Controller {
$apps = array();
-
if(local_channel()) {
Zlib\Apps::import_system_apps();
$syslist = array();
diff --git a/include/nav.php b/include/nav.php
index ce259255e..d7b006c6d 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -249,7 +249,7 @@ EOT;
if(local_channel()) {
//Zlib\Apps::import_system_apps();
$syslist = array();
- $list = Zlib\Apps::app_list(local_channel(), false, $_GET['cat']);
+ $list = Zlib\Apps::app_list(local_channel(), false, 'featured');
if($list) {
foreach($list as $li) {
$syslist[] = Zlib\Apps::app_encode($li);
@@ -262,7 +262,8 @@ EOT;
}
$navapps = replace_macros(get_markup_template('navapps.tpl'), array(
- '$apps' => $syslist
+ '$apps' => $syslist,
+ '$localuser' => local_channel(),
));
}
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index e80772102..16cd9deca 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -163,13 +163,13 @@
<!-- {{foreach $nav.loginmenu as $loginmenu}}
<li role="presentation"><a class="{{$loginmenu.2}}" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem" id="{{$loginmenu.4}}">{{$loginmenu.1}}</a></li>
- {{/foreach}} --!>
+ {{/foreach}} -->
</div>
</li>
<!-- {{foreach $nav.loginmenu as $loginmenu}}
<li role="presentation"><a class="{{$loginmenu.2}} visible-xs" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem">{{$loginmenu.1}}</a></li>
{{/foreach}}
---!>
+-->
{{/if}}
{{if $nav.register}}
@@ -194,7 +194,7 @@
{{if $powered_by}}
<div id="powered-by">{{$powered_by}}</div>
{{/if}}
-
+{{if ! $navapps}}
{{if $nav.directory}}
<li class="{{$sel.directory}}">
<a class="{{$nav.directory.2}}" href="{{$nav.directory.0}}" title="{{$nav.directory.3}}" id="{{$nav.directory.4}}"><i class="fa fa-sitemap"></i></a>
@@ -212,6 +212,7 @@
<a class="{{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}"{{if $nav.help.6}} onclick="contextualHelp(); return false;"{{/if}}>{{if $nav.help.6}}<i class="fa fa-question-circle"></i>{{else}}<i class="fa fa-question"></i>{{/if}}</a>
</li>
{{/if}}
+{{/if}}
{{if $navapps}}
<li class="dropdown-toggle" data-toggle="dropdown">
@@ -223,6 +224,9 @@
</ul>
</div>
+ <div class="collapse navbar-collapse" id="navbar-collapse-2">
+ {{$navapps}}
+ </div>
</div>
{{if $nav.help.6}}
<div id="contextual-help-content" class="contextual-help-content">
diff --git a/view/tpl/navapps.tpl b/view/tpl/navapps.tpl
index ce5189eb1..de4a6223c 100644
--- a/view/tpl/navapps.tpl
+++ b/view/tpl/navapps.tpl
@@ -1,8 +1,9 @@
-<ul class="dropdown-menu">
+<ul class="dropdown-menu" style="max-height: 80vh">
{{foreach $apps as $app}}
<li><a href="{{$app.url}}">{{if $icon}}<i class="app-icon fa fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" />{{/if}}&nbsp;{{$app.name}}</a></li>
{{/foreach}}
+ {{if $localuser}}
<li class="divider"></li>
- <li><a href="/apps/edit"><i class="app-icon fa fa-pencil"></i>&nbsp;Edit Apps</a></li>
- <li><a href="/appman"><i class="app-icon fa fa-plus-circle"></i>&nbsp;Add App</a></li>
+ <li><a href="/apps/edit"><i class="app-icon fa fa-plus-circle"></i>&nbsp;Add Apps</a></li>
+ {{/if}}
</ul>