mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add moderator style while in topic
This commit is contained in:
parent
77a924eadc
commit
94e58d733e
@ -29,7 +29,7 @@
|
|||||||
<div class='topic-meta-data span2'>
|
<div class='topic-meta-data span2'>
|
||||||
<div class='contents'>
|
<div class='contents'>
|
||||||
<a href='/users/{{unbound username}}' class='excerptable' data-excerpt-position="right" data-excerpt-size="small" >{{avatar this imageSize="large"}}</a>
|
<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>
|
<h3 {{bindAttr class="moderator"}}><a href='/users/{{unbound username}}'>{{breakUp username}}</a></h3>
|
||||||
|
|
||||||
<div class='post-info'>
|
<div class='post-info'>
|
||||||
<a href='#' class='post-date' {{bindAttr data-share-url="url"}}>{{date created_at}}</a>
|
<a href='#' class='post-date' {{bindAttr data-share-url="url"}}>{{date created_at}}</a>
|
||||||
|
@ -320,6 +320,12 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h3.moderator a {
|
||||||
|
background-color: #ffe;
|
||||||
|
border: 1px solid #ffd;
|
||||||
|
}
|
||||||
|
|
||||||
div {
|
div {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ class PostSerializer < ApplicationSerializer
|
|||||||
:bookmarked,
|
:bookmarked,
|
||||||
:raw,
|
:raw,
|
||||||
:actions_summary,
|
:actions_summary,
|
||||||
|
:moderator?,
|
||||||
:avatar_template,
|
:avatar_template,
|
||||||
:user_id,
|
:user_id,
|
||||||
:draft_sequence,
|
:draft_sequence,
|
||||||
@ -45,6 +46,10 @@ class PostSerializer < ApplicationSerializer
|
|||||||
:deleted_at
|
:deleted_at
|
||||||
|
|
||||||
|
|
||||||
|
def moderator?
|
||||||
|
object.user.has_trust_level?(:moderator)
|
||||||
|
end
|
||||||
|
|
||||||
def avatar_template
|
def avatar_template
|
||||||
object.user.avatar_template
|
object.user.avatar_template
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user