mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Merge branch 'master' of github.com:discourse/discourse
This commit is contained in:
commit
fd694e7b83
6 changed files with 15 additions and 2 deletions
|
@ -29,7 +29,7 @@
|
|||
<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 {{bindAttr class="moderator"}}><a href='/users/{{unbound username}}'>{{breakUp username}}</a></h3>
|
||||
<h3 {{bindAttr class="moderator new_user"}}><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>
|
||||
|
|
|
@ -326,6 +326,10 @@
|
|||
border: 1px solid #ffd;
|
||||
}
|
||||
|
||||
h3.new-user a[href] {
|
||||
color: $dark_gray;
|
||||
}
|
||||
|
||||
div {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -137,6 +137,8 @@ class SiteSetting < ActiveRecord::Base
|
|||
# Ways to catch griefers and other nasties
|
||||
setting(:email_blacklist_regexp, '')
|
||||
|
||||
setting(:new_user_period_days, 10)
|
||||
|
||||
|
||||
|
||||
def self.call_mothership?
|
||||
|
|
|
@ -37,6 +37,7 @@ class PostSerializer < ApplicationSerializer
|
|||
:bookmarked,
|
||||
:raw,
|
||||
:actions_summary,
|
||||
:new_user?,
|
||||
:moderator?,
|
||||
:avatar_template,
|
||||
:user_id,
|
||||
|
@ -46,6 +47,10 @@ class PostSerializer < ApplicationSerializer
|
|||
:deleted_at
|
||||
|
||||
|
||||
def new_user?
|
||||
object.user.created_at > SiteSetting.new_user_period_days.days.ago
|
||||
end
|
||||
|
||||
def moderator?
|
||||
object.user.has_trust_level?(:moderator)
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%=t :title%></title>
|
||||
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<meta content="" name="description">
|
||||
<meta content="" name="author">
|
||||
<%-
|
||||
|
|
|
@ -314,6 +314,8 @@ en:
|
|||
|
||||
email_blacklist_regexp: "A regexp that finds email addresses to block"
|
||||
|
||||
new_user_period_days: "How long a user is highlighted as being new, in days."
|
||||
|
||||
# This section is exported to the javascript for i18n in the admin section
|
||||
admin_js:
|
||||
type_to_filter: "type to filter..."
|
||||
|
|
Loading…
Reference in a new issue