aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Apps.php9
-rw-r--r--include/nav.php1
-rw-r--r--view/tpl/app.tpl2
-rw-r--r--view/tpl/navapps.tpl2
4 files changed, 8 insertions, 6 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 595cf33ee..c8345e351 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -339,12 +339,9 @@ class Apps {
}
$install_action = (($installed) ? t('Update') : t('Install'));
- $icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : '');
-
return replace_macros(get_markup_template('app.tpl'),array(
'$app' => $papp,
- '$icon' => $icon,
'$hosturl' => $hosturl,
'$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
'$install' => (($hosturl && $mode == 'view') ? $install_action : ''),
@@ -512,8 +509,11 @@ class Apps {
intval(TERM_OBJ_APP),
intval($r[$x]['id'])
);
+
+ $r[$x]['app_icon'] = ((strpos($r[$x]['app_photo'],'icon:') === 0) ? substr($r[$x]['app_photo'],5) : '');
}
}
+
return($r);
}
@@ -719,6 +719,9 @@ class Apps {
if($app['app_photo'])
$ret['photo'] = $app['app_photo'];
+ if($app['app_icon'])
+ $ret['icon'] = $app['app_icon'];
+
if($app['app_version'])
$ret['version'] = $app['app_version'];
diff --git a/include/nav.php b/include/nav.php
index 98b6ebe3f..356c0643b 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -264,7 +264,6 @@ EOT;
'$localuser' => local_channel(),
));
-
$tpl = get_markup_template('nav.tpl');
App::$page['nav'] .= replace_macros($tpl, array(
diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl
index 434653e1e..a389695ee 100644
--- a/view/tpl/app.tpl
+++ b/view/tpl/app.tpl
@@ -1,6 +1,6 @@
<div class="app-container">
<div class="app-detail{{if $deleted}} app-deleted{{/if}}">
- <a href="{{$app.url}}" {{if $ap.target}}target="{{$ap.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}}
+ <a href="{{$app.url}}" {{if $ap.target}}target="{{$ap.target}}" {{/if}}{{if $app.desc}}title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}>{{if $app.icon}}<i class="app-icon fa fa-fw fa-{{$app.icon}}"></i>{{else}}<img src="{{$app.photo}}" width="80" height="80" />{{/if}}
<div class="app-name" style="text-align:center;">{{$app.name}}</div>
</a>
</div>
diff --git a/view/tpl/navapps.tpl b/view/tpl/navapps.tpl
index db5c7ae17..07110706c 100644
--- a/view/tpl/navapps.tpl
+++ b/view/tpl/navapps.tpl
@@ -1,6 +1,6 @@
{{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>
+ <li><a href="{{$app.url}}">{{if $app.icon}}<i class="fa fa-{{$app.icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" />{{/if}}&nbsp;{{$app.name}}</a></li>
{{/foreach}}
{{if $localuser}}
<li class="divider"></li>