diff options
Diffstat (limited to 'classes')
-rwxr-xr-x | classes/article.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/classes/article.php b/classes/article.php index 091caa735..6553bc67d 100755 --- a/classes/article.php +++ b/classes/article.php @@ -909,9 +909,18 @@ class Article extends Handler_Protected { static function format_article_note($id, $note, $allow_edit = true) { - $str = "<div class='articleNote' onclick=\"Plugins.Note.edit($id)\"> - <div class='noteEdit' onclick=\"Plugins.Note.edit($id)\">". - ($allow_edit ? __('(edit note)') : "")."</div>$note</div>"; + if ($allow_edit) { + $onclick = "onclick='Plugins.Note.edit($id)'"; + $note_class = 'editable'; + } else { + $onclick = ''; + $note_class = ''; + } + + return "<div class='article-note $note_class'> + <i class='material-icons'>note</i> + <div $onclick class='body'>$note</div> + </div>"; return $str; } |