appstore changes

This commit is contained in:
zotlabs
2018-07-04 23:20:35 -07:00
parent 51a2e64a89
commit f6e8ce5516
6 changed files with 112 additions and 12 deletions

View File

@@ -17,6 +17,9 @@ class Appcategories {
// Leaving this line which negates the effect of the two invalid lines prior
$srchurl = z_root() . '/apps';
if(argc() > 1 && argv(1) === 'available')
$srchurl .= '/available';
$terms = array();

View File

@@ -0,0 +1,18 @@
<?php
namespace Zotlabs\Widget;
class Appstore {
function widget($arr) {
$store = ((argc() > 1 && argv(1) === 'available') ? 1 : 0);
return replace_macros(get_markup_template('appstore.tpl'), [
'$title' => t('App Collections'),
'$options' => [
[ z_root() . '/apps/available', t('Available Apps'), $store ],
[ z_root() . '/apps', t('Installed apps'), 1 - $store ]
]
]);
}
}