diff options
author | Andrew Dolgov <[email protected]> | 2018-12-06 20:55:51 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-06 20:55:51 +0300 |
commit | 4cbc62d2a529116d0117eb83a62c3270b5e6bd9f (patch) | |
tree | 43ed3d4cce9c3753c68d09b77607faa9081f2936 /classes/article.php | |
parent | 75666ac7aba80bdcad8ef0c73ccd8936b0a8987d (diff) |
article note format updates
Diffstat (limited to 'classes/article.php')
-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; } |