summaryrefslogtreecommitdiff
path: root/js/Headlines.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-07 22:05:39 +0300
committerAndrew Dolgov <[email protected]>2018-12-07 22:05:39 +0300
commit6e30af755cff7dce37b92740251af42353473a45 (patch)
tree65392d345f6b29b5e9af2ecd0c8e26792cdc66e3 /js/Headlines.js
parent3b7a9219f62ef8584ac15bd576aafbb7203759b1 (diff)
viewfeed: bring back comments prompt
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-xjs/Headlines.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index 78c9651cb..dcb8bdb2d 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -270,6 +270,18 @@ define(["dojo/_base/declare"], function (declare) {
${__('Originally from:')} <a target="_blank" rel="noopener noreferrer" href="${hl.orig_feed[1]}">${hl.orig_feed[0]}</a>
</div>` : "";
+ let comments = "";
+
+ if (hl.comments) {
+ let comments_msg = __("comments");
+
+ if (hl.num_comments > 0) {
+ comments_msg = hl.num_comments + " " + ngettext("comment", "comments", hl.num_comments)
+ }
+
+ comments = `<a href="${hl.comments}">(${comments_msg})</a>`;
+ }
+
row = `<div class="cdm ${row_class} ${hl.score_class}" id="RROW-${hl.id}" data-article-id="${hl.id}" data-orig-feed-id="${hl.feed_id}"
data-content="${hl.content}" onmouseover="Article.mouseIn(${hl.id})" onmouseout="Article.mouseOut(${hl.id})">
@@ -320,6 +332,7 @@ define(["dojo/_base/declare"], function (declare) {
<span id="ATSTR-${hl.id}">${hl.tags_str}</span>
<a title="Edit tags for this article" href="#"
onclick="Article.editTags(${hl.id})">(+)</a>
+ ${comments}
</div>
<div class="right">${hl.buttons}</div>