2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

UX: Include the flagged person's username on the flagged post

This commit is contained in:
Robin Ward 2017-11-09 13:18:33 -05:00
parent 6e2853da53
commit 3093074398
3 changed files with 14 additions and 0 deletions

View file

@ -20,6 +20,10 @@
</div> </div>
<div class="flagged-post-contents"> <div class="flagged-post-contents">
<div class='flagged-post-user-details'>
<a class='username' href={{user.path}} data-user-card={{flaggedPost.user.username}}>{{format-username flaggedPost.user.username}}</a>
</div>
<div class='flagged-post-excerpt'> <div class='flagged-post-excerpt'>
{{#unless hideTitle}} {{#unless hideTitle}}
<h3> <h3>

View file

@ -42,6 +42,14 @@
width: 100%; width: 100%;
word-wrap: break-word; word-wrap: break-word;
.flagged-post-user-details {
.username {
font-weight: bold;
color: $primary;
}
margin-bottom: 0.5em;
}
.d-icon { .d-icon {
display: inline-block; display: inline-block;
} }
@ -202,3 +210,4 @@
padding-right: 0.25em; padding-right: 0.25em;
} }
} }

View file

@ -8,6 +8,7 @@ QUnit.test("flagged posts", assert => {
assert.equal(find('.flagged-post .flag-user').length, 1, 'shows who flagged it'); assert.equal(find('.flagged-post .flag-user').length, 1, 'shows who flagged it');
assert.equal(find('.flagged-post-response').length, 2); assert.equal(find('.flagged-post-response').length, 2);
assert.equal(find('.flagged-post-response:eq(0) img.avatar').length, 1); assert.equal(find('.flagged-post-response:eq(0) img.avatar').length, 1);
assert.equal(find('.flagged-post-user-details .username').length, 1, 'shows the flagged username');
}); });
}); });