2015-05-19 22:56:32 +08:00
|
|
|
<section class="details {{unless model.active 'not-activated'}}">
|
2014-08-28 01:52:01 +08:00
|
|
|
<div class='user-controls'>
|
2016-01-19 23:41:07 +08:00
|
|
|
{{#if model.canViewProfile}}
|
2018-10-25 04:09:36 +08:00
|
|
|
{{#link-to 'user' model class="btn btn-default"}}
|
2017-07-27 04:25:09 +08:00
|
|
|
{{d-icon "user"}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'admin.user.show_public_profile'}}
|
2014-09-03 22:41:13 +08:00
|
|
|
{{/link-to}}
|
2016-01-19 23:41:07 +08:00
|
|
|
{{/if}}
|
2018-01-18 02:03:14 +08:00
|
|
|
|
2017-02-21 20:45:30 +08:00
|
|
|
{{#if model.can_view_action_logs}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button action=(action "viewActionLogs") class="btn-default" actionParam=model.username icon="list-alt" label="admin.user.action_logs"}}
|
2017-02-21 20:45:30 +08:00
|
|
|
{{/if}}
|
2016-01-19 23:41:07 +08:00
|
|
|
{{#if model.active}}
|
2014-09-03 22:41:13 +08:00
|
|
|
{{#if currentUser.admin}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "logOut") icon="power-off" label="admin.user.log_out"}}
|
2014-09-03 22:41:13 +08:00
|
|
|
{{/if}}
|
2014-08-28 01:52:01 +08:00
|
|
|
{{/if}}
|
2017-11-10 03:11:12 +08:00
|
|
|
{{plugin-outlet name="admin-user-controls-after" args=(hash model=model) tagName="" connectorTagName=""}}
|
2014-08-28 01:52:01 +08:00
|
|
|
</div>
|
|
|
|
|
2014-09-03 22:41:13 +08:00
|
|
|
<div class='display-row username'>
|
2018-12-17 22:28:29 +08:00
|
|
|
{{admin-editable-field name='user.username.title'
|
|
|
|
value=model.username
|
|
|
|
action=(action 'saveUsername')
|
|
|
|
editing=editingUsername}}
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2015-09-19 20:13:28 +08:00
|
|
|
<div class='display-row'>
|
2018-12-17 22:28:29 +08:00
|
|
|
{{admin-editable-field name='user.name.title'
|
|
|
|
value=model.name
|
|
|
|
action=(action 'saveName')
|
|
|
|
editing=editingName}}
|
2015-09-19 20:13:28 +08:00
|
|
|
</div>
|
|
|
|
|
2018-04-05 03:47:14 +08:00
|
|
|
{{plugin-outlet name="admin-user-below-names" args=(hash user=model) tagName='' connectorTagName=''}}
|
|
|
|
|
2014-09-30 04:31:05 +08:00
|
|
|
{{#if canCheckEmails}}
|
|
|
|
<div class='display-row email'>
|
2018-07-03 19:51:22 +08:00
|
|
|
<div class='field'>{{i18n 'user.email.primary'}}</div>
|
2014-09-30 04:31:05 +08:00
|
|
|
<div class='value'>
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#unless model.active}}
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='controls'>{{i18n 'admin.users.not_verified'}}</div>
|
2014-09-30 04:31:05 +08:00
|
|
|
{{/unless}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.email}}
|
|
|
|
<a href="mailto:{{unbound model.email}}">{{model.email}}</a>
|
2014-09-30 04:31:05 +08:00
|
|
|
{{else}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(route-action "checkEmail") actionParam=model icon="envelope-o" label="admin.users.check_email.text" title="admin.users.check_email.title"}}
|
2014-09-30 04:31:05 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2018-07-03 19:51:22 +08:00
|
|
|
<div class='display-row secondary-emails'>
|
|
|
|
<div class='field'>{{i18n 'user.email.secondary'}}</div>
|
|
|
|
|
|
|
|
<div class='value'>
|
|
|
|
{{#if model.email}}
|
|
|
|
{{#if model.secondary_emails}}
|
|
|
|
<ul>
|
|
|
|
{{#each model.secondary_emails as |email| }}
|
|
|
|
<li><a href="mailto:{{unbound email}}">{{email}}</a></li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
|
|
|
{{i18n 'user.email.no_secondary'}}
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button action=(route-action "checkEmail")
|
2018-10-25 04:09:36 +08:00
|
|
|
class="btn-default"
|
2018-07-03 19:51:22 +08:00
|
|
|
actionParam=model
|
|
|
|
icon="envelope-o"
|
|
|
|
label="admin.users.check_email.text"
|
|
|
|
title="admin.users.check_email.title"}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-06-20 18:39:53 +08:00
|
|
|
<div class="display-row bounce-score">
|
|
|
|
<div class='field'><a href="{{model.bounceLink}}">{{i18n 'admin.user.bounce_score'}}</a></div>
|
|
|
|
<div class='value'>{{model.bounceScore}}</div>
|
|
|
|
<div class='controls'>
|
|
|
|
{{#if model.canResetBounceScore}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "resetBounceScore") label="admin.user.reset_bounce_score.label" title="admin.user.reset_bounce_score.title"}}
|
2016-06-20 18:39:53 +08:00
|
|
|
{{/if}}
|
|
|
|
{{model.bounceScoreExplanation}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-09-30 04:31:05 +08:00
|
|
|
<div class='display-row associations'>
|
2018-07-23 23:51:57 +08:00
|
|
|
<div class='field'>{{i18n 'user.associated_accounts.title'}}</div>
|
2014-09-30 04:31:05 +08:00
|
|
|
<div class='value'>
|
2018-07-23 23:51:57 +08:00
|
|
|
{{#if associatedAccountsLoaded}}
|
|
|
|
{{associatedAccounts}}
|
2014-09-30 04:31:05 +08:00
|
|
|
{{else}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(route-action "checkEmail") actionParam=model icon="envelope-o" label="admin.users.check_email.text" title="admin.users.check_email.title"}}
|
2014-09-30 04:31:05 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2014-09-25 13:50:54 +08:00
|
|
|
|
2013-11-12 04:03:17 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'user.avatar.title'}}</div>
|
2019-01-16 11:50:24 +08:00
|
|
|
<div class='value'>{{avatar model imageSize="large"}}</div>
|
2017-05-27 03:00:31 +08:00
|
|
|
<div class="controls">
|
|
|
|
{{{i18n "admin.user.visit_profile" url=preferencesPath}}}
|
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2013-06-26 06:39:20 +08:00
|
|
|
<div class='display-row'>
|
2018-12-17 22:28:29 +08:00
|
|
|
{{admin-editable-field name='user.title.title'
|
|
|
|
value=model.title
|
|
|
|
action=(action 'saveTitle')
|
|
|
|
editing=editingTitle}}
|
2013-06-26 06:39:20 +08:00
|
|
|
</div>
|
|
|
|
|
2018-02-02 13:40:10 +08:00
|
|
|
<div class='display-row last-ip'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'user.ip_address.title'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.ip_address}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='controls'>
|
2014-11-24 18:08:13 +08:00
|
|
|
{{#if currentUser.staff}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "refreshBrowsers") label="admin.user.refresh_browsers"}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{ip-lookup ip=model.ip_address userId=model.id}}
|
2013-05-02 13:15:17 +08:00
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2018-02-02 13:40:10 +08:00
|
|
|
<div class='display-row registration-ip'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'user.registration_ip_address.title'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.registration_ip_address}}</div>
|
2014-06-16 00:14:19 +08:00
|
|
|
<div class='controls'>
|
2014-11-24 18:08:13 +08:00
|
|
|
{{#if currentUser.staff}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{ip-lookup ip=model.registration_ip_address userId=model.id}}
|
2014-06-16 00:14:19 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2014-04-30 02:37:56 +08:00
|
|
|
</div>
|
|
|
|
|
2014-03-19 22:27:21 +08:00
|
|
|
{{#if showBadges}}
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.badges.title'}}</div>
|
2014-03-19 22:27:21 +08:00
|
|
|
<div class='value'>
|
2015-05-19 22:56:32 +08:00
|
|
|
{{i18n 'badges.badge_count' count=model.badge_count}}
|
2014-03-19 22:27:21 +08:00
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
2017-07-27 04:25:09 +08:00
|
|
|
{{#link-to 'adminUser.badges' model class="btn"}}{{d-icon "certificate"}}{{i18n 'admin.badges.edit_badges'}}{{/link-to}}
|
2014-03-19 22:27:21 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2017-12-22 09:18:12 +08:00
|
|
|
|
|
|
|
<div class='display-row'>
|
|
|
|
<div class='field'>{{i18n 'user.second_factor.title'}}</div>
|
|
|
|
<div class='value'>
|
|
|
|
{{#if model.second_factor_enabled}}
|
|
|
|
{{i18n "yes_value"}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n "no_value"}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
|
|
|
{{#if canDisableSecondFactor}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "disableSecondFactor") icon="unlock-alt" label="user.second_factor.disable"}}
|
2017-12-22 09:18:12 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</section>
|
|
|
|
|
2014-09-27 02:48:34 +08:00
|
|
|
{{#if userFields}}
|
|
|
|
<section class='details'>
|
2016-04-30 05:29:41 +08:00
|
|
|
{{#each userFields as |uf|}}
|
2014-09-27 02:48:34 +08:00
|
|
|
<div class='display-row'>
|
2014-12-13 02:28:20 +08:00
|
|
|
<div class='field'>{{uf.name}}</div>
|
2014-09-27 02:48:34 +08:00
|
|
|
<div class='value'>
|
2014-12-13 02:28:20 +08:00
|
|
|
{{#if uf.value}}
|
|
|
|
{{uf.value}}
|
2014-09-27 02:48:34 +08:00
|
|
|
{{else}}
|
|
|
|
—
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/each}}
|
|
|
|
</section>
|
|
|
|
{{/if}}
|
|
|
|
|
2017-09-07 22:17:27 +08:00
|
|
|
{{plugin-outlet name="admin-user-details" args=(hash model=model)}}
|
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
<section class='details'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<h1>{{i18n 'admin.user.permissions'}}</h1>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2013-09-10 00:21:47 +08:00
|
|
|
{{#if showApproval}}
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.users.approved'}}</div>
|
2013-09-10 00:21:47 +08:00
|
|
|
<div class='value'>
|
2015-08-16 12:02:22 +08:00
|
|
|
{{#if model.approved}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'admin.user.approved_by'}}
|
2018-03-30 05:07:09 +08:00
|
|
|
{{#link-to 'adminUser' model.approvedBy}}{{avatar model.approvedBy imageSize="small"}}{{/link-to}}
|
|
|
|
{{#link-to 'adminUser' model.approvedBy}}{{model.approvedBy.username}}{{/link-to}}
|
2013-09-10 00:21:47 +08:00
|
|
|
{{else}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'no_value'}}
|
2013-09-10 00:21:47 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
2015-08-16 12:02:22 +08:00
|
|
|
{{#if model.approved}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'admin.user.approve_success'}}
|
2013-09-10 00:21:47 +08:00
|
|
|
{{else}}
|
2015-08-16 12:02:22 +08:00
|
|
|
{{#if model.can_approve}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "approve") icon="check" label="admin.user.approve"}}
|
2013-09-10 00:21:47 +08:00
|
|
|
{{/if}}
|
2013-06-06 12:18:22 +08:00
|
|
|
{{/if}}
|
2013-09-10 00:21:47 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-09-10 00:21:47 +08:00
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2013-05-08 09:58:34 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.users.active'}}</div>
|
2016-12-28 18:45:41 +08:00
|
|
|
<div class='value'>{{i18n-yes-no model.active}}</div>
|
2013-05-08 09:58:34 +08:00
|
|
|
<div class='controls'>
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.active}}
|
|
|
|
{{#if model.can_deactivate}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "deactivate") label="admin.user.deactivate_account"}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'admin.user.deactivate_explanation'}}
|
2013-05-08 09:58:34 +08:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.can_send_activation_email}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "sendActivationEmail") icon="envelope" label="admin.user.send_activation_email"}}
|
2013-05-08 09:58:34 +08:00
|
|
|
{{/if}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.can_activate}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "activate") icon="check" label="admin.user.activate"}}
|
2013-05-08 09:58:34 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-09-27 04:46:37 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class='field'>{{i18n 'admin.user.staged'}}</div>
|
|
|
|
<div class='value'>{{i18n-yes-no model.staged}}</div>
|
|
|
|
<div class='controls'>{{i18n 'admin.user.staged_explanation'}}</div>
|
|
|
|
</div>
|
|
|
|
|
2015-10-15 03:40:23 +08:00
|
|
|
{{#if currentUser.admin}}
|
|
|
|
<div class='display-row'>
|
|
|
|
<div class='field'>{{i18n 'admin.api.key'}}</div>
|
|
|
|
{{#if model.api_key}}
|
|
|
|
<div class='long-value'>
|
|
|
|
{{model.api_key.key}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "regenerateApiKey") icon="undo" label="admin.api.regenerate"}}
|
|
|
|
{{d-button class="btn-default" action=(action "revokeApiKey") icon="times" label="admin.api.revoke"}}
|
2015-10-15 03:40:23 +08:00
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class='value'>
|
|
|
|
—
|
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "generateApiKey") icon="key" label="admin.api.generate"}}
|
2015-10-15 03:40:23 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2013-10-23 03:53:08 +08:00
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.admin'}}</div>
|
2016-12-28 18:45:41 +08:00
|
|
|
<div class='value'>{{i18n-yes-no model.admin}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='controls'>
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.can_revoke_admin}}
|
2019-01-22 19:02:02 +08:00
|
|
|
{{d-button class="btn-default" action=(action "revokeAdmin") icon="shield-alt" label="admin.user.revoke_admin"}}
|
2013-02-06 03:16:51 +08:00
|
|
|
{{/if}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.can_grant_admin}}
|
2019-01-22 19:02:02 +08:00
|
|
|
{{d-button class="btn-default" action=(action "grantAdmin") icon="shield-alt" label="admin.user.grant_admin"}}
|
2013-03-21 08:25:41 +08:00
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-03-18 05:59:05 +08:00
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.moderator'}}</div>
|
2016-12-28 18:45:41 +08:00
|
|
|
<div class='value'>{{i18n-yes-no model.moderator}}</div>
|
2013-02-13 06:58:08 +08:00
|
|
|
<div class='controls'>
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.can_revoke_moderation}}
|
2019-01-22 19:02:02 +08:00
|
|
|
{{d-button class="btn-default" action=(action "revokeModeration") icon="shield-alt" label="admin.user.revoke_moderation"}}
|
2013-02-13 06:58:08 +08:00
|
|
|
{{/if}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.can_grant_moderation}}
|
2019-01-22 19:02:02 +08:00
|
|
|
{{d-button class="btn-default" action=(action "grantModeration") icon="shield-alt" label="admin.user.grant_moderation"}}
|
2013-03-21 08:25:41 +08:00
|
|
|
{{/if}}
|
2013-02-13 06:58:08 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-07-01 22:22:21 +08:00
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'trust_level'}}</div>
|
2013-07-01 22:22:21 +08:00
|
|
|
<div class="value">
|
2015-05-19 22:56:32 +08:00
|
|
|
{{combo-box content=site.trustLevels value=model.trust_level nameProperty="detailedName"}}
|
|
|
|
{{#if model.dirty}}
|
2014-01-23 06:09:56 +08:00
|
|
|
<div>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="ok no-text" action=(action "saveTrustLevel") icon="check"}}
|
|
|
|
{{d-button class="cancel no-text" action=(action "restoreTrustLevel") icon="times"}}
|
2014-01-23 06:09:56 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2013-07-01 22:22:21 +08:00
|
|
|
</div>
|
2014-09-30 11:12:33 +08:00
|
|
|
<div class="controls">
|
|
|
|
{{#if model.canLockTrustLevel}}
|
2018-06-20 08:40:24 +08:00
|
|
|
{{#if hasLockedTrustLevel}}
|
2017-07-27 04:33:17 +08:00
|
|
|
{{d-icon "lock" title="admin.user.trust_level_locked_tip"}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "lockTrustLevel") actionParam=false label="admin.user.unlock_trust_level"}}
|
2014-09-30 11:12:33 +08:00
|
|
|
{{else}}
|
2017-07-27 04:33:17 +08:00
|
|
|
{{d-icon "unlock" title="admin.user.trust_level_unlocked_tip"}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-default" action=(action "lockTrustLevel") actionParam=true label="admin.user.lock_trust_level"}}
|
2014-09-30 11:12:33 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.tl3Requirements}}
|
2018-10-25 04:09:36 +08:00
|
|
|
{{#link-to 'adminUser.tl3Requirements' model class="btn btn-default"}}{{i18n 'admin.user.trust_level_3_requirements'}}{{/link-to}}
|
2014-09-30 11:12:33 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-07-01 22:22:21 +08:00
|
|
|
|
2018-05-25 22:29:26 +08:00
|
|
|
<div class="user-suspended display-row {{if model.suspended 'highlight-danger'}}">
|
|
|
|
<div class='field'>{{i18n 'admin.user.suspended'}}</div>
|
|
|
|
<div class='value'>
|
|
|
|
{{i18n-yes-no model.suspended}}
|
|
|
|
{{#if model.suspended}}
|
|
|
|
{{#unless model.suspendedForever}}
|
|
|
|
{{i18n "admin.user.suspended_until" until=model.suspendedTillDate}}
|
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
|
|
|
{{#if model.suspended}}
|
2017-09-13 05:07:42 +08:00
|
|
|
{{d-button
|
2017-09-14 02:11:33 +08:00
|
|
|
class="btn-danger unsuspend-user"
|
|
|
|
action=(action "unsuspend")
|
2017-09-13 05:07:42 +08:00
|
|
|
icon="ban"
|
2017-09-14 02:11:33 +08:00
|
|
|
label="admin.user.unsuspend"}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'admin.user.suspended_explanation'}}
|
2017-09-14 02:11:33 +08:00
|
|
|
{{else}}
|
|
|
|
{{#if model.canSuspend}}
|
|
|
|
{{d-button
|
|
|
|
class="btn-danger suspend-user"
|
|
|
|
action=(action "showSuspendModal")
|
|
|
|
icon="ban"
|
|
|
|
label="admin.user.suspend"}}
|
|
|
|
{{i18n 'admin.user.suspended_explanation'}}
|
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-11-01 22:47:03 +08:00
|
|
|
|
2018-05-25 22:29:26 +08:00
|
|
|
{{#if model.suspended}}
|
2017-09-14 02:11:33 +08:00
|
|
|
<div class='display-row highlight-danger suspension-info'>
|
2015-03-18 05:59:05 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.suspended_by'}}</div>
|
|
|
|
<div class='value'>
|
2018-03-30 05:07:09 +08:00
|
|
|
{{#link-to 'adminUser' model.suspendedBy}}{{avatar model.suspendedBy imageSize="tiny"}}{{/link-to}}
|
|
|
|
{{#link-to 'adminUser' model.suspendedBy}}{{model.suspendedBy.username}}{{/link-to}}
|
2015-03-18 05:59:05 +08:00
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
|
|
|
<b>{{i18n 'admin.user.suspend_reason'}}</b>:
|
2017-12-08 02:26:41 +08:00
|
|
|
<div class='full-reason'>{{model.full_suspend_reason}}</div>
|
2015-03-18 05:59:05 +08:00
|
|
|
</div>
|
2013-11-06 03:41:04 +08:00
|
|
|
</div>
|
2013-11-01 22:47:03 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2017-11-11 01:18:08 +08:00
|
|
|
<div class="display-row {{if model.silenced 'highlight-danger'}}">
|
|
|
|
<div class='field'>{{i18n 'admin.user.silenced'}}</div>
|
2017-11-14 02:41:36 +08:00
|
|
|
<div class='value'>
|
|
|
|
{{i18n-yes-no model.silenced}}
|
2018-05-25 22:29:26 +08:00
|
|
|
{{#if model.silenced}}
|
2017-11-14 02:41:36 +08:00
|
|
|
{{#unless model.silencedForever}}
|
|
|
|
{{i18n "admin.user.suspended_until" until=model.silencedTillDate}}
|
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-05-31 23:41:40 +08:00
|
|
|
<div class='controls'>
|
2017-11-11 01:18:08 +08:00
|
|
|
{{#conditional-loading-spinner size="small" condition=model.silencingUser}}
|
|
|
|
{{#if model.silenced}}
|
2017-11-14 02:41:36 +08:00
|
|
|
{{d-button
|
|
|
|
class="btn-danger unsilence-user"
|
2019-01-10 18:06:01 +08:00
|
|
|
action=(action "unsilence")
|
2017-11-14 02:41:36 +08:00
|
|
|
icon="microphone-slash"
|
|
|
|
label="admin.user.unsilence"}}
|
2017-11-11 01:18:08 +08:00
|
|
|
{{i18n 'admin.user.silence_explanation'}}
|
2016-01-15 03:42:06 +08:00
|
|
|
{{else}}
|
2017-11-14 02:41:36 +08:00
|
|
|
{{d-button
|
|
|
|
class="btn-danger silence-user"
|
|
|
|
action=(action "showSilenceModal")
|
|
|
|
icon="microphone-slash"
|
|
|
|
label="admin.user.silence"}}
|
2017-11-11 01:18:08 +08:00
|
|
|
{{i18n 'admin.user.silence_explanation'}}
|
2016-01-15 03:42:06 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/conditional-loading-spinner}}
|
2013-05-31 23:41:40 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-11-14 02:41:36 +08:00
|
|
|
|
2018-05-25 22:29:26 +08:00
|
|
|
{{#if model.silenced}}
|
2017-11-14 02:41:36 +08:00
|
|
|
<div class='display-row highlight-danger silence-info'>
|
|
|
|
<div class='field'>{{i18n 'admin.user.silenced_by'}}</div>
|
|
|
|
<div class='value'>
|
2018-03-30 05:07:09 +08:00
|
|
|
{{#link-to 'adminUser' model.silencedBy}}{{avatar model.silencedBy imageSize="tiny"}}{{/link-to}}
|
|
|
|
{{#link-to 'adminUser' model.silencedBy}}{{model.silencedBy.username}}{{/link-to}}
|
2017-11-14 02:41:36 +08:00
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
|
|
|
<b>{{i18n 'admin.user.silence_reason'}}</b>:
|
2017-12-08 02:26:41 +08:00
|
|
|
<div class='full-reason'>{{model.silence_reason}}</div>
|
2017-11-14 02:41:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2018-05-25 23:45:42 +08:00
|
|
|
{{#if model.tl3_requirements.penalty_counts.total}}
|
|
|
|
<div class='display-row clear-penalty-history'>
|
|
|
|
<div class='field'>{{i18n 'admin.user.penalty_count'}}</div>
|
|
|
|
<div class='value'>{{model.tl3_requirements.penalty_counts.total}}</div>
|
|
|
|
{{#if currentUser.admin}}
|
|
|
|
<div class='controls'>
|
|
|
|
{{d-button label="admin.user.clear_penalty_history.title"
|
2018-10-25 04:09:36 +08:00
|
|
|
class="btn-default"
|
2018-05-25 23:45:42 +08:00
|
|
|
icon="times"
|
|
|
|
action=(action "clearPenaltyHistory")}}
|
|
|
|
{{i18n "admin.user.clear_penalty_history.description"}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
</section>
|
|
|
|
|
2017-04-18 02:53:30 +08:00
|
|
|
{{#if currentUser.admin}}
|
|
|
|
<section class='details'>
|
|
|
|
<h1>{{i18n 'admin.groups.title'}}</h1>
|
|
|
|
<div class='display-row'>
|
|
|
|
<div class='field'>{{i18n 'admin.groups.automatic'}}</div>
|
2018-04-13 10:41:29 +08:00
|
|
|
<div class='value'>{{{automaticGroups}}}</div>
|
2015-03-26 03:16:47 +08:00
|
|
|
</div>
|
2017-04-18 02:53:30 +08:00
|
|
|
<div class='display-row'>
|
|
|
|
<div class='field'>{{i18n 'admin.groups.custom'}}</div>
|
|
|
|
<div class='value'>
|
2018-10-02 12:34:08 +08:00
|
|
|
{{admin-group-selector selected=model.customGroups available=availableGroups buffer=customGroupIdsBuffer}}
|
2017-04-18 02:53:30 +08:00
|
|
|
</div>
|
2018-10-02 12:34:08 +08:00
|
|
|
{{#if customGroupsDirty}}
|
|
|
|
<div class='controls'>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button icon="check" class="ok" action=(action "saveCustomGroups")}}
|
|
|
|
{{d-button icon="times" class="cancel" action=(action "resetCustomGroups")}}
|
2018-10-02 12:34:08 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{#if model.customGroups}}
|
|
|
|
<div class='display-row'>
|
|
|
|
<div class='field'>{{i18n 'admin.groups.primary'}}</div>
|
|
|
|
<div class='value'>
|
2017-10-20 03:51:08 +08:00
|
|
|
{{combo-box content=model.customGroups value=model.primary_group_id none="admin.groups.no_primary"}}
|
2018-10-02 12:34:08 +08:00
|
|
|
</div>
|
2017-04-18 02:53:30 +08:00
|
|
|
{{#if primaryGroupDirty}}
|
2018-10-02 12:34:08 +08:00
|
|
|
<div class='controls'>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button icon="check" class="ok" action=(action "savePrimaryGroup")}}
|
|
|
|
{{d-button icon="times" class="cancel" action=(action "resetPrimaryGroup")}}
|
2018-10-02 12:34:08 +08:00
|
|
|
</div>
|
2017-04-18 02:53:30 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2018-10-02 12:34:08 +08:00
|
|
|
{{/if}}
|
2017-04-18 02:53:30 +08:00
|
|
|
</section>
|
|
|
|
{{/if}}
|
2015-03-26 03:16:47 +08:00
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
<section class='details'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<h1>{{i18n 'admin.user.activity'}}</h1>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'created'}}</div>
|
2016-03-18 15:40:10 +08:00
|
|
|
<div class='value'>{{format-date model.created_at leaveAgo="true"}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.users.last_emailed'}}</div>
|
2017-11-18 06:08:49 +08:00
|
|
|
<div class='value'>{{format-date model.last_emailed_at}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'last_seen'}}</div>
|
2016-03-18 15:40:10 +08:00
|
|
|
<div class='value'>{{format-date model.last_seen_at leaveAgo="true"}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.like_count'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.like_given_count}} / {{model.like_count}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.topics_entered'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.topics_entered}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.post_count'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.post_count}}</div>
|
2013-02-07 15:11:56 +08:00
|
|
|
<div class='controls'>
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.can_delete_all_posts}}
|
|
|
|
{{#if model.post_count}}
|
2019-01-22 19:02:02 +08:00
|
|
|
{{d-button class="btn-danger" action=(action "deleteAllPosts") icon="far-trash-alt" label="admin.user.delete_all_posts"}}
|
2015-03-17 23:18:39 +08:00
|
|
|
{{/if}}
|
2014-02-21 01:29:40 +08:00
|
|
|
{{else}}
|
2018-05-25 23:33:01 +08:00
|
|
|
{{deleteAllPostsExplanation}}
|
2013-02-07 15:11:56 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.posts_read_count'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.posts_read_count}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2014-09-08 23:11:56 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.warnings_received_count'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.warnings_received_count}}</div>
|
2014-09-08 23:11:56 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.flags_given_received_count'}}</div>
|
2018-01-18 02:03:14 +08:00
|
|
|
<div class='value'>
|
|
|
|
{{model.flags_given_count}} / {{model.flags_received_count}}
|
|
|
|
</div>
|
|
|
|
<div class='controls'>
|
|
|
|
{{#if model.flags_received_count}}
|
|
|
|
{{d-button
|
2018-10-25 04:09:36 +08:00
|
|
|
class="btn-default"
|
2018-01-18 02:03:14 +08:00
|
|
|
action=(action "showFlagsReceived")
|
|
|
|
label="admin.user.show_flags_received"
|
|
|
|
icon="flag"
|
|
|
|
}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.private_topics_count'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{model.private_topics_count}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.time_read'}}</div>
|
2017-11-18 06:08:49 +08:00
|
|
|
<div class='value'>{{{format-duration model.time_read}}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'user.invited.days_visited'}}</div>
|
2015-05-19 22:56:32 +08:00
|
|
|
<div class='value'>{{{model.days_visited}}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</section>
|
|
|
|
|
2015-05-19 22:56:32 +08:00
|
|
|
{{#if model.single_sign_on_record}}
|
2014-08-23 08:34:48 +08:00
|
|
|
<section class='details'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<h1>{{i18n 'admin.user.sso.title'}}</h1>
|
2014-08-23 08:34:48 +08:00
|
|
|
|
2015-11-28 01:58:40 +08:00
|
|
|
{{#with model.single_sign_on_record as |sso|}}
|
2014-08-23 08:34:48 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.sso.external_id'}}</div>
|
2015-11-28 01:58:40 +08:00
|
|
|
<div class='value'>{{sso.external_id}}</div>
|
2014-08-23 08:34:48 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.sso.external_username'}}</div>
|
2015-11-28 01:58:40 +08:00
|
|
|
<div class='value'>{{sso.external_username}}</div>
|
2014-08-23 08:34:48 +08:00
|
|
|
</div>
|
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.sso.external_name'}}</div>
|
2015-11-28 01:58:40 +08:00
|
|
|
<div class='value'>{{sso.external_name}}</div>
|
2014-08-23 08:34:48 +08:00
|
|
|
</div>
|
2018-06-12 16:07:10 +08:00
|
|
|
{{#if sso.external_email}}
|
|
|
|
<div class='display-row'>
|
|
|
|
<div class='field'>{{i18n 'admin.user.sso.external_email'}}</div>
|
|
|
|
<div class='value'>{{sso.external_email}}</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2014-08-23 08:34:48 +08:00
|
|
|
<div class='display-row'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<div class='field'>{{i18n 'admin.user.sso.external_avatar_url'}}</div>
|
2015-11-28 01:58:40 +08:00
|
|
|
<div class='value'>{{sso.external_avatar_url}}</div>
|
2014-08-23 08:34:48 +08:00
|
|
|
</div>
|
|
|
|
{{/with}}
|
|
|
|
</section>
|
|
|
|
{{/if}}
|
|
|
|
|
2018-04-17 02:41:03 +08:00
|
|
|
{{plugin-outlet name="after-user-details" args=(hash model=model)}}
|
|
|
|
|
2013-04-12 04:04:20 +08:00
|
|
|
<section>
|
2017-09-05 00:55:23 +08:00
|
|
|
<hr>
|
2015-03-11 01:06:08 +08:00
|
|
|
<div class="pull-right">
|
2018-03-14 02:35:50 +08:00
|
|
|
{{#if model.active}}
|
|
|
|
{{#if model.can_impersonate}}
|
2019-01-10 18:06:01 +08:00
|
|
|
{{d-button class="btn-danger" action=(action "impersonate") icon="crosshairs" label="admin.impersonate.title" title="admin.impersonate.help"}}
|
2018-03-14 02:35:50 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
|
2018-05-25 23:33:01 +08:00
|
|
|
{{#if model.can_be_anonymized}}
|
2015-03-11 01:06:08 +08:00
|
|
|
{{d-button label="admin.user.anonymize"
|
|
|
|
icon="exclamation-triangle"
|
2015-03-20 02:57:07 +08:00
|
|
|
class="btn-danger"
|
2019-01-10 18:06:01 +08:00
|
|
|
action=(action "anonymize")}}
|
2018-05-25 23:33:01 +08:00
|
|
|
{{/if}}
|
2015-03-11 01:06:08 +08:00
|
|
|
|
2018-05-25 23:33:01 +08:00
|
|
|
{{#if model.canBeDeleted}}
|
2015-03-11 01:06:08 +08:00
|
|
|
{{d-button label="admin.user.delete"
|
|
|
|
icon="exclamation-triangle"
|
2015-03-20 02:57:07 +08:00
|
|
|
class="btn-danger"
|
2019-01-10 18:06:01 +08:00
|
|
|
action=(action "destroy")}}
|
2018-05-25 23:33:01 +08:00
|
|
|
{{/if}}
|
2015-03-11 01:06:08 +08:00
|
|
|
</div>
|
|
|
|
|
2018-05-25 23:33:01 +08:00
|
|
|
{{#if deleteExplanation}}
|
2013-12-21 00:36:43 +08:00
|
|
|
<div class="clearfix"></div>
|
2017-09-05 00:55:23 +08:00
|
|
|
<br>
|
2015-03-18 05:59:05 +08:00
|
|
|
<div class="pull-right">
|
2018-05-25 23:33:01 +08:00
|
|
|
{{d-icon "exclamation-triangle"}} {{deleteExplanation}}
|
2015-03-18 05:59:05 +08:00
|
|
|
</div>
|
2013-12-21 00:36:43 +08:00
|
|
|
{{/if}}
|
2013-04-12 04:04:20 +08:00
|
|
|
</section>
|
|
|
|
<div class="clearfix"></div>
|