Merge branch 'master' of github.com:discourse/discourse
This commit is contained in:
commit
fd694e7b83
|
@ -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 {{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'>
|
<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>
|
||||||
|
|
|
@ -326,6 +326,10 @@
|
||||||
border: 1px solid #ffd;
|
border: 1px solid #ffd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h3.new-user a[href] {
|
||||||
|
color: $dark_gray;
|
||||||
|
}
|
||||||
|
|
||||||
div {
|
div {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,6 +137,8 @@ class SiteSetting < ActiveRecord::Base
|
||||||
# Ways to catch griefers and other nasties
|
# Ways to catch griefers and other nasties
|
||||||
setting(:email_blacklist_regexp, '')
|
setting(:email_blacklist_regexp, '')
|
||||||
|
|
||||||
|
setting(:new_user_period_days, 10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def self.call_mothership?
|
def self.call_mothership?
|
||||||
|
|
|
@ -37,6 +37,7 @@ class PostSerializer < ApplicationSerializer
|
||||||
:bookmarked,
|
:bookmarked,
|
||||||
:raw,
|
:raw,
|
||||||
:actions_summary,
|
:actions_summary,
|
||||||
|
:new_user?,
|
||||||
:moderator?,
|
:moderator?,
|
||||||
:avatar_template,
|
:avatar_template,
|
||||||
:user_id,
|
:user_id,
|
||||||
|
@ -46,6 +47,10 @@ class PostSerializer < ApplicationSerializer
|
||||||
:deleted_at
|
:deleted_at
|
||||||
|
|
||||||
|
|
||||||
|
def new_user?
|
||||||
|
object.user.created_at > SiteSetting.new_user_period_days.days.ago
|
||||||
|
end
|
||||||
|
|
||||||
def moderator?
|
def moderator?
|
||||||
object.user.has_trust_level?(:moderator)
|
object.user.has_trust_level?(:moderator)
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><%=t :title%></title>
|
<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="description">
|
||||||
<meta content="" name="author">
|
<meta content="" name="author">
|
||||||
<%-
|
<%-
|
||||||
|
|
|
@ -314,6 +314,8 @@ en:
|
||||||
|
|
||||||
email_blacklist_regexp: "A regexp that finds email addresses to block"
|
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
|
# This section is exported to the javascript for i18n in the admin section
|
||||||
admin_js:
|
admin_js:
|
||||||
type_to_filter: "type to filter..."
|
type_to_filter: "type to filter..."
|
||||||
|
|
Loading…
Reference in New Issue