Skip to content
Permalink
Browse files

Update setting names, readme, to reflect rename to user notes

  • Loading branch information
awesomerobot committed Jul 24, 2019
1 parent c79a929 commit e706cc58197326dc323951c0b0040ab2e9ecb0b0
Showing with 44 additions and 44 deletions.
  1. +3 −3 README.md
  2. +1 −1 ...vascripts/discourse-staff-notes/connectors/flagged-post-controls/show-staff-notes-on-flags.js.es6
  3. +1 −1 ...javascripts/discourse-staff-notes/connectors/user-card-post-names/show-staff-notes-on-card.js.es6
  4. +1 −1 ...s/javascripts/discourse-staff-notes/connectors/user-profile-controls/show-notes-on-profile.js.es6
  5. +1 −1 assets/javascripts/discourse/initializers/enable-staff-notes.js.es6
  6. +1 −1 ...course/templates/connectors/admin-dashboard-moderation-bottom/recent-staff-notes-report-table.hbs
  7. +2 −2 config/locales/server.ca.yml
  8. +1 −1 config/locales/server.cs.yml
  9. +1 −1 config/locales/server.de.yml
  10. +2 −2 config/locales/server.en.yml
  11. +1 −1 config/locales/server.es.yml
  12. +1 −1 config/locales/server.fi.yml
  13. +1 −1 config/locales/server.fr.yml
  14. +2 −2 config/locales/server.he.yml
  15. +1 −1 config/locales/server.hu.yml
  16. +1 −1 config/locales/server.hy.yml
  17. +1 −1 config/locales/server.it.yml
  18. +1 −1 config/locales/server.ja.yml
  19. +1 −1 config/locales/server.nb_NO.yml
  20. +1 −1 config/locales/server.nl.yml
  21. +1 −1 config/locales/server.pl_PL.yml
  22. +1 −1 config/locales/server.pt.yml
  23. +1 −1 config/locales/server.pt_BR.yml
  24. +1 −1 config/locales/server.ru.yml
  25. +1 −1 config/locales/server.sk.yml
  26. +1 −1 config/locales/server.sl.yml
  27. +1 −1 config/locales/server.sw.yml
  28. +1 −1 config/locales/server.tr_TR.yml
  29. +2 −2 config/locales/server.ur.yml
  30. +2 −2 config/locales/server.zh_CN.yml
  31. +2 −2 config/settings.yml
  32. +3 −3 plugin.rb
  33. +1 −1 spec/user_history_spec.rb
  34. +1 −1 spec/user_warning_spec.rb
@@ -1,4 +1,4 @@
### discourse-staff-notes
### discourse-user-notes

This plugin gives staff members the ability to attach notes to users.

@@ -11,9 +11,9 @@ Follow our [Install a Plugin](https://meta.discourse.org/t/install-a-plugin/1915
`git clone https://github.com/discourse/discourse-staff-notes.git` as the plugin command.

Once you've installed it, review the settings under admin and then enable
`staff_notes_enabled`.
`user_notes_enabled`.

**Clearing browser cache might be required when first insalled**
**Clearing browser cache might be required when first installed**

## Issues

@@ -3,7 +3,7 @@ import { getOwner } from "discourse-common/lib/get-owner";

export default {
shouldRender(args, component) {
return component.siteSettings.staff_notes_enabled;
return component.siteSettings.user_notes_enabled;
},

setupComponent(args, component) {
@@ -5,7 +5,7 @@ import { emojiUrlFor } from "discourse/lib/text";
export default {
shouldRender(args, component) {
const { siteSettings, currentUser } = component;
return siteSettings.staff_notes_enabled && currentUser && currentUser.staff;
return siteSettings.user_notes_enabled && currentUser && currentUser.staff;
},

setupComponent(args, component) {
@@ -4,7 +4,7 @@ import { getOwner } from "discourse-common/lib/get-owner";
export default {
shouldRender(args, component) {
const { siteSettings, currentUser } = component;
return siteSettings.staff_notes_enabled && currentUser && currentUser.staff;
return siteSettings.user_notes_enabled && currentUser && currentUser.staff;
},

setupComponent(args, component) {
@@ -8,7 +8,7 @@ export default {
const siteSettings = container.lookup("site-settings:main");
const currentUser = container.lookup("current-user:main");
if (
!siteSettings.staff_notes_enabled ||
!siteSettings.user_notes_enabled ||
!currentUser ||
!currentUser.staff
) {
@@ -1,4 +1,4 @@
{{#if siteSettings.staff_notes_enabled}}
{{#if siteSettings.user_notes_enabled}}
{{admin-report
dataSourceName="staff_notes"
startDate=lastWeek
@@ -7,8 +7,8 @@

ca:
site_settings:
staff_notes_enabled: "Permet als usuaris de l'equip responsable adjuntar notes als usuaris"
staff_notes_moderators_delete: "Permet que els moderadors suprimeixin notes d’usuari"
user_notes_enabled: "Permet als usuaris de l'equip responsable adjuntar notes als usuaris"
user_notes_moderators_delete: "Permet que els moderadors suprimeixin notes d’usuari"
staff_notes:
official_warning: "Rebut un advertiment oficial de @%{username} - %{warning_link}"
user_suspended: "@ %{username} ha suspès aquest compte fins a %{suspended_till}. Motiu: %{reason}"
@@ -7,7 +7,7 @@

cs:
site_settings:
staff_notes_enabled: "Povolit redaktorům připojit poznámku k uživatelům"
user_notes_enabled: "Povolit redaktorům připojit poznámku k uživatelům"
staff_notes:
official_warning: "Obdrženo oficiální varování od @%{username} -- %{warning_link}"
user_suspended: "@%{username} zakázal tento účet do %{suspended_till}. Důvod: %{reason}"
@@ -7,7 +7,7 @@

de:
site_settings:
staff_notes_enabled: "Erlaube dem Team, Benutzer mit Notizen zu versehen"
user_notes_enabled: "Erlaube dem Team, Benutzer mit Notizen zu versehen"
staff_notes:
official_warning: "Hat eine offizielle Warnung erhalten von @%{username} -- %{warning_link}"
user_suspended: "@%{username} hat dieses Konto gesperrt bis %{suspended_till}. Grund: %{reason}"
@@ -1,7 +1,7 @@
en:
site_settings:
staff_notes_enabled: "Allow staff users to attach notes to users"
staff_notes_moderators_delete: "Allow moderators to delete user notes"
user_notes_enabled: "Allow staff users to attach notes to users"
user_notes_moderators_delete: "Allow moderators to delete user notes"

staff_notes:
official_warning: "Received an official warning from @%{username} -- %{warning_link}"
@@ -7,7 +7,7 @@

es:
site_settings:
staff_notes_enabled: "Permitir a los usuarios del staff adjuntar notas a los usuarios"
user_notes_enabled: "Permitir a los usuarios del staff adjuntar notas a los usuarios"
staff_notes:
official_warning: "Recibiste una advertencia oficial de @%{username} -- %{warning_link}"
user_suspended: "@%{username} suspendió esta cuenta hasta %{suspended_till}. Razón: %{reason}"
@@ -7,7 +7,7 @@

fi:
site_settings:
staff_notes_enabled: "Salli henkilökunnan lisätä huomioita käyttäjiin liittyen"
user_notes_enabled: "Salli henkilökunnan lisätä huomioita käyttäjiin liittyen"
staff_notes:
official_warning: "%{username} antoi virallisen varoituksen - %{warning_link}"
user_suspended: "@%{username} hyllytti käyttäjätilin %{suspended_till} asti. Syy: %{reason}"
@@ -7,7 +7,7 @@

fr:
site_settings:
staff_notes_enabled: "Permettre aux responsables d'associer des notes aux utilisateurs"
user_notes_enabled: "Permettre aux responsables d'associer des notes aux utilisateurs"
staff_notes:
official_warning: "A reçu un avertissement officiel de @%{username} -- %{warning_link}"
user_suspended: "@%{username} a suspendu ce compte jusqu'à %{suspended_till}. Raison : %{reason}"
@@ -7,8 +7,8 @@

he:
site_settings:
staff_notes_enabled: "לאפשר למשתמשי הצוות לצרף הערות למשתמשים"
staff_notes_moderators_delete: "לאפשר למפקחים למחוק הערות משתמש"
user_notes_enabled: "לאפשר למשתמשי הצוות לצרף הערות למשתמשים"
user_notes_moderators_delete: "לאפשר למפקחים למחוק הערות משתמש"
staff_notes:
official_warning: "התקבלה אזהרה רשמית מאת ‎@%{username}‎ -- %{warning_link}"
user_suspended: "חשבון זה הושעה על ידי ‎@%{username}‎ עד %{suspended_till}. סיבה: %{reason}"
@@ -7,7 +7,7 @@

hu:
site_settings:
staff_notes_enabled: "Megjegyzések hozzáadása a felhasználókhoz engedélyezése a személyzeti felhasználóknak"
user_notes_enabled: "Megjegyzések hozzáadása a felhasználókhoz engedélyezése a személyzeti felhasználóknak"
staff_notes:
official_warning: "Hivatalos figyelmeztetést kaptál a következő felhasználótól @%{username} -- %{warning_link}"
user_suspended: "@%{username} felfüggesztette ezt a fiókot a következő ideig, %{suspended_till}. Ok: %{reason}"
@@ -7,7 +7,7 @@

hy:
site_settings:
staff_notes_enabled: "Թույլատրել անձնակազմի անդամներին կցել նշումներ օգտատերերին"
user_notes_enabled: "Թույլատրել անձնակազմի անդամներին կցել նշումներ օգտատերերին"
staff_notes:
official_warning: "Ստացել է պաշտոնական զգուշացում @%{username} -ից -- %{warning_link}"
user_suspended: "@%{username} -ը սառեցրել է հաշիվը մինչև %{suspended_till}: Պատճառը՝ %{reason}"
@@ -7,7 +7,7 @@

it:
site_settings:
staff_notes_enabled: "Abilitare gli utenti dello staff ad allegare note agli utenti"
user_notes_enabled: "Abilitare gli utenti dello staff ad allegare note agli utenti"
staff_notes:
official_warning: "Ha ricevuto un richiamo ufficiale da @%{username} -- %{warning_link}"
user_suspended: "@%{username} ha sospeso questo account fino a %{suspended_till}. Motivazione: %{reason}"
@@ -7,7 +7,7 @@

ja:
site_settings:
staff_notes_enabled: "スタッフがユーザにメモを付けることを許可"
user_notes_enabled: "スタッフがユーザにメモを付けることを許可"
staff_notes:
official_warning: "@%{username} -- %{warning_link} から、公式な警告を受けました"
user_suspended: "@%{username} \nこのアカウントは、%{suspended_till}まで無効化されました。\n理由:%{reason}"
@@ -7,7 +7,7 @@

nb_NO:
site_settings:
staff_notes_enabled: "Tillat staben å opprette notater på brukere"
user_notes_enabled: "Tillat staben å opprette notater på brukere"
staff_notes:
official_warning: "Mottok en offisiell advarsel fra %{username} -- %{warning_link}"
user_suspended: "@%{username} sperret denne kontoen til %{suspended_till}. Årsak: %{reason}"
@@ -7,7 +7,7 @@

nl:
site_settings:
staff_notes_enabled: "Stafgebruikers mogen notities aan gebruikers toevoegen"
user_notes_enabled: "Stafgebruikers mogen notities aan gebruikers toevoegen"
staff_notes:
official_warning: "Heeft een officiële waarschuwing gekregen van @%{username} -- %{warning_link}"
user_suspended: "@%{username} heeft deze account geschorst tot %{suspended_till}. Reden: %{reason}"
@@ -7,7 +7,7 @@

pl_PL:
site_settings:
staff_notes_enabled: "Pozwól członkom zespołu dołączać uwagi do użytkowników"
user_notes_enabled: "Pozwól członkom zespołu dołączać uwagi do użytkowników"
staff_notes:
official_warning: "Otrzymano oficjalne ostrzeżenie od @%{username} -- %{warning_link}"
user_suspended: "@%{username} zawiesiłeś to konto do %{suspended_till}. Powód: %{reason}"
@@ -7,7 +7,7 @@

pt:
site_settings:
staff_notes_enabled: "Permitir que os utilizadores da equipa anexem notas aos utilizadores"
user_notes_enabled: "Permitir que os utilizadores da equipa anexem notas aos utilizadores"
staff_notes:
official_warning: "Recebeu um aviso oficial de @%{username} -- %{warning_link}"
reports:
@@ -7,7 +7,7 @@

pt_BR:
site_settings:
staff_notes_enabled: "Permitir que usuários da staff anexem notas aos usuários"
user_notes_enabled: "Permitir que usuários da staff anexem notas aos usuários"
staff_notes:
official_warning: "Recebido um aviso oficial de @%{username} -- %{warning_link}"
user_suspended: "@%{username} suspendeu esta conta até %{suspended_till}. Motivo: %{reason}"
@@ -7,7 +7,7 @@

ru:
site_settings:
staff_notes_enabled: "Разрешить персоналу прикреплять заметки к пользователям"
user_notes_enabled: "Разрешить персоналу прикреплять заметки к пользователям"
staff_notes:
official_warning: "Получено официальное предупреждение от @%{username} -- %{warning_link}"
user_suspended: "@%{username} приостановил этот аккаунт до %{suspended_till}. Причина: %{reason}"
@@ -7,7 +7,7 @@

sk:
site_settings:
staff_notes_enabled: "Umožniť personálu napísať poznámku k používateľom"
user_notes_enabled: "Umožniť personálu napísať poznámku k používateľom"
reports:
staff_notes:
labels:
@@ -7,7 +7,7 @@

sl:
site_settings:
staff_notes_enabled: "Omogoči opombe osebja na uporabniku"
user_notes_enabled: "Omogoči opombe osebja na uporabniku"
staff_notes:
official_warning: "Prejel uradno opozorilo od @%{username} -- %{warning_link}"
user_suspended: "@%{username} supendiral ta račun do %{suspended_till}. Razlog: %{reason}"
@@ -7,7 +7,7 @@

sw:
site_settings:
staff_notes_enabled: "Waruhusu wasaidizi waambatanishe madokezo kwa watumiaji"
user_notes_enabled: "Waruhusu wasaidizi waambatanishe madokezo kwa watumiaji"
staff_notes:
official_warning: "Umepokea onyo kutoka kwa @%{username} -- %{warning_link}"
user_suspended: "@%{username}amesimamisha akaunti yake mpaka %{suspended_till}. Sababu:%{reason}"
@@ -7,7 +7,7 @@

tr_TR:
site_settings:
staff_notes_enabled: "Personel kullanıcılarının, kullanıcılara not eklemesine izin ver"
user_notes_enabled: "Personel kullanıcılarının, kullanıcılara not eklemesine izin ver"
reports:
staff_notes:
labels:
@@ -7,8 +7,8 @@

ur:
site_settings:
staff_notes_enabled: "اسٹاف صارفین کو صارفین کیساتھ نوٹ منسلک کرنے کی اجازت دیں"
staff_notes_moderators_delete: "منتظمین کو صارف نوٹس حذف کرنے کی اجازت دیں"
user_notes_enabled: "اسٹاف صارفین کو صارفین کیساتھ نوٹ منسلک کرنے کی اجازت دیں"
user_notes_moderators_delete: "منتظمین کو صارف نوٹس حذف کرنے کی اجازت دیں"
staff_notes:
official_warning: "@%{username} کی طرف سے ایک آفیشل انتباہ ملی -- %{warning_link}"
user_suspended: "@%{username}نے یہ اکاؤنٹ %{suspended_till}تک معطل کر دیا۔ وجہ: %{reason} "
@@ -7,8 +7,8 @@

zh_CN:
site_settings:
staff_notes_enabled: "允许管理人员将注释附加到用户"
staff_notes_moderators_delete: "允许版主删除用户注释"
user_notes_enabled: "允许管理人员将注释附加到用户"
user_notes_moderators_delete: "允许版主删除用户注释"
staff_notes:
official_warning: "收到来自 @%{username}的正式警告 - %{warning_link}"
user_suspended: "@%{username}暂停此帐户,直到%{suspended_till}。 原因:%{reason}"
@@ -1,7 +1,7 @@
plugins:
staff_notes_enabled:
user_notes_enabled:
default: false
client: true
staff_notes_moderators_delete:
user_notes_moderators_delete:
default: true
client: false
@@ -1,12 +1,12 @@
# frozen_string_literal: true

# name: discourse-staff-notes
# name: discourse-user-notes
# about: Gives the ability for staff members to attach notes to users
# version: 0.0.2
# authors: Robin Ward
# url: https://github.com/discourse/discourse-staff-notes

enabled_site_setting :staff_notes_enabled
enabled_site_setting :user_notes_enabled

register_asset 'stylesheets/staff_notes.scss'

@@ -203,7 +203,7 @@ def create_json(obj)
whitelist_staff_user_custom_field(STAFF_NOTE_COUNT_FIELD)

add_to_class(Guardian, :can_delete_staff_notes?) do
(SiteSetting.staff_notes_moderators_delete? && user.staff?) || user.admin?
(SiteSetting.user_notes_moderators_delete? && user.staff?) || user.admin?
end

add_to_serializer(:admin_detailed_user, :staff_notes_count, false) do
@@ -9,7 +9,7 @@
describe 'when a user suspension log is created' do
context "staff notes plugin is enabled" do
before do
SiteSetting.staff_notes_enabled = true
SiteSetting.user_notes_enabled = true
end

it "should create staff note for suspension" do
@@ -10,7 +10,7 @@
describe 'when a user warning is created' do
context "staff notes plugin is enabled" do
before do
SiteSetting.staff_notes_enabled = true
SiteSetting.user_notes_enabled = true
end

it "should create staff note for warning" do

0 comments on commit e706cc5

Please sign in to comment.
You can’t perform that action at this time.