diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 1432cbdcf..0ca2f7a99 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -360,7 +360,9 @@ class Apps { '$deleted' => $papp['deleted'], '$feature' => (($papp['embed']) ? false : true), '$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true), - '$navapps' => (($mode == 'nav') ? true : false) + '$navapps' => (($mode == 'nav') ? true : false), + '$add' => t('Add to app-tray'), + '$remove' => t('Remove from app-tray') )); } diff --git a/Zotlabs/Module/Appman.php b/Zotlabs/Module/Appman.php index 270301d34..70cc7e44b 100644 --- a/Zotlabs/Module/Appman.php +++ b/Zotlabs/Module/Appman.php @@ -36,8 +36,9 @@ class Appman extends \Zotlabs\Web\Controller { if(Zlib\Apps::app_installed(local_channel(),$arr)) info( t('App installed.') . EOL); - - return; + + goaway(z_root() . '/apps'); + return; //not reached } diff --git a/Zotlabs/Module/Apps.php b/Zotlabs/Module/Apps.php index 2df6d675f..261615997 100644 --- a/Zotlabs/Module/Apps.php +++ b/Zotlabs/Module/Apps.php @@ -41,9 +41,12 @@ class Apps extends \Zotlabs\Web\Controller { return replace_macros(get_markup_template('myapps.tpl'), array( '$sitename' => get_config('system','sitename'), - '$cat' => ((array_key_exists('cat',$_GET) && $_GET['cat']) ? ' - ' . escape_tags($_GET['cat']) : ''), + '$cat' => ((array_key_exists('cat',$_GET) && $_GET['cat']) ? escape_tags($_GET['cat']) : ''), '$title' => t('Apps'), '$apps' => $apps, + '$authed' => ((local_channel()) ? true : false), + '$manage' => t('Manage apps'), + '$create' => (($mode == 'edit') ? t('Create new app') : '') )); } diff --git a/include/widgets.php b/include/widgets.php index bff2f0ab8..04cf0d30b 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -96,20 +96,6 @@ function widget_collections($args) { return group_side($every, $each, $edit, $current, $abook_id, $wmode); } - -function widget_appselect($arr) { - return replace_macros(get_markup_template('app_select.tpl'),array( - '$title' => t('Apps'), - '$system' => t('System'), - '$authed' => ((local_channel()) ? true : false), - '$personal' => t('Personal'), - '$new' => t('New App'), - '$edit' => t('Edit Apps'), - '$cat' => ((array_key_exists('cat',$_REQUEST)) ? $_REQUEST['cat'] : '') - )); -} - - function widget_suggestions($arr) { if((! local_channel()) || (! feature_enabled(local_channel(),'suggest'))) diff --git a/view/pdl/mod_apps.pdl b/view/pdl/mod_apps.pdl index 32fef28e9..1209d85b9 100644 --- a/view/pdl/mod_apps.pdl +++ b/view/pdl/mod_apps.pdl @@ -1,4 +1,3 @@ [region=aside] -[widget=appselect][/widget] [widget=appcategories][/widget] [/region] diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index ba97ad501..5ff205c53 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -18,7 +18,7 @@ {{if $install}}{{/if}} {{if $edit}}{{/if}} {{if $delete}}{{/if}} - {{if $feature}}{{/if}} + {{if $feature}}{{/if}} {{/if}} diff --git a/view/tpl/app_select.tpl b/view/tpl/app_select.tpl deleted file mode 100644 index 86ea0b1de..000000000 --- a/view/tpl/app_select.tpl +++ /dev/null @@ -1,10 +0,0 @@ -{{if $authed}} -
-

{{$title}}

- -
-{{/if}} - diff --git a/view/tpl/myapps.tpl b/view/tpl/myapps.tpl index 074965985..d0c741bf4 100755 --- a/view/tpl/myapps.tpl +++ b/view/tpl/myapps.tpl @@ -1,6 +1,13 @@
-

{{$title}}{{$cat}}

+ {{if $authed}} + {{if $create}} +  {{$create}} + {{else}} + {{$manage}} + {{/if}} + {{/if}} +

{{$title}}{{if $cat}} - {{$cat}}{{/if}}

{{foreach $apps as $ap}}