mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 23:15:15 +00:00
29 lines
548 B
PHP
29 lines
548 B
PHP
<?php
|
|
|
|
namespace Zotlabs\Widget;
|
|
|
|
use Zotlabs\Lib\Apps;
|
|
|
|
class Notes
|
|
{
|
|
|
|
public function widget($arr)
|
|
{
|
|
if (!local_channel()) {
|
|
return '';
|
|
}
|
|
if (!Apps::system_app_installed(local_channel(), 'Notes')) {
|
|
return '';
|
|
}
|
|
|
|
$text = get_pconfig(local_channel(), 'notes', 'text');
|
|
|
|
$o = replace_macros(get_markup_template('notes.tpl'), [
|
|
'$banner' => t('Notes'),
|
|
'$text' => $text,
|
|
'$save' => t('Save'),
|
|
]);
|
|
|
|
return $o;
|
|
}
|
|
}
|