Update setting names, readme, to reflect rename to user notes
This commit is contained in:
parent
c79a9297e3
commit
e706cc5819
|
@ -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 @@ after_initialize do
|
|||
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 UserHistory do
|
|||
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 UserWarning do
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue