mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
UX: Add link to the user's preferences page next to the avatar
This commit is contained in:
parent
3384a7dd2a
commit
81c18fc0bd
|
@ -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(); },
|
||||
|
|
|
@ -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'>
|
||||
|
|
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue
Block a user