Add moderator style while in topic

This commit is contained in:
Robin Ward 2013-02-06 17:36:07 -05:00
parent 77a924eadc
commit 94e58d733e
3 changed files with 13 additions and 2 deletions

View File

@ -28,8 +28,8 @@
<div class='topic-meta-data span2'>
<div class='contents'>
<a href='/users/{{unbound username}}' class='excerptable' data-excerpt-position="right" data-excerpt-size="small">{{avatar this imageSize="large"}}</a>
<h3><a href='/users/{{unbound username}}'>{{breakUp username}}</a></h3>
<a href='/users/{{unbound username}}' class='excerptable' data-excerpt-position="right" data-excerpt-size="small" >{{avatar this imageSize="large"}}</a>
<h3 {{bindAttr class="moderator"}}><a href='/users/{{unbound username}}'>{{breakUp username}}</a></h3>
<div class='post-info'>
<a href='#' class='post-date' {{bindAttr data-share-url="url"}}>{{date created_at}}</a>

View File

@ -320,6 +320,12 @@
font-size: 14px;
line-height: 18px;
}
h3.moderator a {
background-color: #ffe;
border: 1px solid #ffd;
}
div {
display: block;
}

View File

@ -37,6 +37,7 @@ class PostSerializer < ApplicationSerializer
:bookmarked,
:raw,
:actions_summary,
:moderator?,
:avatar_template,
:user_id,
:draft_sequence,
@ -45,6 +46,10 @@ class PostSerializer < ApplicationSerializer
:deleted_at
def moderator?
object.user.has_trust_level?(:moderator)
end
def avatar_template
object.user.avatar_template
end