diff options
author | Mario <mario@mariovavti.com> | 2021-07-29 06:59:13 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-07-29 06:59:13 +0000 |
commit | 9722d157bf138753bc168f68c56b4963db6da4e9 (patch) | |
tree | a15bb81c35a2367fe4628614471d471ed86d2712 /Zotlabs/Widget/Hq_controls.php | |
parent | 219d47f04c7bb04dcc241b9ed6ca411fc9653f09 (diff) | |
parent | c6133d2558ce29e44342fa7be8bb65e0059aea02 (diff) | |
download | volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.gz volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.bz2 volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.zip |
Merge branch 'dev' into bs5
Diffstat (limited to 'Zotlabs/Widget/Hq_controls.php')
-rw-r--r-- | Zotlabs/Widget/Hq_controls.php | 39 |
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'] ] ); } |