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:
ckeboss
2017-11-03 06:51:40 -07:00
committed by Robin Ward
parent d320f4840d
commit 93633865d9
8 changed files with 99 additions and 12 deletions

View File

@ -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 => {