2017-03-15 23:55:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Widget;
|
|
|
|
|
2019-06-25 00:35:12 +00:00
|
|
|
use Zotlabs\Lib\Apps;
|
|
|
|
|
2017-03-15 23:55:47 +00:00
|
|
|
class Notes {
|
|
|
|
|
|
|
|
function widget($arr) {
|
2019-06-25 00:35:12 +00:00
|
|
|
if (! local_channel()) {
|
2017-03-15 23:55:47 +00:00
|
|
|
return '';
|
2019-06-25 00:35:12 +00:00
|
|
|
}
|
|
|
|
if (! Apps::system_app_installed(local_channel(),'Notes')) {
|
2017-03-15 23:55:47 +00:00
|
|
|
return '';
|
2019-06-25 00:35:12 +00:00
|
|
|
}
|
2017-03-15 23:55:47 +00:00
|
|
|
|
|
|
|
$text = get_pconfig(local_channel(),'notes','text');
|
|
|
|
|
2019-06-25 00:35:12 +00:00
|
|
|
$o = replace_macros(get_markup_template('notes.tpl'), [
|
2017-03-15 23:55:47 +00:00
|
|
|
'$banner' => t('Notes'),
|
|
|
|
'$text' => $text,
|
|
|
|
'$save' => t('Save'),
|
2019-06-25 00:35:12 +00:00
|
|
|
]);
|
2017-03-15 23:55:47 +00:00
|
|
|
|
|
|
|
return $o;
|
|
|
|
}
|
|
|
|
}
|