aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-21 22:42:22 -0700
committerMario Vavti <mario@mariovavti.com>2017-05-23 21:44:57 +0200
commit50c9aec43652726b17e0fee3b555fb1344f38dbd (patch)
treef67462262926f17e1cb37a96db6a82acc2c6d6df
parentec7ecc285ec10a7990db09bda436fd498e05245a (diff)
downloadvolse-hubzilla-50c9aec43652726b17e0fee3b555fb1344f38dbd.tar.gz
volse-hubzilla-50c9aec43652726b17e0fee3b555fb1344f38dbd.tar.bz2
volse-hubzilla-50c9aec43652726b17e0fee3b555fb1344f38dbd.zip
some issues with the app order template logic
-rw-r--r--Zotlabs/Lib/Apps.php4
-rw-r--r--view/tpl/app.tpl11
2 files changed, 8 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index a655f47b0..ed18ff3cb 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -370,8 +370,8 @@ class Apps {
'$deleted' => $papp['deleted'],
'$feature' => (($papp['embed']) ? false : true),
'$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
- '$navapps' => (($mode == 'nav' || $mode='nav-order') ? true : false),
- '$order' => (($mode='nav-order') ? true : false),
+ '$navapps' => (($mode == 'nav') ? true : false),
+ '$order' => (($mode == 'nav-order') ? true : false),
'$add' => t('Add to app-tray'),
'$remove' => t('Remove from app-tray')
));
diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl
index f45510a58..0c8ba7459 100644
--- a/view/tpl/app.tpl
+++ b/view/tpl/app.tpl
@@ -1,4 +1,4 @@
-{{if !$navapps}}
+{{if ! ($navapps || $order)}}
<div class="app-container">
<div class="app-detail{{if $deleted}} app-deleted{{/if}}">
<a href="{{$app.url}}"{{if $app.target}} target="{{$app.target}}"{{/if}}{{if $app.desc}} title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}>{{if $icon}}<i class="app-icon fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="80" height="80" />{{/if}}
@@ -24,12 +24,13 @@
{{/if}}
{{/if}}
</div>
-{{else}}
+{{/if}}
+{{if $navapps}}
+<a class="dropdown-item" href="{{$app.url}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a>
+{{/if}}
{{if $order}}
<a href="{{$hosturl}}appman/{{$app.guid}}/moveup"><i class="generic-icons-nav fa fa-fw fa-arrow-up"></i></a>
<a href="{{$hosturl}}appman/{{$app.guid}}/movedown"><i class="generic-icons-nav fa fa-fw fa-arrow-down"></i></a>
{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}<br>
-{{else}}
-<a class="dropdown-item" href="{{$app.url}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a>
-{{/if}}
{{/if}}
+