mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge branch 'master' of github.com:discourse/discourse
This commit is contained in:
commit
14a807f433
@ -58,6 +58,8 @@ This vision translates to the following functional commitments:
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
[](https://travis-ci.org/discourse/discourse)
|
||||||
|
|
||||||
Discourse is **100% free** and **open-source**. We encourage and support an active, healthy community that
|
Discourse is **100% free** and **open-source**. We encourage and support an active, healthy community that
|
||||||
accepts contributions from the public, and we'd like you to be a part of that community.
|
accepts contributions from the public, and we'd like you to be a part of that community.
|
||||||
|
|
||||||
|
@ -304,10 +304,12 @@ Discourse.TopicController = Ember.ObjectController.extend Discourse.Presence,
|
|||||||
post.recover()
|
post.recover()
|
||||||
|
|
||||||
deletePost: (post) ->
|
deletePost: (post) ->
|
||||||
if post.get('user_id') is Discourse.get('currentUser.id')
|
# Moderators can delete posts. Regular users can only create a deleted at message.
|
||||||
|
if Discourse.get('currentUser.moderator')
|
||||||
|
post.set('deleted_at', new Date())
|
||||||
|
else
|
||||||
post.set('cooked', Discourse.Utilities.cook(Em.String.i18n("post.deleted_by_author")))
|
post.set('cooked', Discourse.Utilities.cook(Em.String.i18n("post.deleted_by_author")))
|
||||||
post.set('can_delete', false)
|
post.set('can_delete', false)
|
||||||
else
|
post.set('version', post.get('version') + 1)
|
||||||
post.set('deleted_at', new Date())
|
|
||||||
|
|
||||||
post.delete()
|
post.delete()
|
||||||
|
@ -535,7 +535,7 @@
|
|||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
}
|
}
|
||||||
.post-actions {
|
.post-actions {
|
||||||
padding: 6px 0 0px 15px;
|
padding: 5px 0 0px 15px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
img {
|
img {
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
class CurrentUserSerializer < BasicUserSerializer
|
class CurrentUserSerializer < BasicUserSerializer
|
||||||
|
|
||||||
attributes :name, :unread_notifications, :unread_private_messages, :admin, :notification_channel_position, :site_flagged_posts_count
|
attributes :name,
|
||||||
|
:unread_notifications,
|
||||||
|
:unread_private_messages,
|
||||||
|
:admin?,
|
||||||
|
:notification_channel_position,
|
||||||
|
:site_flagged_posts_count,
|
||||||
|
:moderator?
|
||||||
|
|
||||||
# we probably want to move this into site, but that json is cached so hanging it off current user seems okish
|
# we probably want to move this into site, but that json is cached so hanging it off current user seems okish
|
||||||
|
|
||||||
@ -8,6 +14,10 @@ class CurrentUserSerializer < BasicUserSerializer
|
|||||||
object.admin
|
object.admin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def moderator?
|
||||||
|
object.has_trust_level?(:moderator)
|
||||||
|
end
|
||||||
|
|
||||||
def site_flagged_posts_count
|
def site_flagged_posts_count
|
||||||
PostAction.flagged_posts_count
|
PostAction.flagged_posts_count
|
||||||
end
|
end
|
||||||
|
@ -517,7 +517,7 @@ en:
|
|||||||
title: "Receive an email digest of what's new"
|
title: "Receive an email digest of what's new"
|
||||||
daily: "daily"
|
daily: "daily"
|
||||||
weekly: "weekly"
|
weekly: "weekly"
|
||||||
bi_weekly: "bi-weekly"
|
bi_weekly: "every two weeks"
|
||||||
|
|
||||||
email_direct: "Receive an email when someone talks directly to you"
|
email_direct: "Receive an email when someone talks directly to you"
|
||||||
email_private_messages: "Receive an email when someone sends you a private message"
|
email_private_messages: "Receive an email when someone sends you a private message"
|
||||||
@ -831,7 +831,7 @@ en:
|
|||||||
reply_as_new_topic: "Reply as new Topic"
|
reply_as_new_topic: "Reply as new Topic"
|
||||||
continue_discussion: "Continuing the discussion from {{postLink}}:"
|
continue_discussion: "Continuing the discussion from {{postLink}}:"
|
||||||
follow_quote: "go to the quoted post"
|
follow_quote: "go to the quoted post"
|
||||||
deleted_by_author: "Post deleted by author."
|
deleted_by_author: "(post removed by author)"
|
||||||
|
|
||||||
has_replies_below:
|
has_replies_below:
|
||||||
one: "Reply Below"
|
one: "Reply Below"
|
||||||
|
Loading…
Reference in New Issue
Block a user