mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
added delete all posts button
wired up the ability to enable all themes
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
window.Discourse.AdminUser = Discourse.Model.extend
|
||||
|
||||
deleteAllPosts: ->
|
||||
@set('can_delete_all_posts', false)
|
||||
$.ajax "/admin/users/#{@get('id')}/delete_all_posts", type: 'PUT'
|
||||
|
||||
# Revoke the user's admin access
|
||||
revokeAdmin: ->
|
||||
@set('admin',false)
|
||||
@set('can_grant_admin',true)
|
||||
@set('can_revoke_admin',false)
|
||||
@set('can_revoke_admin',false)
|
||||
$.ajax "/admin/users/#{@get('id')}/revoke_admin", type: 'PUT'
|
||||
|
||||
grantAdmin: ->
|
||||
@@ -18,13 +22,11 @@ window.Discourse.AdminUser = Discourse.Model.extend
|
||||
type: 'POST'
|
||||
bootbox.alert("Message sent to all clients!")
|
||||
|
||||
|
||||
|
||||
approve: ->
|
||||
@set('can_approve', false)
|
||||
@set('approved', true)
|
||||
@set('approved_by', Discourse.get('currentUser'))
|
||||
$.ajax "/admin/users/#{@get('id')}/approve", type: 'PUT'
|
||||
$.ajax "/admin/users/#{@get('id')}/approve", type: 'PUT'
|
||||
|
||||
username_lower:(->
|
||||
@get('username').toLowerCase()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class='message'>
|
||||
<div>{{avatar user imageSize="small"}} {{message}}</div>
|
||||
<div><a href="/admin{{unbound user.path}}">{{avatar user imageSize="small"}}</a> {{message}}</div>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
@@ -139,6 +139,14 @@
|
||||
<div class='display-row'>
|
||||
<div class='field'>{{i18n admin.user.post_count}}</div>
|
||||
<div class='value'>{{content.post_count}}</div>
|
||||
<div class='controls'>
|
||||
{{#if content.can_delete_all_posts}}
|
||||
<button class='btn' {{action deleteAllPosts target="content"}}>
|
||||
<i class='icon icon-trash'></i>
|
||||
{{i18n admin.user.delete_all_posts}}
|
||||
</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class='display-row'>
|
||||
<div class='field'>{{i18n admin.user.posts_read_count}}</div>
|
||||
|
||||
Reference in New Issue
Block a user