make it possible to edit/delete apps via /apps/personal/edit
This commit is contained in:
parent
c6de9096fa
commit
77ca117218
@ -348,6 +348,9 @@ function app_encode($app,$embed = false) {
|
|||||||
if($app['app_page'])
|
if($app['app_page'])
|
||||||
$ret['page'] = $app['app_page'];
|
$ret['page'] = $app['app_page'];
|
||||||
|
|
||||||
|
if($app['alt_url'])
|
||||||
|
$ret['alt_url'] = $app['alt_url'];
|
||||||
|
|
||||||
if(! $embed)
|
if(! $embed)
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|
||||||
|
@ -27,9 +27,12 @@ function apps_content(&$a) {
|
|||||||
$apps = array();
|
$apps = array();
|
||||||
$list = app_list(local_user());
|
$list = app_list(local_user());
|
||||||
if($list) {
|
if($list) {
|
||||||
foreach($list as $app)
|
foreach($list as $app) {
|
||||||
|
if($mode == 'edit')
|
||||||
|
$app['alt_url'] = z_root() . '/appman/?f=&appid=' . $app['app_id'];
|
||||||
$apps[] = app_render(app_encode($app),$mode);
|
$apps[] = app_render(app_encode($app),$mode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return replace_macros(get_markup_template('myapps.tpl'), array(
|
return replace_macros(get_markup_template('myapps.tpl'), array(
|
||||||
'$title' => t('Apps'),
|
'$title' => t('Apps'),
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-05-20.681
|
2014-05-21.682
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<a href="{{$app.url}}" {{if $app.hover}}title="{{$app.hover}}"{{/if}}><img src="{{$app.photo}}" width="80" height="80" />
|
<a href="{{if $app.alt_url}}{{$app.alt_url}}{{else}}{{$app.url}}{{/if}}" {{if $app.hover}}title="{{$app.hover}}"{{/if}}><img src="{{$app.photo}}" width="80" height="80" />
|
||||||
<div class="app-name">{{$app.name}}</div>
|
<div class="app-name">{{$app.name}}</div>
|
||||||
</a>
|
</a>
|
||||||
{{if $install || $update || $delete }}
|
{{if $install || $update || $delete }}
|
||||||
|
Reference in New Issue
Block a user