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'])
|
||||
$ret['page'] = $app['app_page'];
|
||||
|
||||
if($app['alt_url'])
|
||||
$ret['alt_url'] = $app['alt_url'];
|
||||
|
||||
if(! $embed)
|
||||
return $ret;
|
||||
|
||||
|
@ -27,8 +27,11 @@ function apps_content(&$a) {
|
||||
$apps = array();
|
||||
$list = app_list(local_user());
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
return replace_macros(get_markup_template('myapps.tpl'), array(
|
||||
|
@ -1 +1 @@
|
||||
2014-05-20.681
|
||||
2014-05-21.682
|
||||
|
@ -1,5 +1,5 @@
|
||||
<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>
|
||||
</a>
|
||||
{{if $install || $update || $delete }}
|
||||
|
Reference in New Issue
Block a user