aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-08-25 10:19:20 +0000
committerMario <mario@mariovavti.com>2021-08-25 10:19:20 +0000
commit2e7a915ee8d99970a32e02bf3ac5bb5834f7fa1a (patch)
tree63bced3dd0d77c31215b4b46228a46c74d2d5441 /Zotlabs
parent0081bafab2898074a8293b0ab691add4f7f02544 (diff)
downloadvolse-hubzilla-2e7a915ee8d99970a32e02bf3ac5bb5834f7fa1a.tar.gz
volse-hubzilla-2e7a915ee8d99970a32e02bf3ac5bb5834f7fa1a.tar.bz2
volse-hubzilla-2e7a915ee8d99970a32e02bf3ac5bb5834f7fa1a.zip
add appstore widget to appman
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Apps.php14
-rw-r--r--Zotlabs/Widget/Appcategories.php2
-rw-r--r--Zotlabs/Widget/Appstore.php7
3 files changed, 11 insertions, 12 deletions
diff --git a/Zotlabs/Module/Apps.php b/Zotlabs/Module/Apps.php
index 05b4495fc..77d1f2aec 100644
--- a/Zotlabs/Module/Apps.php
+++ b/Zotlabs/Module/Apps.php
@@ -9,7 +9,7 @@ class Apps extends \Zotlabs\Web\Controller {
function get() {
nav_set_selected('Apps');
-
+
if(argc() == 2 && argv(1) == 'edit')
$mode = 'edit';
else
@@ -18,9 +18,9 @@ class Apps extends \Zotlabs\Web\Controller {
$available = ((argc() == 2 && argv(1) === 'available') ? true : false);
$_SESSION['return_url'] = \App::$query_string;
-
+
$apps = array();
-
+
if(local_channel()) {
Zlib\Apps::import_system_apps();
$syslist = array();
@@ -37,9 +37,9 @@ class Apps extends \Zotlabs\Web\Controller {
$syslist = Zlib\Apps::get_system_apps(true);
usort($syslist,'Zotlabs\\Lib\\Apps::app_name_compare');
-
+
// logger('apps: ' . print_r($syslist,true));
-
+
foreach($syslist as $app) {
$apps[] = Zlib\Apps::app_render($app,(($available) ? 'install' : $mode));
}
@@ -53,7 +53,7 @@ class Apps extends \Zotlabs\Web\Controller {
'$manage' => (($available) ? '' : t('Manage Apps')),
'$create' => (($mode == 'edit') ? t('Create Custom App') : '')
));
-
+
}
-
+
}
diff --git a/Zotlabs/Widget/Appcategories.php b/Zotlabs/Widget/Appcategories.php
index aebd144d0..e916f095f 100644
--- a/Zotlabs/Widget/Appcategories.php
+++ b/Zotlabs/Widget/Appcategories.php
@@ -40,7 +40,7 @@ class Appcategories {
$terms[] = array('name' => $rr['term'], 'selected' => (($selected == $rr['term']) ? 'selected' : ''));
return replace_macros(get_markup_template('categories_widget.tpl'),array(
- '$title' => t('Categories'),
+ '$title' => t('App Categories'),
'$desc' => '',
'$sel_all' => (($selected == '') ? 'selected' : ''),
'$all' => t('Everything'),
diff --git a/Zotlabs/Widget/Appstore.php b/Zotlabs/Widget/Appstore.php
index 6a00ac06a..da05c0b62 100644
--- a/Zotlabs/Widget/Appstore.php
+++ b/Zotlabs/Widget/Appstore.php
@@ -6,12 +6,11 @@ namespace Zotlabs\Widget;
class Appstore {
function widget($arr) {
- $store = ((argc() > 1 && argv(1) === 'available') ? 1 : 0);
- return replace_macros(get_markup_template('appstore.tpl'), [
+ return replace_macros(get_markup_template('appstore.tpl'), [
'$title' => t('App Collections'),
'$options' => [
- [ z_root() . '/apps', t('Installed apps'), 1 - $store ],
- [ z_root() . '/apps/available', t('Available Apps'), $store ]
+ [z_root() . '/apps', t('Installed apps'), ((argc() == 1 && argv(0) === 'apps') ? 1 : 0)],
+ [z_root() . '/apps/available', t('Available Apps'), ((argc() > 1 && argv(1) === 'available') ? 1 : 0)]
]
]);
}