diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index ddbf48a18..7e52941c2 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -341,6 +341,7 @@ class Apps { 'View Profile' => t('View Profile'), 'Photos' => t('Photos'), 'Events' => t('Events'), + 'Tasks' => t('Tasks'), 'No Comment' => t('No Comment'), 'Directory' => t('Directory'), 'Help' => t('Help'), diff --git a/Zotlabs/Module/Tasks.php b/Zotlabs/Module/Tasks.php index fce5ae455..371c79fe2 100644 --- a/Zotlabs/Module/Tasks.php +++ b/Zotlabs/Module/Tasks.php @@ -3,6 +3,7 @@ namespace Zotlabs\Module; use App; use Zotlabs\Web\Controller; +use Zotlabs\Lib\Apps; require_once('include/event.php'); @@ -96,4 +97,19 @@ class Tasks extends Controller { json_return_and_die($x); } } + + function get() { + $desc = t('This app provides a simple personal and task list.'); + + $text = '
' . $desc . '
'; + + if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Tasks'))) { + return $text; + } + + $obj = new \Zotlabs\Widget\Tasklist; + return $obj->widget([]); + } + + } diff --git a/Zotlabs/Widget/Tasklist.php b/Zotlabs/Widget/Tasklist.php index 56342bd17..122b7ecfb 100644 --- a/Zotlabs/Widget/Tasklist.php +++ b/Zotlabs/Widget/Tasklist.php @@ -2,14 +2,17 @@ namespace Zotlabs\Widget; +use Zotlabs\Lib\Apps; + require_once('include/event.php'); class Tasklist { function widget($arr) { - if (! local_channel()) - return; + if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Tasks'))) { + return EMPTY_STR; + } $o .= ''; $o .= '