aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-05-21 01:55:32 -0700
committerfriendica <info@friendica.com>2014-05-21 01:55:32 -0700
commit77ca117218382b57e2d0590466d9fc38dc016e80 (patch)
treec7e3621510f45f9bd4d09d2fc6d4b9cf45e549f9
parentc6de9096fabf913e5e8b4acbde75cd58bb8c9959 (diff)
downloadvolse-hubzilla-77ca117218382b57e2d0590466d9fc38dc016e80.tar.gz
volse-hubzilla-77ca117218382b57e2d0590466d9fc38dc016e80.tar.bz2
volse-hubzilla-77ca117218382b57e2d0590466d9fc38dc016e80.zip
make it possible to edit/delete apps via /apps/personal/edit
-rw-r--r--include/apps.php3
-rw-r--r--mod/apps.php5
-rw-r--r--version.inc2
-rw-r--r--view/tpl/app.tpl2
4 files changed, 9 insertions, 3 deletions
diff --git a/include/apps.php b/include/apps.php
index 2b5903329..b5aad2456 100644
--- a/include/apps.php
+++ b/include/apps.php
@@ -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;
diff --git a/mod/apps.php b/mod/apps.php
index aeedb5cda..34bbc7142 100644
--- a/mod/apps.php
+++ b/mod/apps.php
@@ -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(
diff --git a/version.inc b/version.inc
index 6b7ff2f87..859a49ba3 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-05-20.681
+2014-05-21.682
diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl
index 1d39395d6..e375bd013 100644
--- a/view/tpl/app.tpl
+++ b/view/tpl/app.tpl
@@ -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 }}