decidim-admin 0.27.6 → 0.27.8
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/controllers/decidim/admin/authorization_workflows_controller.rb +3 -1
- data/app/controllers/decidim/admin/impersonations_controller.rb +1 -0
- data/app/controllers/decidim/admin/organization_controller.rb +7 -4
- data/config/locales/bg.yml +833 -3
- data/config/locales/de.yml +9 -9
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/es.yml +2 -2
- data/config/locales/pl.yml +1 -0
- data/config/locales/sq-AL.yml +412 -0
- data/config/locales/th-TH.yml +100 -0
- data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +15 -14
- data/lib/decidim/admin/test/manage_attachments_examples.rb +3 -3
- data/lib/decidim/admin/test/manage_categories_examples.rb +12 -9
- data/lib/decidim/admin/test/manage_moderations_examples.rb +0 -9
- data/lib/decidim/admin/version.rb +1 -1
- metadata +12 -13
- data/app/mailers/decidim/admin/application_mailer.rb +0 -12
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
shared_examples "manage attachment collections examples" do
|
4
4
|
let!(:attachment_collection) { create(:attachment_collection, collection_for: collection_for) }
|
5
|
+
let(:attributes) { attributes_for(:attachment_collection) }
|
5
6
|
|
6
7
|
before do
|
7
8
|
visit current_path
|
@@ -18,9 +19,9 @@ shared_examples "manage attachment collections examples" do
|
|
18
19
|
click_link translated(attachment_collection.name, locale: :en)
|
19
20
|
end
|
20
21
|
|
21
|
-
expect(page).to have_selector(
|
22
|
-
expect(page).to have_selector(
|
23
|
-
expect(page).to have_selector(
|
22
|
+
expect(page).to have_selector(%(input#attachment_collection_name_en[value="#{translated(attachment_collection.name, locale: :en)}"]))
|
23
|
+
expect(page).to have_selector(%(input#attachment_collection_weight[value="#{attachment_collection.weight}"]))
|
24
|
+
expect(page).to have_selector(%(input#attachment_collection_description_en[value="#{translated(attachment_collection.description, locale: :en)}"]))
|
24
25
|
end
|
25
26
|
|
26
27
|
it "can add attachment collections to a process" do
|
@@ -30,17 +31,13 @@ shared_examples "manage attachment collections examples" do
|
|
30
31
|
fill_in_i18n(
|
31
32
|
:attachment_collection_name,
|
32
33
|
"#attachment_collection-name-tabs",
|
33
|
-
|
34
|
-
es: "Formularios de solicitud",
|
35
|
-
ca: "Formularis de sol·licitud"
|
34
|
+
**attributes[:name].except("machine_translations")
|
36
35
|
)
|
37
36
|
|
38
37
|
fill_in_i18n(
|
39
38
|
:attachment_collection_description,
|
40
39
|
"#attachment_collection-description-tabs",
|
41
|
-
|
42
|
-
es: "Contiene los formularios de solicitud",
|
43
|
-
ca: "Conté els formularis de sol·licitud"
|
40
|
+
**attributes[:description].except("machine_translations")
|
44
41
|
)
|
45
42
|
|
46
43
|
find("*[type=submit]").click
|
@@ -49,8 +46,11 @@ shared_examples "manage attachment collections examples" do
|
|
49
46
|
expect(page).to have_admin_callout("successfully")
|
50
47
|
|
51
48
|
within "#attachment_collections table" do
|
52
|
-
expect(page).to
|
49
|
+
expect(page).to have_content(translated(attributes[:name]))
|
53
50
|
end
|
51
|
+
|
52
|
+
visit decidim_admin.root_path
|
53
|
+
expect(page).to have_content("created the #{translated(attributes[:name])} attachment collection")
|
54
54
|
end
|
55
55
|
|
56
56
|
it "can update an attachment collection" do
|
@@ -64,9 +64,7 @@ shared_examples "manage attachment collections examples" do
|
|
64
64
|
fill_in_i18n(
|
65
65
|
:attachment_collection_name,
|
66
66
|
"#attachment_collection-name-tabs",
|
67
|
-
|
68
|
-
es: "Últimos formularios de solicitud",
|
69
|
-
ca: "Últims formularis de sol·licitud"
|
67
|
+
**attributes[:name].except("machine_translations")
|
70
68
|
)
|
71
69
|
|
72
70
|
find("*[type=submit]").click
|
@@ -75,8 +73,11 @@ shared_examples "manage attachment collections examples" do
|
|
75
73
|
expect(page).to have_admin_callout("successfully")
|
76
74
|
|
77
75
|
within "#attachment_collections table" do
|
78
|
-
expect(page).to
|
76
|
+
expect(page).to have_content(translated(attributes[:name]))
|
79
77
|
end
|
78
|
+
|
79
|
+
visit decidim_admin.root_path
|
80
|
+
expect(page).to have_content("updated the #{translated(attributes[:name])} attachment collection")
|
80
81
|
end
|
81
82
|
|
82
83
|
context "when deleting a attachment collection" do
|
@@ -22,9 +22,9 @@ shared_examples "manage attachments examples" do
|
|
22
22
|
click_link translated(attachment.title, locale: :en)
|
23
23
|
end
|
24
24
|
|
25
|
-
expect(page).to have_selector(
|
26
|
-
expect(page).to have_selector(
|
27
|
-
expect(page).to have_selector(
|
25
|
+
expect(page).to have_selector(%(input#attachment_title_en[value="#{translated(attachment.title, locale: :en)}"]))
|
26
|
+
expect(page).to have_selector(%(input#attachment_description_en[value="#{translated(attachment.description, locale: :en)}"]))
|
27
|
+
expect(page).to have_selector(%(input#attachment_weight[value="#{attachment.weight}"]))
|
28
28
|
expect(page).to have_select("attachment_attachment_collection_id", selected: translated(attachment_collection.name, locale: :en))
|
29
29
|
expect(page).to have_css("img[src~='#{attachment.url}']")
|
30
30
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
shared_examples "manage categories examples" do
|
4
|
+
let(:attributes) { attributes_for(:category) }
|
4
5
|
it "lists all the categories for the process" do
|
5
6
|
within "#categories table" do
|
6
7
|
expect(page).to have_content(translated(category.name, locale: :en))
|
@@ -12,7 +13,7 @@ shared_examples "manage categories examples" do
|
|
12
13
|
click_link translated(category.name, locale: :en)
|
13
14
|
end
|
14
15
|
|
15
|
-
expect(page).to have_selector(
|
16
|
+
expect(page).to have_selector(%(input#category_name_en[value="#{translated(category.name, locale: :en)}"]))
|
16
17
|
expect(page).to have_selector("input#category_weight[value='#{category.weight}']")
|
17
18
|
|
18
19
|
expect(page).to have_selector("select#category_parent_id")
|
@@ -25,9 +26,7 @@ shared_examples "manage categories examples" do
|
|
25
26
|
fill_in_i18n(
|
26
27
|
:category_name,
|
27
28
|
"#category-name-tabs",
|
28
|
-
|
29
|
-
es: "Mi categoría",
|
30
|
-
ca: "La meva categoria"
|
29
|
+
**attributes[:name].except("machine_translations")
|
31
30
|
)
|
32
31
|
|
33
32
|
find("*[type=submit]").click
|
@@ -36,8 +35,11 @@ shared_examples "manage categories examples" do
|
|
36
35
|
expect(page).to have_admin_callout("successfully")
|
37
36
|
|
38
37
|
within "#categories table" do
|
39
|
-
expect(page).to have_content(
|
38
|
+
expect(page).to have_content(translated(attributes[:name]))
|
40
39
|
end
|
40
|
+
|
41
|
+
visit decidim_admin.root_path
|
42
|
+
expect(page).to have_content("added the #{translated(attributes[:name])} category to the")
|
41
43
|
end
|
42
44
|
|
43
45
|
it "updates a category" do
|
@@ -51,9 +53,7 @@ shared_examples "manage categories examples" do
|
|
51
53
|
fill_in_i18n(
|
52
54
|
:category_name,
|
53
55
|
"#category-name-tabs",
|
54
|
-
|
55
|
-
es: "Mi nuevo nombre",
|
56
|
-
ca: "El meu nou nom"
|
56
|
+
**attributes[:name].except("machine_translations")
|
57
57
|
)
|
58
58
|
|
59
59
|
find("*[type=submit]").click
|
@@ -62,8 +62,11 @@ shared_examples "manage categories examples" do
|
|
62
62
|
expect(page).to have_admin_callout("successfully")
|
63
63
|
|
64
64
|
within "#categories table" do
|
65
|
-
expect(page).to have_content(
|
65
|
+
expect(page).to have_content(translated(attributes[:name]))
|
66
66
|
end
|
67
|
+
|
68
|
+
visit decidim_admin.root_path
|
69
|
+
expect(page).to have_content("updated the #{translated(attributes[:name])} category in the")
|
67
70
|
end
|
68
71
|
|
69
72
|
context "when deleting a category" do
|
@@ -77,15 +77,6 @@ shared_examples "manage moderations" do
|
|
77
77
|
expect(page).to have_admin_callout("Resource successfully unreported")
|
78
78
|
end
|
79
79
|
|
80
|
-
it "user can hide a resource" do
|
81
|
-
within "tr[data-id=\"#{moderation.id}\"]" do
|
82
|
-
click_link "Hide"
|
83
|
-
end
|
84
|
-
|
85
|
-
expect(page).to have_admin_callout("Resource successfully hidden")
|
86
|
-
expect(page).to have_no_content(moderation.reportable.reported_content_url)
|
87
|
-
end
|
88
|
-
|
89
80
|
it "user can sort by report count" do
|
90
81
|
moderations.each_with_index { |moderation, index| moderation.update(report_count: index + 1) }
|
91
82
|
moderations_ordered_by_report_count_asc = moderations.sort_by(&:report_count)
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
- Marc Riera Casals
|
9
9
|
- Oriol Gual Oliva
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: active_link_to
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.27.
|
35
|
+
version: 0.27.8
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.27.
|
42
|
+
version: 0.27.8
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: devise
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,28 +94,28 @@ dependencies:
|
|
94
94
|
requirements:
|
95
95
|
- - '='
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.27.
|
97
|
+
version: 0.27.8
|
98
98
|
type: :development
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - '='
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.27.
|
104
|
+
version: 0.27.8
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: decidim-participatory_processes
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - '='
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.27.
|
111
|
+
version: 0.27.8
|
112
112
|
type: :development
|
113
113
|
prerelease: false
|
114
114
|
version_requirements: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - '='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.27.
|
118
|
+
version: 0.27.8
|
119
119
|
description: Organization administration to manage a single organization.
|
120
120
|
email:
|
121
121
|
- josepjaume@gmail.com
|
@@ -327,7 +327,6 @@ files:
|
|
327
327
|
- app/jobs/decidim/admin/newsletter_delivery_job.rb
|
328
328
|
- app/jobs/decidim/admin/newsletter_job.rb
|
329
329
|
- app/jobs/decidim/admin/verify_user_group_from_csv_job.rb
|
330
|
-
- app/mailers/decidim/admin/application_mailer.rb
|
331
330
|
- app/models/decidim/admin/fake_newsletter.rb
|
332
331
|
- app/packs/entrypoints/decidim_admin.js
|
333
332
|
- app/packs/entrypoints/decidim_admin.scss
|
@@ -716,7 +715,7 @@ homepage: https://github.com/decidim/decidim
|
|
716
715
|
licenses:
|
717
716
|
- AGPL-3.0
|
718
717
|
metadata: {}
|
719
|
-
post_install_message:
|
718
|
+
post_install_message:
|
720
719
|
rdoc_options: []
|
721
720
|
require_paths:
|
722
721
|
- lib
|
@@ -731,8 +730,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
731
730
|
- !ruby/object:Gem::Version
|
732
731
|
version: '0'
|
733
732
|
requirements: []
|
734
|
-
rubygems_version: 3.
|
735
|
-
signing_key:
|
733
|
+
rubygems_version: 3.5.14
|
734
|
+
signing_key:
|
736
735
|
specification_version: 4
|
737
736
|
summary: Decidim organization administration
|
738
737
|
test_files: []
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Admin
|
5
|
-
# Custom application mailer, scoped to the admin mailer.
|
6
|
-
#
|
7
|
-
class ApplicationMailer < ActionMailer::Base
|
8
|
-
default from: Decidim.config.mailer_sender
|
9
|
-
layout "mailer"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|