mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
improve UX remove username said if we have a title
This commit is contained in:
parent
855370b242
commit
150ad01111
2 changed files with 3 additions and 2 deletions
|
@ -48,9 +48,10 @@ Discourse.BBCode.register('quote', {noWrap: true, singlePara: true}, function(co
|
|||
if (options.topicId && postNumber && options.getTopicInfo && topicId !== options.topicId) {
|
||||
var topicInfo = options.getTopicInfo(topicId);
|
||||
if (topicInfo) {
|
||||
header.push(' ');
|
||||
var href = topicInfo.href;
|
||||
if (postNumber > 0) { href += "/" + postNumber; }
|
||||
// get rid of username said stuff
|
||||
header.pop();
|
||||
header.push(['a', {'href': href}, topicInfo.title]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ describe PrettyText do
|
|||
topic = Fabricate(:topic, title: "this is a test topic")
|
||||
expected = <<HTML
|
||||
<aside class="quote" data-post="2" data-topic="#{topic.id}"><div class="title">
|
||||
<div class="quote-controls"></div>EvilTrout: <a href="http://test.localhost/t/this-is-a-test-topic/#{topic.id}/2">This is a test topic</a>
|
||||
<div class="quote-controls"></div><a href="http://test.localhost/t/this-is-a-test-topic/#{topic.id}/2">This is a test topic</a>
|
||||
</div>
|
||||
<blockquote><p>ddd</p></blockquote></aside>
|
||||
HTML
|
||||
|
|
Loading…
Reference in a new issue