Add moderator style while in topic
This commit is contained in:
parent
77a924eadc
commit
94e58d733e
|
@ -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>
|
||||
|
|
|
@ -320,6 +320,12 @@
|
|||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
h3.moderator a {
|
||||
background-color: #ffe;
|
||||
border: 1px solid #ffd;
|
||||
}
|
||||
|
||||
div {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue