UX: Add link to the user's preferences page next to the avatar

This commit is contained in:
Robin Ward 2017-05-26 15:00:31 -04:00
parent 3384a7dd2a
commit 81c18fc0bd
3 changed files with 11 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import CanCheckEmails from 'discourse/mixins/can-check-emails';
import { propertyNotEqual, setting } from 'discourse/lib/computed';
import { userPath } from 'discourse/lib/url';
import { popupAjaxError } from 'discourse/lib/ajax-error';
import computed from 'ember-addons/ember-computed-decorators';
export default Ember.Controller.extend(CanCheckEmails, {
editingUsername: false,
@ -34,6 +35,11 @@ export default Ember.Controller.extend(CanCheckEmails, {
return [];
}.property('model.user_fields.[]'),
@computed('model.username_lower')
preferencesPath(username) {
return userPath(`${username}/preferences`);
},
actions: {
impersonate() { return this.get("model").impersonate(); },

View File

@ -99,6 +99,9 @@
<div class='display-row'>
<div class='field'>{{i18n 'user.avatar.title'}}</div>
<div class='value'>{{avatar content imageSize="large"}}</div>
<div class="controls">
{{{i18n "admin.user.visit_profile" url=preferencesPath}}}
</div>
</div>
<div class='display-row'>

View File

@ -3254,6 +3254,8 @@ en:
reset_bounce_score:
label: "Reset"
title: "Reset bounce score back to 0"
visit_profile: "Visit <a href='%{url}'>this user's preferences page</a> to edit their profile"
deactivate_explanation: "A deactivated user must re-validate their email."
suspended_explanation: "A suspended user can't log in."
block_explanation: "A blocked user can't post or start topics."