mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
Add link counts to alt
tags of their badges.
This commit is contained in:
parent
f5c3199b38
commit
055b367e2b
@ -60,7 +60,7 @@
|
||||
<ul class='topic-links'>
|
||||
{{#groupedEach infoLinks}}
|
||||
<li>
|
||||
<span class='badge badge-notification clicks' title='{{i18n topic_map.clicks}}'>{{clicks}}</span>
|
||||
<span class='badge badge-notification clicks' title='{{i18n topic_map.clicks count=clicks}}'>{{clicks}}</span>
|
||||
<a href="{{unbound url}}" target="_blank" class='topic-link track-link' data-user-id="{{unbound user_id}}" data-ignore-post-id="true" title="{{unbound url}}">
|
||||
{{#if title}}{{title}}{{else}}{{shortenUrl url}}{{/if}}
|
||||
{{#unless internal}}<i class='fa fa-external-link'></i>{{/unless}}
|
||||
|
@ -134,7 +134,7 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
||||
// don't display badge counts on category badge
|
||||
if (link.closest('.badge-category').length === 0 && (link.closest(".onebox-result").length === 0 || link.hasClass("track-link"))) {
|
||||
link.append("<span class='badge badge-notification clicks' title='" +
|
||||
I18n.t("topic_map.clicks") +
|
||||
I18n.t("topic_map.clicks", {count: lc.clicks}) +
|
||||
"'>" + Discourse.Formatter.number(lc.clicks) + "</span>");
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class TopicLinkSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
def clicks
|
||||
object['clicks'] || 0
|
||||
object['clicks'].to_i
|
||||
end
|
||||
|
||||
def user_id
|
||||
|
@ -1121,7 +1121,9 @@ en:
|
||||
topic_map:
|
||||
title: "Topic Summary"
|
||||
links_shown: "show all {{totalLinks}} links..."
|
||||
clicks: "clicks"
|
||||
clicks:
|
||||
one: "1 click"
|
||||
other: "%{count} clicks"
|
||||
|
||||
topic_statuses:
|
||||
locked:
|
||||
|
Loading…
Reference in New Issue
Block a user