aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Hq_controls.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Widget/Hq_controls.php')
-rw-r--r--Zotlabs/Widget/Hq_controls.php39
1 files changed, 29 insertions, 10 deletions
diff --git a/Zotlabs/Widget/Hq_controls.php b/Zotlabs/Widget/Hq_controls.php
index 0caa54a1a..91335fd76 100644
--- a/Zotlabs/Widget/Hq_controls.php
+++ b/Zotlabs/Widget/Hq_controls.php
@@ -2,24 +2,43 @@
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Apps;
+
+
class Hq_controls {
- function widget($arr) {
+ function widget($options) {
if (! local_channel())
return;
+ $entries = [
+ 'toggle_editor' => [
+ 'label' => t('Toggle post editor'),
+ 'href' => '#',
+ 'class' => 'btn jot-toggle',
+ 'type' => 'button',
+ 'icon' => 'pencil',
+ 'extra' => 'data-toggle="button"'
+ ]
+ ];
+
+ if(Apps::system_app_installed(local_channel(), 'Notes')) {
+ $entries['toggle_notes'] = [
+ 'label' => t('Toggle personal notes'),
+ 'href' => '#',
+ 'class' => 'btn notes-toggle',
+ 'type' => 'button',
+ 'icon' => 'sticky-note-o',
+ 'extra' => 'data-toggle="button"'
+ ];
+ }
+
return replace_macros(get_markup_template('hq_controls.tpl'),
[
- '$title' => t('HQ Control Panel'),
- '$menu' => [
- 'create' => [
- 'label' => t('Create a new post'),
- 'id' => 'jot-toggle',
- 'href' => '#',
- 'class' => ''
- ]
- ]
+ '$entries' => $entries,
+ '$wrapper_class' => $options['wrapper_class'],
+ '$entry_class' => $options['entry_class']
]
);
}