decidim-admin 0.30.0.rc2 → 0.30.0
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/events/decidim/parent_hidden_event.rb +6 -0
- data/app/events/decidim/resource_hidden_event.rb +4 -0
- data/app/helpers/decidim/admin/settings_helper.rb +1 -0
- data/app/permissions/decidim/admin/permissions.rb +8 -0
- data/app/views/decidim/admin/moderations/_moderation-tr.html.erb +5 -1
- data/config/locales/ar.yml +7 -5
- data/config/locales/bg.yml +2 -2
- data/config/locales/bs-BA.yml +3 -2
- data/config/locales/ca-IT.yml +1404 -0
- data/config/locales/ca.yml +7 -5
- data/config/locales/cs.yml +3 -1
- data/config/locales/de.yml +8 -6
- data/config/locales/el.yml +4 -2
- data/config/locales/en.yml +2 -0
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +4 -2
- data/config/locales/es-PY.yml +4 -2
- data/config/locales/es.yml +2 -0
- data/config/locales/eu.yml +34 -32
- data/config/locales/fi-plain.yml +4 -4
- data/config/locales/fi.yml +4 -4
- data/config/locales/fr-CA.yml +36 -3
- data/config/locales/fr.yml +36 -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 +243 -3
- data/config/locales/ja.yml +4 -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 +7 -1
- 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 +5 -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 +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2daba5d2c690b03030a08511196d9ca36ebc870e8358f97d3161182013a42fd
|
4
|
+
data.tar.gz: d57c01e2f502d64c2ba1723af733ed39bd181f0a83412efaff63235acf49c248
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8472029f6e4609819f6e09fdcca6413e35513c9b8091fe4fb12129137086ad1c67d40728a2bebec6e8fa10186fbfeb3a80e0b102e03639d5669c903a25901fb3
|
7
|
+
data.tar.gz: 7ddbe1c2eb351546b2b9d8fa5efdb59ade43f816bc487c728b1f33abb6801ee70095d6fae5d77a1f7e6c0e9b64e812041f5b3c2627328b0bd24d9099e8c018db
|
@@ -22,6 +22,7 @@ module Decidim
|
|
22
22
|
#
|
23
23
|
# Returns nothing.
|
24
24
|
def call
|
25
|
+
return broadcast(:parent_invalid) if @reportable.respond_to?(:commentable) && @reportable.commentable.try(:hidden?)
|
25
26
|
return broadcast(:invalid) unless unhideable?
|
26
27
|
|
27
28
|
@with_admin_log ? unhide_with_admin_log! : unhide!
|
@@ -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(
|
@@ -225,6 +225,7 @@ module Decidim
|
|
225
225
|
content_tag(:button,
|
226
226
|
t("#{name}_add", scope: i18n_scope),
|
227
227
|
class: "button button__xs button__transparent-secondary js-add-taxonomy-filter",
|
228
|
+
type: "button",
|
228
229
|
data: {
|
229
230
|
url: decidim_admin.taxonomy_filters_selector_index_path(component_id: @component.id)
|
230
231
|
})
|
@@ -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?
|
@@ -284,6 +288,10 @@ module Decidim
|
|
284
288
|
def component
|
285
289
|
context.fetch(:component, nil)
|
286
290
|
end
|
291
|
+
|
292
|
+
def can_use_image_editor?
|
293
|
+
allow! if permission_action.subject == :editor_image && user_has_any_role?(user, nil, broad_check: true)
|
294
|
+
end
|
287
295
|
end
|
288
296
|
end
|
289
297
|
end
|
@@ -44,7 +44,11 @@
|
|
44
44
|
<%= icon_link_to "eye-line", hide_moderation_path(id: moderation), t("actions.hide", scope: "decidim.moderations"), class: "action-icon--hide", method: :put %>
|
45
45
|
<% end %>
|
46
46
|
<% if moderation.reportable.hidden? && allowed_to?(:unhide, authorization_scope) %>
|
47
|
-
|
47
|
+
<% if moderation.reportable.respond_to?(:commentable) && moderation.reportable.commentable.try(:hidden?) %>
|
48
|
+
<%= 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") %>
|
49
|
+
<% else %>
|
50
|
+
<%= icon_link_to "eye-line", unhide_moderation_path(id: moderation), t("actions.unhide", scope: "decidim.moderations"), method: :put %>
|
51
|
+
<% end %>
|
48
52
|
<% end %>
|
49
53
|
</td>
|
50
54
|
</tr>
|
data/config/locales/ar.yml
CHANGED
@@ -556,8 +556,8 @@ ar:
|
|
556
556
|
actions: أفعال
|
557
557
|
created_at: أنشئت في
|
558
558
|
document_number: رقم المستند
|
559
|
-
name:
|
560
|
-
nickname:
|
559
|
+
name: الاسم
|
560
|
+
nickname: كنية
|
561
561
|
phone: هاتف
|
562
562
|
state: حالة
|
563
563
|
users_count: عدد المشاركين
|
@@ -721,6 +721,8 @@ ar:
|
|
721
721
|
title: مشارك جديد الفضاء الخاص المشارك.
|
722
722
|
participatory_space_private_users_csv_imports:
|
723
723
|
new:
|
724
|
+
csv_upload:
|
725
|
+
title: قم بتحميل ملف CSV الخاص بك
|
724
726
|
destroy:
|
725
727
|
button: حذف جميع المشاركين الخاصين
|
726
728
|
empty: ليس لديك أي مشاركين خاصين.
|
@@ -857,14 +859,14 @@ ar:
|
|
857
859
|
index:
|
858
860
|
state:
|
859
861
|
pending: قيد الانتظار
|
860
|
-
rejected:
|
861
|
-
verified: التحقق
|
862
|
+
rejected: تم رفضه
|
863
|
+
verified: تم التحقق
|
862
864
|
verify_via_csv: تحقق عبر CSV
|
863
865
|
user_groups_csv_verifications:
|
864
866
|
new:
|
865
867
|
explanation: قم بتحميل ملف CSV الخاص بك. يجب أن يحتوي على رسائل البريد الإلكتروني الرسمية للمجموعات في مؤسستك في العمود الأول من الملف ، بدون رؤوس. سيتم التحقق من صحة المجموعات التي أكدت بريدها الإلكتروني والتي تحتوي على بريد إلكتروني ظاهر في ملف CSV.
|
866
868
|
title: قم بتحميل ملف CSV الخاص بك
|
867
|
-
upload:
|
869
|
+
upload: حمّل
|
868
870
|
users:
|
869
871
|
create:
|
870
872
|
error: كانت هناك مشكلة في دعوة هذا المشرف.
|
data/config/locales/bg.yml
CHANGED
@@ -869,7 +869,7 @@ bg:
|
|
869
869
|
success: Файлът във формат CSV беше качен успешно; изпращаме имейл с покана на участниците. Това може да отнеме известно време.
|
870
870
|
new:
|
871
871
|
csv_upload:
|
872
|
-
title: Качете своя файл
|
872
|
+
title: Качете своя CSV файл
|
873
873
|
destroy:
|
874
874
|
button: Изтрийте всички частни участници
|
875
875
|
confirm: Сигурни ли сте, че искате да изтриете всички частни участници? Това действие е необратимо, няма да можете да ги възстановите.
|
@@ -1052,7 +1052,7 @@ bg:
|
|
1052
1052
|
index:
|
1053
1053
|
state:
|
1054
1054
|
pending: Изчакване
|
1055
|
-
rejected:
|
1055
|
+
rejected: Отхвърлен
|
1056
1056
|
verified: Проверен
|
1057
1057
|
verify_via_csv: Проверка чрез CSV
|
1058
1058
|
user_groups_csv_verifications:
|
data/config/locales/bs-BA.yml
CHANGED
@@ -374,11 +374,12 @@ bs:
|
|
374
374
|
user_group:
|
375
375
|
fields:
|
376
376
|
actions: Akcije
|
377
|
-
created_at:
|
377
|
+
created_at: Stvoreno
|
378
378
|
document_number: Broj dokumenta
|
379
379
|
name: Ime
|
380
|
+
nickname: Nadimak
|
380
381
|
phone: Telefon
|
381
|
-
state:
|
382
|
+
state: Državno
|
382
383
|
users_count: Broj učesnika
|
383
384
|
moderations:
|
384
385
|
report:
|