decidim-admin 0.29.2 → 0.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/commands/decidim/admin/unhide_resource.rb +1 -0
- data/app/controllers/decidim/admin/moderations_controller.rb +8 -3
- data/app/controllers/decidim/admin/organization_controller.rb +1 -1
- data/app/permissions/decidim/admin/permissions.rb +8 -0
- data/app/views/decidim/admin/moderations/index.html.erb +5 -1
- data/config/locales/ar.yml +14 -5
- data/config/locales/bg.yml +2 -2
- data/config/locales/bs-BA.yml +3 -2
- data/config/locales/ca-IT.yml +1161 -0
- data/config/locales/ca.yml +15 -5
- data/config/locales/cs.yml +11 -1
- data/config/locales/de.yml +16 -6
- data/config/locales/el.yml +4 -2
- data/config/locales/en.yml +10 -0
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +12 -2
- data/config/locales/es-PY.yml +12 -2
- data/config/locales/es.yml +10 -0
- data/config/locales/eu.yml +32 -22
- data/config/locales/fi-plain.yml +12 -4
- data/config/locales/fi.yml +12 -4
- data/config/locales/fr-CA.yml +13 -3
- data/config/locales/fr.yml +13 -3
- data/config/locales/ga-IE.yml +1 -6
- data/config/locales/gl.yml +4 -1
- data/config/locales/he-IL.yml +6 -0
- data/config/locales/hu.yml +5 -5
- data/config/locales/id-ID.yml +5 -5
- data/config/locales/is-IS.yml +1 -6
- data/config/locales/it.yml +181 -3
- data/config/locales/ja.yml +12 -2
- data/config/locales/kaa.yml +5 -0
- data/config/locales/ko.yml +10 -2
- data/config/locales/lb.yml +6 -3
- data/config/locales/lt.yml +2 -0
- data/config/locales/lv.yml +3 -2
- data/config/locales/nl.yml +6 -3
- data/config/locales/no.yml +5 -2
- data/config/locales/pl.yml +3 -3
- data/config/locales/pt-BR.yml +2 -2
- data/config/locales/pt.yml +7 -4
- data/config/locales/ro-RO.yml +8 -3
- data/config/locales/ru.yml +5 -7
- data/config/locales/sk.yml +4 -5
- data/config/locales/sl.yml +7 -0
- data/config/locales/sq-AL.yml +13 -3
- data/config/locales/sr-CS.yml +3 -2
- data/config/locales/sv.yml +12 -4
- data/config/locales/th-TH.yml +4 -0
- data/config/locales/tr-TR.yml +5 -6
- data/config/locales/uk.yml +2 -7
- data/config/locales/zh-CN.yml +3 -4
- data/config/locales/zh-TW.yml +2 -0
- data/lib/decidim/admin/test/manage_hide_content_examples.rb +4 -3
- data/lib/decidim/admin/test/manage_moderations_examples.rb +1 -1
- data/lib/decidim/admin/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c852741cd61530ba9d8b7d124853be3848447169a38affddefadc8a62983317
|
4
|
+
data.tar.gz: 266e61bd6389325aedfdef65efc9e4ad74fb52cd6aad24afdcc0f36893a1b5b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb17e3607080d60671cf40e5f5e20d151ba2df3ab0349914eec98cd449372171db95838779ab787e24defe37343cf7377c48906430b92fb6fa7c351cab9543cd
|
7
|
+
data.tar.gz: 370fd4143351c6b5b48cc24f768fa49cf0aeb8906b842d0fcac0400fe6535e0bb4f5e69a9905d165dec5626b0f4cb3daf00a8129e0fadb7101d25cc0daca1f7a
|
@@ -57,12 +57,17 @@ module Decidim
|
|
57
57
|
Admin::UnhideResource.call(reportable, current_user) do
|
58
58
|
on(:ok) do
|
59
59
|
flash[:notice] = I18n.t("reportable.unhide.success", scope: "decidim.moderations.admin")
|
60
|
-
redirect_to moderations_path
|
60
|
+
redirect_to moderations_path(hidden: true)
|
61
|
+
end
|
62
|
+
|
63
|
+
on(:parent_invalid) do
|
64
|
+
flash[:alert] = I18n.t("reportable.unhide.parent_invalid", scope: "decidim.moderations.admin")
|
65
|
+
redirect_to moderations_path(hidden: true)
|
61
66
|
end
|
62
67
|
|
63
68
|
on(:invalid) do
|
64
|
-
flash
|
65
|
-
redirect_to moderations_path
|
69
|
+
flash[:alert] = I18n.t("reportable.unhide.invalid", scope: "decidim.moderations.admin")
|
70
|
+
redirect_to moderations_path(hidden: true)
|
66
71
|
end
|
67
72
|
end
|
68
73
|
end
|
@@ -48,7 +48,7 @@ module Decidim
|
|
48
48
|
if (term = params[:term].to_s).present?
|
49
49
|
query = if term.start_with?("@")
|
50
50
|
nickname = term.delete("@")
|
51
|
-
relation.where("nickname
|
51
|
+
relation.where("nickname LIKE ?", "#{nickname}%")
|
52
52
|
.order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("similarity(nickname, '#{nickname}') DESC")))
|
53
53
|
else
|
54
54
|
relation.where("name ILIKE ?", "%#{term}%").or(
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Admin
|
5
5
|
class Permissions < Decidim::DefaultPermissions
|
6
|
+
include Decidim::UserRoleChecker
|
7
|
+
|
6
8
|
def permissions
|
7
9
|
return permission_action if managed_user_action?
|
8
10
|
|
@@ -31,6 +33,8 @@ module Decidim
|
|
31
33
|
|
32
34
|
apply_global_moderations_permission_for_admin!
|
33
35
|
|
36
|
+
can_use_image_editor?
|
37
|
+
|
34
38
|
if user.admin? && admin_terms_accepted?
|
35
39
|
allow! if read_admin_log_action?
|
36
40
|
allow! if read_user_statistics_action?
|
@@ -253,6 +257,10 @@ module Decidim
|
|
253
257
|
def available_authorization_handlers?
|
254
258
|
user.organization.available_authorization_handlers.any?
|
255
259
|
end
|
260
|
+
|
261
|
+
def can_use_image_editor?
|
262
|
+
allow! if permission_action.subject == :editor_image && user_has_any_role?(user, nil, broad_check: true)
|
263
|
+
end
|
256
264
|
end
|
257
265
|
end
|
258
266
|
end
|
@@ -85,7 +85,11 @@
|
|
85
85
|
<%= icon_link_to "eye-line", hide_moderation_path(id: moderation), t("actions.hide", scope: "decidim.moderations"), class: "action-icon--hide", method: :put %>
|
86
86
|
<% end %>
|
87
87
|
<% if moderation.reportable.hidden? && allowed_to?(:unhide, authorization_scope) %>
|
88
|
-
|
88
|
+
<% if moderation.reportable.respond_to?(:commentable) && moderation.reportable.commentable.try(:hidden?) %>
|
89
|
+
<%= icon_with_tooltip "eye-line", t("actions.parent_hidden", scope: "decidim.moderations"), class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.parent_hidden", scope: "decidim.moderations") %>
|
90
|
+
<% else %>
|
91
|
+
<%= icon_link_to "eye-line", unhide_moderation_path(id: moderation), t("actions.unhide", scope: "decidim.moderations"), method: :put %>
|
92
|
+
<% end %>
|
89
93
|
<% end %>
|
90
94
|
</td>
|
91
95
|
</tr>
|
data/config/locales/ar.yml
CHANGED
@@ -106,6 +106,8 @@ ar:
|
|
106
106
|
participatory_space_private_user:
|
107
107
|
email: البريد الإلكتروني
|
108
108
|
name: الإسم
|
109
|
+
participatory_space_private_user_csv_import:
|
110
|
+
file: ملف
|
109
111
|
scope:
|
110
112
|
code: الشفرة
|
111
113
|
name: الاسم
|
@@ -574,8 +576,8 @@ ar:
|
|
574
576
|
actions: أفعال
|
575
577
|
created_at: أنشئت في
|
576
578
|
document_number: رقم المستند
|
577
|
-
name:
|
578
|
-
nickname:
|
579
|
+
name: الاسم
|
580
|
+
nickname: كنية
|
579
581
|
phone: هاتف
|
580
582
|
state: حالة
|
581
583
|
users_count: عدد المشاركين
|
@@ -609,6 +611,11 @@ ar:
|
|
609
611
|
reported_content: محتوى تم الإبلاغ عنه
|
610
612
|
show:
|
611
613
|
report_reason: السبب
|
614
|
+
new_import:
|
615
|
+
accepted_mime_types:
|
616
|
+
csv: CSV
|
617
|
+
json: JSON
|
618
|
+
xlsx: XLSX
|
612
619
|
newsletter_templates:
|
613
620
|
index:
|
614
621
|
preview_template: معاينة
|
@@ -727,6 +734,8 @@ ar:
|
|
727
734
|
title: مشارك جديد الفضاء الخاص المشارك.
|
728
735
|
participatory_space_private_users_csv_imports:
|
729
736
|
new:
|
737
|
+
csv_upload:
|
738
|
+
title: قم بتحميل ملف CSV الخاص بك
|
730
739
|
destroy:
|
731
740
|
button: حذف جميع المشاركين الخاصين
|
732
741
|
empty: ليس لديك أي مشاركين خاصين.
|
@@ -849,14 +858,14 @@ ar:
|
|
849
858
|
index:
|
850
859
|
state:
|
851
860
|
pending: قيد الانتظار
|
852
|
-
rejected:
|
853
|
-
verified: التحقق
|
861
|
+
rejected: تم رفضه
|
862
|
+
verified: تم التحقق
|
854
863
|
verify_via_csv: تحقق عبر CSV
|
855
864
|
user_groups_csv_verifications:
|
856
865
|
new:
|
857
866
|
explanation: قم بتحميل ملف CSV الخاص بك. يجب أن يحتوي على رسائل البريد الإلكتروني الرسمية للمجموعات في مؤسستك في العمود الأول من الملف ، بدون رؤوس. سيتم التحقق من صحة المجموعات التي أكدت بريدها الإلكتروني والتي تحتوي على بريد إلكتروني ظاهر في ملف CSV.
|
858
867
|
title: قم بتحميل ملف CSV الخاص بك
|
859
|
-
upload:
|
868
|
+
upload: حمّل
|
860
869
|
users:
|
861
870
|
create:
|
862
871
|
error: كانت هناك مشكلة في دعوة هذا المشرف.
|
data/config/locales/bg.yml
CHANGED
@@ -892,7 +892,7 @@ bg:
|
|
892
892
|
success: Файлът във формат CSV беше качен успешно; изпращаме имейл с покана на участниците. Това може да отнеме известно време.
|
893
893
|
new:
|
894
894
|
csv_upload:
|
895
|
-
title: Качете своя файл
|
895
|
+
title: Качете своя CSV файл
|
896
896
|
destroy:
|
897
897
|
button: Изтрийте всички частни участници
|
898
898
|
confirm: Сигурни ли сте, че искате да изтриете всички частни участници? Това действие е необратимо, няма да можете да ги възстановите.
|
@@ -1055,7 +1055,7 @@ bg:
|
|
1055
1055
|
index:
|
1056
1056
|
state:
|
1057
1057
|
pending: Изчакване
|
1058
|
-
rejected:
|
1058
|
+
rejected: Отхвърлен
|
1059
1059
|
verified: Проверен
|
1060
1060
|
verify_via_csv: Проверка чрез CSV
|
1061
1061
|
user_groups_csv_verifications:
|
data/config/locales/bs-BA.yml
CHANGED
@@ -397,11 +397,12 @@ bs:
|
|
397
397
|
user_group:
|
398
398
|
fields:
|
399
399
|
actions: Akcije
|
400
|
-
created_at:
|
400
|
+
created_at: Stvoreno
|
401
401
|
document_number: Broj dokumenta
|
402
402
|
name: Ime
|
403
|
+
nickname: Nadimak
|
403
404
|
phone: Telefon
|
404
|
-
state:
|
405
|
+
state: Državno
|
405
406
|
users_count: Broj učesnika
|
406
407
|
moderations:
|
407
408
|
report:
|