check for app-icons in app_list() instead of app_render()
This commit is contained in:
parent
631a8278d3
commit
dce9a70ff5
@ -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'];
|
||||
|
||||
|
@ -264,7 +264,6 @@ EOT;
|
||||
'$localuser' => local_channel(),
|
||||
));
|
||||
|
||||
|
||||
$tpl = get_markup_template('nav.tpl');
|
||||
|
||||
App::$page['nav'] .= replace_macros($tpl, array(
|
||||
|
@ -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>
|
||||
|
@ -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}} {{$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}} {{$app.name}}</a></li>
|
||||
{{/foreach}}
|
||||
{{if $localuser}}
|
||||
<li class="divider"></li>
|
||||
|
Reference in New Issue
Block a user