Add titles to warning presets in admin UI (#13252)
parent
aeebbe90dc
commit
f556f79b77
|
@ -7,7 +7,7 @@ module Admin
|
||||||
def index
|
def index
|
||||||
authorize :account_warning_preset, :index?
|
authorize :account_warning_preset, :index?
|
||||||
|
|
||||||
@warning_presets = AccountWarningPreset.all
|
@warning_presets = AccountWarningPreset.alphabetic
|
||||||
@warning_preset = AccountWarningPreset.new
|
@warning_preset = AccountWarningPreset.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ module Admin
|
||||||
if @warning_preset.save
|
if @warning_preset.save
|
||||||
redirect_to admin_warning_presets_path
|
redirect_to admin_warning_presets_path
|
||||||
else
|
else
|
||||||
@warning_presets = AccountWarningPreset.all
|
@warning_presets = AccountWarningPreset.alphabetic
|
||||||
render :index
|
render :index
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -52,7 +52,7 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def warning_preset_params
|
def warning_preset_params
|
||||||
params.require(:account_warning_preset).permit(:text)
|
params.require(:account_warning_preset).permit(:title, :text)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,8 +8,11 @@
|
||||||
# text :text default(""), not null
|
# text :text default(""), not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
|
# title :string default(""), not null
|
||||||
#
|
#
|
||||||
|
|
||||||
class AccountWarningPreset < ApplicationRecord
|
class AccountWarningPreset < ApplicationRecord
|
||||||
validates :text, presence: true
|
validates :text, presence: true
|
||||||
|
|
||||||
|
scope :alphabetic, -> { order(title: :asc, text: :asc) }
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- unless @warning_presets.empty?
|
- unless @warning_presets.empty?
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :warning_preset_id, collection: @warning_presets, label_method: :text, wrapper: :with_block_label
|
= f.input :warning_preset_id, collection: @warning_presets, label_method: ->(warning_preset) { [warning_preset.title.presence, truncate(warning_preset.text)].compact.join(' - ') }, wrapper: :with_block_label
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :text, as: :text, wrapper: :with_block_label, hint: t('simple_form.hints.admin_account_action.text_html', path: admin_warning_presets_path)
|
= f.input :text, as: :text, wrapper: :with_block_label, hint: t('simple_form.hints.admin_account_action.text_html', path: admin_warning_presets_path)
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
.announcements-list__item
|
||||||
|
= link_to edit_admin_warning_preset_path(warning_preset), class: 'announcements-list__item__title' do
|
||||||
|
= warning_preset.title.presence || truncate(warning_preset.text)
|
||||||
|
|
||||||
|
.announcements-list__item__action-bar
|
||||||
|
.announcements-list__item__meta
|
||||||
|
= truncate(warning_preset.text)
|
||||||
|
|
||||||
|
%div
|
||||||
|
= table_link_to 'trash', t('admin.warning_presets.delete'), admin_warning_preset_path(warning_preset), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, warning_preset)
|
|
@ -4,6 +4,9 @@
|
||||||
= simple_form_for @warning_preset, url: admin_warning_preset_path(@warning_preset) do |f|
|
= simple_form_for @warning_preset, url: admin_warning_preset_path(@warning_preset) do |f|
|
||||||
= render 'shared/error_messages', object: @warning_preset
|
= render 'shared/error_messages', object: @warning_preset
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :title, wrapper: :with_block_label
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :text, wrapper: :with_block_label
|
= f.input :text, wrapper: :with_block_label
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
= simple_form_for @warning_preset, url: admin_warning_presets_path do |f|
|
= simple_form_for @warning_preset, url: admin_warning_presets_path do |f|
|
||||||
= render 'shared/error_messages', object: @warning_preset
|
= render 'shared/error_messages', object: @warning_preset
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :title, wrapper: :with_block_label
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :text, wrapper: :with_block_label
|
= f.input :text, wrapper: :with_block_label
|
||||||
|
|
||||||
|
@ -13,18 +16,9 @@
|
||||||
|
|
||||||
%hr.spacer/
|
%hr.spacer/
|
||||||
|
|
||||||
- unless @warning_presets.empty?
|
- if @warning_presets.empty?
|
||||||
.table-wrapper
|
%div.muted-hint.center-text
|
||||||
%table.table
|
= t 'admin.warning_presets.empty'
|
||||||
%thead
|
- else
|
||||||
%tr
|
.announcements-list
|
||||||
%th= t('simple_form.labels.account_warning_preset.text')
|
= render partial: 'warning_preset', collection: @warning_presets
|
||||||
%th
|
|
||||||
%tbody
|
|
||||||
- @warning_presets.each do |preset|
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
= Formatter.instance.linkify(preset.text)
|
|
||||||
%td
|
|
||||||
= table_link_to 'pencil', t('admin.warning_presets.edit'), edit_admin_warning_preset_path(preset)
|
|
||||||
= table_link_to 'trash', t('admin.warning_presets.delete'), admin_warning_preset_path(preset), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|
|
||||||
|
|
|
@ -562,7 +562,6 @@ ar:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: إضافة واحد جديد
|
add_new: إضافة واحد جديد
|
||||||
delete: حذف
|
delete: حذف
|
||||||
edit: تعديل
|
|
||||||
edit_preset: تعديل نموذج التحذير
|
edit_preset: تعديل نموذج التحذير
|
||||||
title: إدارة نماذج التحذير
|
title: إدارة نماذج التحذير
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ ca:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Afegeix-ne un de nou
|
add_new: Afegeix-ne un de nou
|
||||||
delete: Esborra
|
delete: Esborra
|
||||||
edit: Edita
|
|
||||||
edit_preset: Edita l'avís predeterminat
|
edit_preset: Edita l'avís predeterminat
|
||||||
title: Gestiona les configuracions predefinides dels avisos
|
title: Gestiona les configuracions predefinides dels avisos
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ co:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Aghjunghje
|
add_new: Aghjunghje
|
||||||
delete: Sguassà
|
delete: Sguassà
|
||||||
edit: Cambià
|
|
||||||
edit_preset: Cambià a preselezzione d'avertimentu
|
edit_preset: Cambià a preselezzione d'avertimentu
|
||||||
title: Amministrà e preselezzione d'avertimentu
|
title: Amministrà e preselezzione d'avertimentu
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -588,7 +588,6 @@ cs:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Přidat nové
|
add_new: Přidat nové
|
||||||
delete: Smazat
|
delete: Smazat
|
||||||
edit: Upravit
|
|
||||||
edit_preset: Upravit předlohu pro varování
|
edit_preset: Upravit předlohu pro varování
|
||||||
title: Spravovat předlohy pro varování
|
title: Spravovat předlohy pro varování
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -605,7 +605,6 @@ cy:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Ychwanegu newydd
|
add_new: Ychwanegu newydd
|
||||||
delete: Dileu
|
delete: Dileu
|
||||||
edit: Golygu
|
|
||||||
edit_preset: Golygu rhagosodiad rhybudd
|
edit_preset: Golygu rhagosodiad rhybudd
|
||||||
title: Rheoli rhagosodiadau rhybudd
|
title: Rheoli rhagosodiadau rhybudd
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -489,7 +489,6 @@ da:
|
||||||
most_recent: Seneste
|
most_recent: Seneste
|
||||||
warning_presets:
|
warning_presets:
|
||||||
delete: Slet
|
delete: Slet
|
||||||
edit: Rediger
|
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
new_report:
|
new_report:
|
||||||
body: "%{reporter} har anmeldt %{target}"
|
body: "%{reporter} har anmeldt %{target}"
|
||||||
|
|
|
@ -573,7 +573,6 @@ de:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Neu hinzufügen
|
add_new: Neu hinzufügen
|
||||||
delete: Löschen
|
delete: Löschen
|
||||||
edit: Bearbeiten
|
|
||||||
edit_preset: Warnungsvorlage bearbeiten
|
edit_preset: Warnungsvorlage bearbeiten
|
||||||
title: Warnungsvorlagen verwalten
|
title: Warnungsvorlagen verwalten
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ el:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Πρόσθεση νέου
|
add_new: Πρόσθεση νέου
|
||||||
delete: Διαγραφή
|
delete: Διαγραφή
|
||||||
edit: Ενημέρωση
|
|
||||||
edit_preset: Ενημέρωση προκαθορισμένης προειδοποίησης
|
edit_preset: Ενημέρωση προκαθορισμένης προειδοποίησης
|
||||||
title: Διαχείριση προκαθορισμένων προειδοποιήσεων
|
title: Διαχείριση προκαθορισμένων προειδοποιήσεων
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -576,7 +576,6 @@ en:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Add new
|
add_new: Add new
|
||||||
delete: Delete
|
delete: Delete
|
||||||
edit: Edit
|
|
||||||
edit_preset: Edit warning preset
|
edit_preset: Edit warning preset
|
||||||
title: Manage warning presets
|
title: Manage warning presets
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -474,7 +474,6 @@ en_GB:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Add new
|
add_new: Add new
|
||||||
delete: Delete
|
delete: Delete
|
||||||
edit: Edit
|
|
||||||
edit_preset: Edit warning preset
|
edit_preset: Edit warning preset
|
||||||
title: Manage warning presets
|
title: Manage warning presets
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -557,7 +557,6 @@ eo:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Aldoni novan
|
add_new: Aldoni novan
|
||||||
delete: Forigi
|
delete: Forigi
|
||||||
edit: Redakti
|
|
||||||
edit_preset: Redakti avertan antaŭagordon
|
edit_preset: Redakti avertan antaŭagordon
|
||||||
title: Administri avertajn antaŭagordojn
|
title: Administri avertajn antaŭagordojn
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ es-AR:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Agregar nuevo
|
add_new: Agregar nuevo
|
||||||
delete: Eliminar
|
delete: Eliminar
|
||||||
edit: Editar
|
|
||||||
edit_preset: Editar preajuste de advertencia
|
edit_preset: Editar preajuste de advertencia
|
||||||
title: Administrar preajustes de advertencia
|
title: Administrar preajustes de advertencia
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ es:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Añadir nuevo
|
add_new: Añadir nuevo
|
||||||
delete: Borrar
|
delete: Borrar
|
||||||
edit: Editar
|
|
||||||
edit_preset: Editar aviso predeterminado
|
edit_preset: Editar aviso predeterminado
|
||||||
title: Editar configuración predeterminada de avisos
|
title: Editar configuración predeterminada de avisos
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -576,7 +576,6 @@ et:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Lisa uus
|
add_new: Lisa uus
|
||||||
delete: Kustuta
|
delete: Kustuta
|
||||||
edit: Redigeeri
|
|
||||||
edit_preset: Redigeeri hoiatuse eelseadistust
|
edit_preset: Redigeeri hoiatuse eelseadistust
|
||||||
title: Halda hoiatuste eelseadistusi
|
title: Halda hoiatuste eelseadistusi
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ eu:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Gehitu berria
|
add_new: Gehitu berria
|
||||||
delete: Ezabatu
|
delete: Ezabatu
|
||||||
edit: Editatu
|
|
||||||
edit_preset: Editatu abisu aurre-ezarpena
|
edit_preset: Editatu abisu aurre-ezarpena
|
||||||
title: Kudeatu abisu aurre-ezarpenak
|
title: Kudeatu abisu aurre-ezarpenak
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -575,7 +575,6 @@ fa:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: افزودن تازه
|
add_new: افزودن تازه
|
||||||
delete: زدودن
|
delete: زدودن
|
||||||
edit: ویرایش
|
|
||||||
edit_preset: ویرایش هشدار پیشفرض
|
edit_preset: ویرایش هشدار پیشفرض
|
||||||
title: مدیریت هشدارهای پیشفرض
|
title: مدیریت هشدارهای پیشفرض
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ fr:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Ajouter un nouveau
|
add_new: Ajouter un nouveau
|
||||||
delete: Effacer
|
delete: Effacer
|
||||||
edit: Éditer
|
|
||||||
edit_preset: Éditer les avertissements prédéfinis
|
edit_preset: Éditer les avertissements prédéfinis
|
||||||
title: Gérer les avertissements prédéfinis
|
title: Gérer les avertissements prédéfinis
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ gl:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Engadir novo
|
add_new: Engadir novo
|
||||||
delete: Eliminar
|
delete: Eliminar
|
||||||
edit: Editar
|
|
||||||
edit_preset: Editar aviso preestablecido
|
edit_preset: Editar aviso preestablecido
|
||||||
title: Xestionar avisos preestablecidos
|
title: Xestionar avisos preestablecidos
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -575,7 +575,6 @@ hu:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Új hozzáadása
|
add_new: Új hozzáadása
|
||||||
delete: Törlés
|
delete: Törlés
|
||||||
edit: Szerkesztés
|
|
||||||
edit_preset: Figyelmeztetés szerkesztése
|
edit_preset: Figyelmeztetés szerkesztése
|
||||||
title: Figyelmeztetések
|
title: Figyelmeztetések
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -565,7 +565,6 @@ id:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Tambah baru
|
add_new: Tambah baru
|
||||||
delete: Hapus
|
delete: Hapus
|
||||||
edit: Sunting
|
|
||||||
edit_preset: Sunting preset peringatan
|
edit_preset: Sunting preset peringatan
|
||||||
title: Kelola preset peringatan
|
title: Kelola preset peringatan
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ is:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Bæta við nýju
|
add_new: Bæta við nýju
|
||||||
delete: Eyða
|
delete: Eyða
|
||||||
edit: Breyta
|
|
||||||
edit_preset: Breyta forstilltri aðvörun
|
edit_preset: Breyta forstilltri aðvörun
|
||||||
title: Sýsla með forstilltar aðvaranir
|
title: Sýsla með forstilltar aðvaranir
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ it:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Aggiungi nuovo
|
add_new: Aggiungi nuovo
|
||||||
delete: Cancella
|
delete: Cancella
|
||||||
edit: Modifica
|
|
||||||
edit_preset: Modifica avviso predefinito
|
edit_preset: Modifica avviso predefinito
|
||||||
title: Gestisci avvisi predefiniti
|
title: Gestisci avvisi predefiniti
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -565,7 +565,6 @@ ja:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: 追加
|
add_new: 追加
|
||||||
delete: 削除
|
delete: 削除
|
||||||
edit: 編集
|
|
||||||
edit_preset: プリセット警告文を編集
|
edit_preset: プリセット警告文を編集
|
||||||
title: プリセット警告文を管理
|
title: プリセット警告文を管理
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -330,7 +330,6 @@ kab:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Rnu amaynut
|
add_new: Rnu amaynut
|
||||||
delete: Kkes
|
delete: Kkes
|
||||||
edit: Ẓreg
|
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
new_report:
|
new_report:
|
||||||
subject: Aneqqis amaynut i %{instance} (#%{id})
|
subject: Aneqqis amaynut i %{instance} (#%{id})
|
||||||
|
|
|
@ -555,7 +555,6 @@ kk:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Add nеw
|
add_new: Add nеw
|
||||||
delete: Deletе
|
delete: Deletе
|
||||||
edit: Еdit
|
|
||||||
edit_preset: Edit warning prеset
|
edit_preset: Edit warning prеset
|
||||||
title: Manage warning presеts
|
title: Manage warning presеts
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -567,7 +567,6 @@ ko:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: 새로 추가
|
add_new: 새로 추가
|
||||||
delete: 삭제
|
delete: 삭제
|
||||||
edit: 편집
|
|
||||||
edit_preset: 경고 틀 수정
|
edit_preset: 경고 틀 수정
|
||||||
title: 경고 틀 관리
|
title: 경고 틀 관리
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -410,7 +410,6 @@ lt:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Pridėti naują
|
add_new: Pridėti naują
|
||||||
delete: Ištrinti
|
delete: Ištrinti
|
||||||
edit: Keisti
|
|
||||||
edit_preset: Keisti įspėjimo nustatymus
|
edit_preset: Keisti įspėjimo nustatymus
|
||||||
title: Valdyti įspėjimo nustatymus
|
title: Valdyti įspėjimo nustatymus
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ nl:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Nieuwe toevoegen
|
add_new: Nieuwe toevoegen
|
||||||
delete: Verwijderen
|
delete: Verwijderen
|
||||||
edit: Bewerken
|
|
||||||
edit_preset: Voorinstelling van waarschuwing bewerken
|
edit_preset: Voorinstelling van waarschuwing bewerken
|
||||||
title: Voorinstellingen van waarschuwingen beheren
|
title: Voorinstellingen van waarschuwingen beheren
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -566,7 +566,6 @@ nn:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Legg til ny
|
add_new: Legg til ny
|
||||||
delete: Slett
|
delete: Slett
|
||||||
edit: Rediger
|
|
||||||
edit_preset: Endr åtvaringsoppsett
|
edit_preset: Endr åtvaringsoppsett
|
||||||
title: Handsam åtvaringsoppsett
|
title: Handsam åtvaringsoppsett
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -561,7 +561,6 @@
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Legg til ny
|
add_new: Legg til ny
|
||||||
delete: Slett
|
delete: Slett
|
||||||
edit: Rediger
|
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
new_pending_account:
|
new_pending_account:
|
||||||
body: Detaljer om den nye kontoen er nedenfor. Du kan godkjenne eller avvise denne søknaden.
|
body: Detaljer om den nye kontoen er nedenfor. Du kan godkjenne eller avvise denne søknaden.
|
||||||
|
|
|
@ -558,7 +558,6 @@ oc:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: N’ajustar un nòu
|
add_new: N’ajustar un nòu
|
||||||
delete: Escafar
|
delete: Escafar
|
||||||
edit: Modificar
|
|
||||||
edit_preset: Modificar lo tèxt predefinit d’avertiment
|
edit_preset: Modificar lo tèxt predefinit d’avertiment
|
||||||
title: Gerir los tèxtes predefinits
|
title: Gerir los tèxtes predefinits
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -541,7 +541,6 @@ pl:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Dodaj nowy
|
add_new: Dodaj nowy
|
||||||
delete: Usuń
|
delete: Usuń
|
||||||
edit: Edytuj
|
|
||||||
edit_preset: Edytuj szablon ostrzeżenia
|
edit_preset: Edytuj szablon ostrzeżenia
|
||||||
title: Zarządzaj szablonami ostrzeżeń
|
title: Zarządzaj szablonami ostrzeżeń
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ pt-BR:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Adicionar novo
|
add_new: Adicionar novo
|
||||||
delete: Excluir
|
delete: Excluir
|
||||||
edit: Editar
|
|
||||||
edit_preset: Editar o aviso pré-definido
|
edit_preset: Editar o aviso pré-definido
|
||||||
title: Gerenciar os avisos pré-definidos
|
title: Gerenciar os avisos pré-definidos
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ pt-PT:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Adicionar novo
|
add_new: Adicionar novo
|
||||||
delete: Apagar
|
delete: Apagar
|
||||||
edit: Editar
|
|
||||||
edit_preset: Editar o aviso predefinido
|
edit_preset: Editar o aviso predefinido
|
||||||
title: Gerir os avisos predefinidos
|
title: Gerir os avisos predefinidos
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -594,7 +594,6 @@ ru:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Добавить
|
add_new: Добавить
|
||||||
delete: Удалить
|
delete: Удалить
|
||||||
edit: Изменить
|
|
||||||
edit_preset: Удалить шаблон предупреждения
|
edit_preset: Удалить шаблон предупреждения
|
||||||
title: Управление шаблонами предупреждений
|
title: Управление шаблонами предупреждений
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -8,6 +8,7 @@ en:
|
||||||
acct: Specify the username@domain of the account you want to move to
|
acct: Specify the username@domain of the account you want to move to
|
||||||
account_warning_preset:
|
account_warning_preset:
|
||||||
text: You can use toot syntax, such as URLs, hashtags and mentions
|
text: You can use toot syntax, such as URLs, hashtags and mentions
|
||||||
|
title: Optional. Not visible to the recipient
|
||||||
admin_account_action:
|
admin_account_action:
|
||||||
include_statuses: The user will see which toots have caused the moderation action or warning
|
include_statuses: The user will see which toots have caused the moderation action or warning
|
||||||
send_email_notification: The user will receive an explanation of what happened with their account
|
send_email_notification: The user will receive an explanation of what happened with their account
|
||||||
|
@ -78,6 +79,7 @@ en:
|
||||||
acct: Handle of the new account
|
acct: Handle of the new account
|
||||||
account_warning_preset:
|
account_warning_preset:
|
||||||
text: Preset text
|
text: Preset text
|
||||||
|
title: Title
|
||||||
admin_account_action:
|
admin_account_action:
|
||||||
include_statuses: Include reported toots in the e-mail
|
include_statuses: Include reported toots in the e-mail
|
||||||
send_email_notification: Notify the user per e-mail
|
send_email_notification: Notify the user per e-mail
|
||||||
|
|
|
@ -574,7 +574,6 @@ sk:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Pridaj nové
|
add_new: Pridaj nové
|
||||||
delete: Vymaž
|
delete: Vymaž
|
||||||
edit: Uprav
|
|
||||||
edit_preset: Uprav varovnú predlohu
|
edit_preset: Uprav varovnú predlohu
|
||||||
title: Spravuj varovné predlohy
|
title: Spravuj varovné predlohy
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -485,7 +485,6 @@ sl:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Dodaj novo
|
add_new: Dodaj novo
|
||||||
delete: Izbriši
|
delete: Izbriši
|
||||||
edit: Uredi
|
|
||||||
edit_preset: Uredi prednastavitev opozoril
|
edit_preset: Uredi prednastavitev opozoril
|
||||||
title: Upravljaj prednastavitev opozoril
|
title: Upravljaj prednastavitev opozoril
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -415,7 +415,6 @@ sq:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Shtoni të ri
|
add_new: Shtoni të ri
|
||||||
delete: Fshije
|
delete: Fshije
|
||||||
edit: Përpunoni
|
|
||||||
edit_preset: Përpunoni sinjalizim të paracaktuar
|
edit_preset: Përpunoni sinjalizim të paracaktuar
|
||||||
title: Administroni sinjalizime të paracaktuara
|
title: Administroni sinjalizime të paracaktuara
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -431,7 +431,6 @@ sr:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Додај нови
|
add_new: Додај нови
|
||||||
delete: Избриши
|
delete: Избриши
|
||||||
edit: Уреди
|
|
||||||
edit_preset: Уреди пресет упозорења
|
edit_preset: Уреди пресет упозорења
|
||||||
title: Управљај пресетима упозорења
|
title: Управљај пресетима упозорења
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -448,7 +448,6 @@ sv:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Lägg till ny
|
add_new: Lägg till ny
|
||||||
delete: Radera
|
delete: Radera
|
||||||
edit: Redigera
|
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
new_report:
|
new_report:
|
||||||
body: "%{reporter} har rapporterat %{target}"
|
body: "%{reporter} har rapporterat %{target}"
|
||||||
|
|
|
@ -488,7 +488,6 @@ th:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: เพิ่มใหม่
|
add_new: เพิ่มใหม่
|
||||||
delete: ลบ
|
delete: ลบ
|
||||||
edit: แก้ไข
|
|
||||||
edit_preset: แก้ไขคำเตือนที่ตั้งไว้ล่วงหน้า
|
edit_preset: แก้ไขคำเตือนที่ตั้งไว้ล่วงหน้า
|
||||||
title: จัดการคำเตือนที่ตั้งไว้ล่วงหน้า
|
title: จัดการคำเตือนที่ตั้งไว้ล่วงหน้า
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -573,7 +573,6 @@ tr:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Yeni ekle
|
add_new: Yeni ekle
|
||||||
delete: Sil
|
delete: Sil
|
||||||
edit: Düzenle
|
|
||||||
edit_preset: Uyarı ön-ayarını düzenle
|
edit_preset: Uyarı ön-ayarını düzenle
|
||||||
title: Uyarı ön-ayarlarını yönet
|
title: Uyarı ön-ayarlarını yönet
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -591,7 +591,6 @@ uk:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Додати новий
|
add_new: Додати новий
|
||||||
delete: Видалити
|
delete: Видалити
|
||||||
edit: Редагувати
|
|
||||||
edit_preset: Редагувати шаблон попередження
|
edit_preset: Редагувати шаблон попередження
|
||||||
title: Управління шаблонами попереджень
|
title: Управління шаблонами попереджень
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -534,7 +534,6 @@ vi:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: Thêm mới
|
add_new: Thêm mới
|
||||||
delete: Xóa bỏ
|
delete: Xóa bỏ
|
||||||
edit: Biên tập
|
|
||||||
edit_preset: Chỉnh sửa cảnh báo đặt trước
|
edit_preset: Chỉnh sửa cảnh báo đặt trước
|
||||||
title: Quản lý cài đặt trước cảnh báo
|
title: Quản lý cài đặt trước cảnh báo
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -565,7 +565,6 @@ zh-CN:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: 添加新条目
|
add_new: 添加新条目
|
||||||
delete: 删除
|
delete: 删除
|
||||||
edit: 编辑
|
|
||||||
edit_preset: 编辑预置警告
|
edit_preset: 编辑预置警告
|
||||||
title: 管理预设警告
|
title: 管理预设警告
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
|
|
|
@ -409,7 +409,6 @@ zh-HK:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: 新增
|
add_new: 新增
|
||||||
delete: 刪除
|
delete: 刪除
|
||||||
edit: 編輯
|
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
new_report:
|
new_report:
|
||||||
body: "%{reporter} 舉報了用戶 %{target}"
|
body: "%{reporter} 舉報了用戶 %{target}"
|
||||||
|
|
|
@ -408,7 +408,6 @@ zh-TW:
|
||||||
warning_presets:
|
warning_presets:
|
||||||
add_new: 新增
|
add_new: 新增
|
||||||
delete: 刪除
|
delete: 刪除
|
||||||
edit: 編輯
|
|
||||||
admin_mailer:
|
admin_mailer:
|
||||||
new_report:
|
new_report:
|
||||||
body: "%{reporter} 檢舉了使用者 %{target}"
|
body: "%{reporter} 檢舉了使用者 %{target}"
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||||
|
|
||||||
|
class AddTitleToAccountWarningPresets < ActiveRecord::Migration[5.2]
|
||||||
|
include Mastodon::MigrationHelpers
|
||||||
|
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def up
|
||||||
|
safety_assured { add_column_with_default :account_warning_presets, :title, :string, default: '', allow_null: false }
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :account_warning_presets, :title
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2020_03_06_035625) do
|
ActiveRecord::Schema.define(version: 2020_03_12_144258) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -114,6 +114,7 @@ ActiveRecord::Schema.define(version: 2020_03_06_035625) do
|
||||||
t.text "text", default: "", null: false
|
t.text "text", default: "", null: false
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
t.string "title", default: "", null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "account_warnings", force: :cascade do |t|
|
create_table "account_warnings", force: :cascade do |t|
|
||||||
|
|
Loading…
Reference in New Issue