]> git.wh0rd.org - tt-rss.git/commitdiff
do not show edit note prompt when article is shown in zoom mode
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 23 Jan 2013 08:22:07 +0000 (12:22 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 23 Jan 2013 08:22:07 +0000 (12:22 +0400)
include/functions.php

index 0ee058086cc0169238746d261e5a257bbac975e1..62d64e2477e69465a9bd3e534a48ecf07a6564f1 100644 (file)
 
                        $rv['content'] .= "<div id=\"POSTNOTE-$id\">";
                                if ($line['note']) {
-                                       $rv['content'] .= format_article_note($id, $line['note']);
+                                       $rv['content'] .= format_article_note($id, $line['note'], !$zoom_mode);
                                }
                        $rv['content'] .= "</div>";
 
 
        }
 
-       function format_article_note($id, $note) {
+       function format_article_note($id, $note, $allow_edit = true) {
 
                $str = "<div class='articleNote'        onclick=\"editArticleNote($id)\">
                        <div class='noteEdit' onclick=\"editArticleNote($id)\">".
-                       __('(edit note)')."</div>$note</div>";
+                       ($allow_edit ? __('(edit note)') : "")."</div>$note</div>";
 
                return $str;
        }