mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 16:02:45 +08:00

to the same host enough tiles, they will not be able to post the same link again. Additionally, the site will flag all their previous posts with links as spam and they will be instantly hidden via the auto hide workflow.
31 lines
803 B
JavaScript
31 lines
803 B
JavaScript
/**
|
|
This view renders a link within a post
|
|
|
|
@class PostLinkView
|
|
@extends Discourse.View
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.PostLinkView = Discourse.View.extend({
|
|
tagName: 'li',
|
|
classNameBindings: ['direction'],
|
|
|
|
direction: function() {
|
|
if (this.get('content.reflection')) return 'incoming';
|
|
return null;
|
|
}.property('content.reflection'),
|
|
|
|
render: function(buffer) {
|
|
var clicks;
|
|
buffer.push("<a href='" + (this.get('content.url')) + "' class='track-link'>\n");
|
|
buffer.push("<i class='icon icon-arrow-right'></i>");
|
|
buffer.push(this.get('content.title'));
|
|
if (clicks = this.get('content.clicks')) {
|
|
buffer.push("\n<span class='badge badge-notification clicks'>" + clicks + "</span>");
|
|
}
|
|
return buffer.push("</a>");
|
|
}
|
|
});
|
|
|
|
|