diff --git a/assets/javascripts/discourse-staff-notes/connectors/admin-user-controls-after/add-staff-notes-button.js.es6 b/assets/javascripts/discourse-staff-notes/connectors/admin-user-controls-after/add-staff-notes-button.js.es6 new file mode 100644 index 0000000..a846230 --- /dev/null +++ b/assets/javascripts/discourse-staff-notes/connectors/admin-user-controls-after/add-staff-notes-button.js.es6 @@ -0,0 +1,4 @@ +import connector from 'discourse/plugins/staff-notes/discourse-staff-notes/connectors/user-profile-controls/show-notes-on-profile'; + +// Same as other connector +export default connector; diff --git a/assets/javascripts/discourse-staff-notes/connectors/user-profile-controls/show-notes-on-profile.js.es6 b/assets/javascripts/discourse-staff-notes/connectors/user-profile-controls/show-notes-on-profile.js.es6 index ef377cf..db13a50 100644 --- a/assets/javascripts/discourse-staff-notes/connectors/user-profile-controls/show-notes-on-profile.js.es6 +++ b/assets/javascripts/discourse-staff-notes/connectors/user-profile-controls/show-notes-on-profile.js.es6 @@ -9,7 +9,10 @@ export default { setupComponent(args, component) { const { model } = args; - component.set('staffNotesCount', model.get('custom_fields.staff_notes_count') || 0); + component.set( + 'staffNotesCount', + model.get('staff_notes_count') || model.get('custom_fields.staff_notes_count') || 0 + ); }, actions: { diff --git a/assets/javascripts/discourse-staff-notes/templates/connectors/admin-user-controls-after/add-staff-notes-button.hbs b/assets/javascripts/discourse-staff-notes/templates/connectors/admin-user-controls-after/add-staff-notes-button.hbs new file mode 100644 index 0000000..15c8b7b --- /dev/null +++ b/assets/javascripts/discourse-staff-notes/templates/connectors/admin-user-controls-after/add-staff-notes-button.hbs @@ -0,0 +1 @@ +{{show-staff-notes show="showStaffNotes" count=staffNotesCount}} diff --git a/assets/javascripts/discourse-staff-notes/templates/connectors/user-profile-controls/show-notes-on-profile.hbs b/assets/javascripts/discourse-staff-notes/templates/connectors/user-profile-controls/show-notes-on-profile.hbs index 14c0efe..fa4c53d 100644 --- a/assets/javascripts/discourse-staff-notes/templates/connectors/user-profile-controls/show-notes-on-profile.hbs +++ b/assets/javascripts/discourse-staff-notes/templates/connectors/user-profile-controls/show-notes-on-profile.hbs @@ -1,9 +1 @@ -{{#if siteSettings.staff_notes_enabled}} - {{#if currentUser.staff}} - {{#if staffNotesCount}} -