From c3aa15cc165730b6e67de580065ace255454dfb5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 24 Sep 2018 11:46:18 +0200 Subject: appification of notes --- Zotlabs/Module/Notes.php | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) (limited to 'Zotlabs/Module/Notes.php') diff --git a/Zotlabs/Module/Notes.php b/Zotlabs/Module/Notes.php index e530e6ff4..cd383a6c2 100644 --- a/Zotlabs/Module/Notes.php +++ b/Zotlabs/Module/Notes.php @@ -1,13 +1,19 @@ true); if(array_key_exists('note_text',$_REQUEST)) { @@ -24,17 +30,38 @@ class Notes extends \Zotlabs\Web\Controller { } set_pconfig(local_channel(),'notes','text',$body); } - + // push updates to channel clones - + if((argc() > 1) && (argv(1) === 'sync')) { require_once('include/zot.php'); build_sync_packet(); } - + logger('notes saved.', LOGGER_DEBUG); json_return_and_die($ret); - + + } + + function get() { + + if(! local_channel()) + return EMPTY_STR; + + if(! Apps::system_app_installed(local_channel(), 'Notes')) { + //Do not display any associated widgets at this point + App::$pdl = EMPTY_STR; + + $o = 'Notes App (Not Installed):
'; + $o .= t('A simple notes app with a widget (note: notes are not encrypted)'); + return $o; + } + + $w = new \Zotlabs\Widget\Notes; + $arr = ['app' => true]; + + return $w->widget($arr); + } } -- cgit v1.2.3 From c13d7e29ef9676b0f0e4ae23aa52e203f4ad8895 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 28 Sep 2018 15:35:39 +0200 Subject: Update Notes.php --- Zotlabs/Module/Notes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Notes.php') diff --git a/Zotlabs/Module/Notes.php b/Zotlabs/Module/Notes.php index cd383a6c2..2916925e2 100644 --- a/Zotlabs/Module/Notes.php +++ b/Zotlabs/Module/Notes.php @@ -52,7 +52,7 @@ class Notes extends Controller { //Do not display any associated widgets at this point App::$pdl = EMPTY_STR; - $o = 'Notes App (Not Installed):
'; + $o = '' . t('Notes App (Not Installed):') . '
'; $o .= t('A simple notes app with a widget (note: notes are not encrypted)'); return $o; } -- cgit v1.2.3 From c34c0c671883385145b6cda7bb84ace143b55bd6 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 28 Sep 2018 19:48:09 +0200 Subject: Update Notes.php --- Zotlabs/Module/Notes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Notes.php') diff --git a/Zotlabs/Module/Notes.php b/Zotlabs/Module/Notes.php index 2916925e2..178a6bce0 100644 --- a/Zotlabs/Module/Notes.php +++ b/Zotlabs/Module/Notes.php @@ -52,7 +52,7 @@ class Notes extends Controller { //Do not display any associated widgets at this point App::$pdl = EMPTY_STR; - $o = '' . t('Notes App (Not Installed):') . '
'; + $o = '' . t('Notes App') . ' (' . t('Not Installed') . '):
'; $o .= t('A simple notes app with a widget (note: notes are not encrypted)'); return $o; } -- cgit v1.2.3