mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 01:56:58 +08:00
Adds primary user group as a class to quote (#5285)
* Adds primary user group as a class to quote This feature addition will add the class `group-PRIMARY_USER_GROUP` to the quote `aside`. `PRIMARY_USER_GROUP` will be the primary user group of the user being quoted. This is similar to the class that is added to a `topic-post`. * Remove trailing whitespace * Fix avatar in test * Address PR comments * Fix trailing whitespace
This commit is contained in:
@ -244,7 +244,6 @@ QUnit.test("Quotes", assert => {
|
||||
</aside>`,
|
||||
"works with multiple lines");
|
||||
|
||||
|
||||
assert.cookedOptions("[quote=\"bob, post:1\"]\nmy quote\n[/quote]",
|
||||
{ topicId: 2, lookupAvatar: function() { } },
|
||||
`<aside class=\"quote\" data-post=\"1\">
|
||||
@ -270,6 +269,16 @@ QUnit.test("Quotes", assert => {
|
||||
</aside>`,
|
||||
"handles nested quotes properly");
|
||||
|
||||
assert.cookedOptions(`[quote="bob, post:1, topic:1"]\ntest quote\n[/quote]`, { lookupPrimaryUserGroupByPostNumber: () => "aUserGroup" },
|
||||
`<aside class="quote group-aUserGroup" data-post="1" data-topic="1">
|
||||
<div class="title">
|
||||
<div class="quote-controls"></div>
|
||||
bob:</div>
|
||||
<blockquote>
|
||||
<p>test quote</p>
|
||||
</blockquote>
|
||||
</aside>`,
|
||||
"quote has group class");
|
||||
});
|
||||
|
||||
QUnit.test("Mentions", assert => {
|
||||
|
Reference in New Issue
Block a user