{{#if model.canViewProfile}} {{#link-to 'user' model class="btn"}} {{fa-icon "user"}} {{i18n 'admin.user.show_public_profile'}} {{/link-to}} {{/if}} {{#if model.active}} {{#if model.can_impersonate}} {{/if}} {{#if currentUser.admin}} {{/if}} {{/if}}
{{i18n 'user.username.title'}}
{{model.username}}
{{#link-to 'preferences.username' model class="btn"}} {{fa-icon "pencil"}} {{i18n 'user.change_username.title'}} {{/link-to}}
{{i18n 'user.name.title'}}
{{model.name}}
{{#if canCheckEmails}}
{{i18n 'user.email.title'}}
{{#unless model.active}}
{{i18n 'admin.users.not_verified'}}
{{/unless}} {{#if model.email}} {{model.email}} {{else}} {{/if}}
{{model.bounceScore}}
{{#if model.canResetBounceScore}} {{/if}} {{model.bounceScoreExplanation}}
{{i18n 'user.associated_accounts'}}
{{#if model.associated_accounts}} {{model.associated_accounts}} {{else}} {{/if}}
{{/if}}
{{i18n 'user.avatar.title'}}
{{avatar content imageSize="large"}}
{{i18n 'user.title.title'}}
{{#if editingTitle}} {{text-field value=userTitleValue autofocus="autofocus"}} {{else}} {{model.title}}  {{/if}}
{{#if editingTitle}} {{d-button action="saveTitle" label="admin.user.save_title"}} {{i18n 'cancel'}} {{else}} {{d-button action="toggleTitleEdit" icon="pencil" label="admin.user.edit_title"}} {{/if}}
{{i18n 'user.ip_address.title'}}
{{model.ip_address}}
{{#if currentUser.staff}} {{ip-lookup ip=model.ip_address userId=model.id}} {{/if}}
{{i18n 'user.registration_ip_address.title'}}
{{model.registration_ip_address}}
{{#if currentUser.staff}} {{ip-lookup ip=model.registration_ip_address userId=model.id}} {{/if}}
{{#if showBadges}}
{{i18n 'admin.badges.title'}}
{{i18n 'badges.badge_count' count=model.badge_count}}
{{#link-to 'adminUser.badges' model class="btn"}}{{fa-icon "certificate"}}{{i18n 'admin.badges.edit_badges'}}{{/link-to}}
{{/if}}
{{#if userFields}}
{{#each userFields as |uf|}}
{{uf.name}}
{{#if uf.value}} {{uf.value}} {{else}} — {{/if}}
{{/each}}
{{/if}}

{{i18n 'admin.user.permissions'}}

{{#if showApproval}}
{{i18n 'admin.users.approved'}}
{{#if model.approved}} {{i18n 'admin.user.approved_by'}} {{#link-to 'adminUser' approvedBy}}{{avatar model.approvedBy imageSize="small"}}{{/link-to}} {{#link-to 'adminUser' approvedBy}}{{model.approvedBy.username}}{{/link-to}} {{else}} {{i18n 'no_value'}} {{/if}}
{{#if model.approved}} {{i18n 'admin.user.approve_success'}} {{else}} {{#if model.can_approve}} {{/if}} {{/if}}
{{/if}}
{{i18n 'admin.users.active'}}
{{#if model.active}} {{i18n 'yes_value'}} {{else}} {{i18n 'no_value'}} {{/if}}
{{#if model.active}} {{#if model.can_deactivate}} {{i18n 'admin.user.deactivate_explanation'}} {{/if}} {{else}} {{#if model.can_send_activation_email}} {{/if}} {{#if model.can_activate}} {{/if}} {{/if}}
{{#if currentUser.admin}}
{{i18n 'admin.api.key'}}
{{#if model.api_key}}
{{model.api_key.key}} {{d-button action="regenerateApiKey" icon="undo" label="admin.api.regenerate"}} {{d-button action="revokeApiKey" icon="times" label="admin.api.revoke"}}
{{else}}
{{d-button action="generateApiKey" icon="key" label="admin.api.generate"}}
{{/if}}
{{/if}}
{{i18n 'admin.user.admin'}}
{{model.admin}}
{{#if model.can_revoke_admin}} {{/if}} {{#if model.can_grant_admin}} {{/if}}
{{i18n 'admin.user.moderator'}}
{{model.moderator}}
{{#if model.can_revoke_moderation}} {{/if}} {{#if model.can_grant_moderation}} {{/if}}
{{i18n 'trust_level'}}
{{combo-box content=site.trustLevels value=model.trust_level nameProperty="detailedName"}} {{#if model.dirty}}
{{/if}}
{{#if model.canLockTrustLevel}} {{#if model.trust_level_locked}} {{else}} {{/if}} {{/if}} {{#if model.tl3Requirements}} {{#link-to 'adminUser.tl3Requirements' model class="btn"}}{{i18n 'admin.user.trust_level_3_requirements'}}{{/link-to}} {{/if}}
{{i18n 'admin.user.suspended'}}
{{model.isSuspended}}
{{#if model.isSuspended}} {{suspendDuration}} {{i18n 'admin.user.suspended_explanation'}} {{else}} {{#if model.canSuspend}} {{i18n 'admin.user.suspended_explanation'}} {{/if}} {{/if}}
{{#if model.isSuspended}}
{{i18n 'admin.user.suspended_by'}}
{{#link-to 'adminUser' suspendedBy}}{{avatar model.suspendedBy imageSize="tiny"}}{{/link-to}} {{#link-to 'adminUser' suspendedBy}}{{model.suspendedBy.username}}{{/link-to}}
{{i18n 'admin.user.suspend_reason'}}: {{model.suspend_reason}}
{{/if}}
{{i18n 'admin.user.blocked'}}
{{model.blocked}}
{{#conditional-loading-spinner size="small" condition=model.blockingUser}} {{#if model.blocked}} {{i18n 'admin.user.block_explanation'}} {{else}} {{i18n 'admin.user.block_explanation'}} {{/if}} {{/conditional-loading-spinner}}
{{i18n 'admin.user.staged'}}
{{model.staged}}
{{i18n 'admin.user.staged_explanation'}}

{{i18n 'admin.groups.title'}}

{{#if currentUser.admin}}
{{i18n 'admin.groups.automatic'}}
{{automaticGroups}}
{{i18n 'admin.groups.custom'}}
{{admin-group-selector selected=model.customGroups available=availableGroups}}
{{#if model.customGroups}} {{i18n 'admin.groups.primary'}} {{combo-box content=model.customGroups value=model.primary_group_id nameProperty="name" none="admin.groups.no_primary"}} {{/if}} {{#if primaryGroupDirty}} {{d-button icon="check" class="ok" action="savePrimaryGroup"}} {{d-button icon="times" class="cancel" action="resetPrimaryGroup"}} {{/if}}
{{/if}}

{{i18n 'admin.user.activity'}}

{{i18n 'created'}}
{{format-date model.created_at leaveAgo="true"}}
{{i18n 'admin.users.last_emailed'}}
{{format-date model.last_emailed_at leaveAgo="true"}}
{{i18n 'last_seen'}}
{{format-date model.last_seen_at leaveAgo="true"}}
{{i18n 'admin.user.like_count'}}
{{model.like_given_count}} / {{model.like_count}}
{{i18n 'admin.user.topics_entered'}}
{{model.topics_entered}}
{{i18n 'admin.user.post_count'}}
{{model.post_count}}
{{#if model.can_delete_all_posts}} {{#if model.post_count}} {{/if}} {{else}} {{model.deleteAllPostsExplanation}} {{/if}}
{{i18n 'admin.user.posts_read_count'}}
{{model.posts_read_count}}
{{i18n 'admin.user.warnings_received_count'}}
{{model.warnings_received_count}}
{{i18n 'admin.user.flags_given_received_count'}}
{{model.flags_given_count}} / {{model.flags_received_count}}
{{i18n 'admin.user.private_topics_count'}}
{{model.private_topics_count}}
{{i18n 'admin.user.time_read'}}
{{{model.time_read}}}
{{i18n 'user.invited.days_visited'}}
{{{model.days_visited}}}
{{#if model.single_sign_on_record}}

{{i18n 'admin.user.sso.title'}}

{{#with model.single_sign_on_record as |sso|}}
{{i18n 'admin.user.sso.external_id'}}
{{sso.external_id}}
{{i18n 'admin.user.sso.external_username'}}
{{sso.external_username}}
{{i18n 'admin.user.sso.external_name'}}
{{sso.external_name}}
{{i18n 'admin.user.sso.external_email'}}
{{sso.external_email}}
{{i18n 'admin.user.sso.external_avatar_url'}}
{{sso.external_avatar_url}}
{{/with}}
{{/if}}

{{#unless model.anonymizeForbidden}} {{d-button label="admin.user.anonymize" icon="exclamation-triangle" class="btn-danger" disabled=model.anonymizeForbidden action="anonymize"}} {{/unless}} {{#unless model.deleteForbidden}} {{d-button label="admin.user.delete" icon="exclamation-triangle" class="btn-danger" disabled=model.deleteForbidden action="destroy"}} {{/unless}}
{{#if model.deleteExplanation}}

{{fa-icon "exclamation-triangle"}} {{model.deleteExplanation}}
{{/if}}