FEATURE: Improve avatar education link (#7240)

FEATURE: Improve avatar education link (#7240)

  • Make profile_path more direct to setting

  • Add id to profile picture setting for easy linking

diff --git a/app/assets/javascripts/discourse/templates/preferences/account.hbs b/app/assets/javascripts/discourse/templates/preferences/account.hbs
index 41793e0..3cba4da 100644
--- a/app/assets/javascripts/discourse/templates/preferences/account.hbs
+++ b/app/assets/javascripts/discourse/templates/preferences/account.hbs
@@ -143,7 +143,7 @@
 
 {{#unless siteSettings.sso_overrides_avatar}}
   <div class="control-group pref-avatar">
-    <label class="control-label">{{i18n 'user.avatar.title'}}</label>
+    <label class="control-label" id="profile-picture">{{i18n 'user.avatar.title'}}</label>
     <div class="controls">
       {{! we want the "huge" version even though we're downsizing it in CSS }}
       {{bound-avatar model "huge"}}
diff --git a/lib/composer_messages_finder.rb b/lib/composer_messages_finder.rb
index e80c27b..7e296a4 100644
--- a/lib/composer_messages_finder.rb
+++ b/lib/composer_messages_finder.rb
@@ -85,7 +85,7 @@ class ComposerMessagesFinder
     {
       id: 'avatar',
       templateName: 'education',
-      body: PrettyText.cook(I18n.t('education.avatar', profile_path: "/u/#{@user.username_lower}"))
+      body: PrettyText.cook(I18n.t('education.avatar', profile_path: "/u/#{@user.username_lower}/preferences/account#profile-picture"))
     }
   end

GitHub sha: 48d0465f

2 Likes