aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-08-23 10:32:48 +0000
committerMario <mario@mariovavti.com>2021-08-23 10:32:48 +0000
commit189da4fdc1408a25b4fd68c0b7d5834232a599a2 (patch)
tree4221698837998da94687e94cb16c15ad86be78ee /Zotlabs
parent824894baf0f11e85552c283ee948febd8bac5e06 (diff)
downloadvolse-hubzilla-189da4fdc1408a25b4fd68c0b7d5834232a599a2.tar.gz
volse-hubzilla-189da4fdc1408a25b4fd68c0b7d5834232a599a2.tar.bz2
volse-hubzilla-189da4fdc1408a25b4fd68c0b7d5834232a599a2.zip
untangle the app template into separate templates and fix bbcode view
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Apps.php28
1 files changed, 26 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index a9af0812d..ba854197f 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -547,12 +547,38 @@ class Apps {
}
if($mode === 'navbar') {
+ return replace_macros(get_markup_template('app_nav_pinned.tpl'),array(
+ '$app' => $papp,
+ '$icon' => $icon,
+ ));
+ }
+
+ if($mode === 'nav') {
return replace_macros(get_markup_template('app_nav.tpl'),array(
'$app' => $papp,
'$icon' => $icon,
));
}
+ if($mode === 'inline') {
+ return replace_macros(get_markup_template('app_inline.tpl'),array(
+ '$app' => $papp,
+ '$icon' => $icon,
+ '$installed' => $installed,
+ '$purchase' => ((isset($papp['page']) && (! $installed)) ? t('Purchase') : ''),
+ '$action_label' => $install_action
+ ));
+ }
+
+ if(in_array($mode, ['nav-order', 'nav-order-pinned'])) {
+ return replace_macros(get_markup_template('app_order.tpl'),array(
+ '$app' => $papp,
+ '$icon' => $icon,
+ '$hosturl' => $hosturl,
+ '$mode' => $mode
+ ));
+ }
+
if($mode === 'install') {
$papp['embed'] = true;
}
@@ -573,8 +599,6 @@ class Apps {
'$pin' => ((isset($papp['embed']) || $mode == 'edit') ? false : true),
'$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
'$pinned' => ((strpos($papp['categories'], 'nav_pinned_app') === false) ? false : true),
- '$navapps' => (($mode == 'nav') ? true : false),
- '$order' => (($mode === 'nav-order' || $mode === 'nav-order-pinned') ? true : false),
'$mode' => $mode,
'$add' => t('Add to app-tray'),
'$remove' => t('Remove from app-tray'),