Add primary group class to the username too
This commit is contained in:
parent
c14d754e02
commit
e5a8c606d4
|
@ -8,11 +8,15 @@ var PosterNameComponent = Em.Component.extend({
|
||||||
if (post) {
|
if (post) {
|
||||||
var name = post.get('name'),
|
var name = post.get('name'),
|
||||||
username = post.get('username'),
|
username = post.get('username'),
|
||||||
linkClass = 'username';
|
linkClass = 'username',
|
||||||
|
primaryGroupName = post.get('primary_group_name');
|
||||||
|
|
||||||
if (post.get('staff')) { linkClass += ' staff'; }
|
if (post.get('staff')) { linkClass += ' staff'; }
|
||||||
if (post.get('new_user')) { linkClass += ' new-user'; }
|
if (post.get('new_user')) { linkClass += ' new-user'; }
|
||||||
|
|
||||||
|
if (!Em.isEmpty(primaryGroupName)) {
|
||||||
|
linkClass += ' ' + primaryGroupName;
|
||||||
|
}
|
||||||
// Main link
|
// Main link
|
||||||
buffer.push("<span class='" + linkClass + "'><a href='#'>" + username + "</a>");
|
buffer.push("<span class='" + linkClass + "'><a href='#'>" + username + "</a>");
|
||||||
|
|
||||||
|
@ -31,7 +35,6 @@ var PosterNameComponent = Em.Component.extend({
|
||||||
// User titles
|
// User titles
|
||||||
var title = post.get('user_title');
|
var title = post.get('user_title');
|
||||||
if (!Em.isEmpty(title)) {
|
if (!Em.isEmpty(title)) {
|
||||||
var primaryGroupName = post.get('primary_group_name');
|
|
||||||
|
|
||||||
buffer.push('<span class="user-title">');
|
buffer.push('<span class="user-title">');
|
||||||
if (Em.isEmpty(primaryGroupName)) {
|
if (Em.isEmpty(primaryGroupName)) {
|
||||||
|
|
Loading…
Reference in New Issue