summaryrefslogtreecommitdiff
path: root/classes/article.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-06 20:55:51 +0300
committerAndrew Dolgov <[email protected]>2018-12-06 20:55:51 +0300
commit4cbc62d2a529116d0117eb83a62c3270b5e6bd9f (patch)
tree43ed3d4cce9c3753c68d09b77607faa9081f2936 /classes/article.php
parent75666ac7aba80bdcad8ef0c73ccd8936b0a8987d (diff)
article note format updates
Diffstat (limited to 'classes/article.php')
-rwxr-xr-xclasses/article.php15
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;
}