aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Widget/Hq_controls.php24
-rw-r--r--Zotlabs/Widget/Notes.php3
2 files changed, 17 insertions, 10 deletions
diff --git a/Zotlabs/Widget/Hq_controls.php b/Zotlabs/Widget/Hq_controls.php
index 781e2a0bd..8c36b8d3a 100644
--- a/Zotlabs/Widget/Hq_controls.php
+++ b/Zotlabs/Widget/Hq_controls.php
@@ -2,6 +2,9 @@
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Apps;
+
+
class Hq_controls {
function widget($arr) {
@@ -21,16 +24,17 @@ class Hq_controls {
]
];
-
- $entries['toggle_notes'] = [
- 'label' => t('Toggle personal notes'),
- 'id' => 'notes-toggle',
- 'href' => '#',
- 'class' => 'btn btn-outline-primary',
- 'type' => 'button',
- 'icon' => 'sticky-note-o',
- 'extra' => 'data-toggle="button"'
- ];
+ if(Apps::system_app_installed(local_channel(), 'Notes')) {
+ $entries['toggle_notes'] = [
+ 'label' => t('Toggle personal notes'),
+ 'id' => 'notes-toggle',
+ 'href' => '#',
+ 'class' => 'btn btn-outline-primary',
+ 'type' => 'button',
+ 'icon' => 'sticky-note-o',
+ 'extra' => 'data-toggle="button"'
+ ];
+ }
return replace_macros(get_markup_template('hq_controls.tpl'),
[
diff --git a/Zotlabs/Widget/Notes.php b/Zotlabs/Widget/Notes.php
index b2c8eda86..05c1a0292 100644
--- a/Zotlabs/Widget/Notes.php
+++ b/Zotlabs/Widget/Notes.php
@@ -10,6 +10,9 @@ class Notes {
if(! local_channel())
return EMPTY_STR;
+ if(! Apps::system_app_installed(local_channel(), 'Notes'))
+ return EMPTY_STR;
+
$text = get_pconfig(local_channel(),'notes','text');
$tpl = get_markup_template('notes.tpl');