decidim-pages 0.26.2 → 0.26.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/serializers/decidim/pages/data_importer.rb +27 -0
- data/app/serializers/decidim/pages/data_serializer.rb +22 -0
- data/config/locales/ca.yml +1 -1
- data/config/locales/de.yml +2 -0
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/es.yml +1 -1
- data/config/locales/gn-PY.yml +1 -0
- data/config/locales/hu.yml +5 -0
- data/config/locales/lo-LA.yml +1 -0
- data/config/locales/lt.yml +36 -0
- data/config/locales/oc-FR.yml +1 -0
- data/config/locales/ro-RO.yml +2 -0
- data/lib/decidim/pages/component.rb +3 -0
- data/lib/decidim/pages/version.rb +1 -1
- metadata +13 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d83da23518e74fdd44576700d16814165ec8995f6d3dd2ae3cbc1499b5b61db4
|
4
|
+
data.tar.gz: bcbdc8460ca9837b1c493e2e413ced0f32e152dded8e9077ef31ac6945442e33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 428e1edbfa865ebf9b8d5c5afe941d7d53955d5e991aadc2f8d62a825bf74291b7e7e94a61c37126c85c434b73479659f8d49663b30984130f8b650a2bdd30dd
|
7
|
+
data.tar.gz: 1adfaeb0145f5268f6202e99b4b874612ac79dd9e244ab83c3804a3b9d84e0fed770eff6821609f8a539e54d6e4b51397daacf3b4fbc554b449e8f38306cba21
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Pages
|
5
|
+
# Importer for Pages specific data (i.e. its page content).
|
6
|
+
class DataImporter < Decidim::Importers::Importer
|
7
|
+
def initialize(component)
|
8
|
+
@component = component
|
9
|
+
end
|
10
|
+
|
11
|
+
# Creates a new Decidim::Pages::Page associated to the given **component**
|
12
|
+
# for the serialized page object.
|
13
|
+
#
|
14
|
+
# @param serialized [Hash] The serialized data read from the import file.
|
15
|
+
# @param _user [Decidim::User] The user performing the import.
|
16
|
+
# @return [Decidim::Pages::Page] The imported page
|
17
|
+
def import(serialized, _user)
|
18
|
+
return unless serialized
|
19
|
+
|
20
|
+
Page.create!(
|
21
|
+
component: @component,
|
22
|
+
body: serialized["body"]
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Pages
|
5
|
+
# This class serializes the specific data in each Page. This is the page
|
6
|
+
# data outside of the component settings.
|
7
|
+
class DataSerializer < Decidim::Exporters::Serializer
|
8
|
+
include Decidim::TranslationsHelper
|
9
|
+
|
10
|
+
# Serializes the page data for this component.
|
11
|
+
#
|
12
|
+
# @return [Hash] The serialized data
|
13
|
+
def serialize
|
14
|
+
page = Page.find_by(component: resource)
|
15
|
+
|
16
|
+
{
|
17
|
+
body: page&.body || empty_translatable
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/config/locales/ca.yml
CHANGED
data/config/locales/de.yml
CHANGED
data/config/locales/es-MX.yml
CHANGED
@@ -30,6 +30,6 @@ es-MX:
|
|
30
30
|
success: Página guardada correctamente.
|
31
31
|
home:
|
32
32
|
hero:
|
33
|
-
participate_title:
|
33
|
+
participate_title: Participa en los procesos de la plataforma
|
34
34
|
sub_hero:
|
35
35
|
register_title: Regístrate para tener una cuenta
|
data/config/locales/es-PY.yml
CHANGED
@@ -30,6 +30,6 @@ es-PY:
|
|
30
30
|
success: Página guardada correctamente.
|
31
31
|
home:
|
32
32
|
hero:
|
33
|
-
participate_title:
|
33
|
+
participate_title: Participa en los procesos de la plataforma
|
34
34
|
sub_hero:
|
35
35
|
register_title: Regístrate para tener una cuenta
|
data/config/locales/es.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
gn:
|
data/config/locales/hu.yml
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
lo:
|
data/config/locales/lt.yml
CHANGED
@@ -1 +1,37 @@
|
|
1
1
|
lt:
|
2
|
+
activerecord:
|
3
|
+
models:
|
4
|
+
decidim/pages/page:
|
5
|
+
one: Puslapis
|
6
|
+
few: Puslapiai
|
7
|
+
many: Puslapiai
|
8
|
+
other: Puslapiai
|
9
|
+
decidim:
|
10
|
+
admin_log:
|
11
|
+
page:
|
12
|
+
update: "%{user_name} atnaujino %{resource_name} puslapį %{space_name}"
|
13
|
+
components:
|
14
|
+
pages:
|
15
|
+
name: Puslapis
|
16
|
+
settings:
|
17
|
+
global:
|
18
|
+
announcement: Pranešimas
|
19
|
+
step:
|
20
|
+
announcement: Pranešimas
|
21
|
+
pages:
|
22
|
+
admin:
|
23
|
+
models:
|
24
|
+
components:
|
25
|
+
body: Pagrindinė dalis
|
26
|
+
pages:
|
27
|
+
edit:
|
28
|
+
save: Atnaujinimas
|
29
|
+
title: Redaguoti puslapį
|
30
|
+
update:
|
31
|
+
invalid: Išsaugant šį puslapį iškilo problema.
|
32
|
+
success: Puslapis išsaugotas.
|
33
|
+
home:
|
34
|
+
hero:
|
35
|
+
participate_title: Dalyvauti platformos procesuose
|
36
|
+
sub_hero:
|
37
|
+
register_title: Užsiregistruokite norėdami susikurti paskyrą
|
@@ -0,0 +1 @@
|
|
1
|
+
oc:
|
data/config/locales/ro-RO.yml
CHANGED
@@ -6,6 +6,9 @@ Decidim.register_component(:pages) do |component|
|
|
6
6
|
component.engine = Decidim::Pages::Engine
|
7
7
|
component.admin_engine = Decidim::Pages::AdminEngine
|
8
8
|
component.icon = "media/images/decidim_pages.svg"
|
9
|
+
component.serializes_specific_data = true
|
10
|
+
component.specific_data_serializer_class_name = "Decidim::Pages::DataSerializer"
|
11
|
+
component.specific_data_importer_class_name = "Decidim::Pages::DataImporter"
|
9
12
|
component.permissions_class_name = "Decidim::Pages::Permissions"
|
10
13
|
|
11
14
|
component.query_type = "Decidim::Pages::PagesType"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.26.
|
4
|
+
version: 0.26.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-11-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,42 +18,42 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.26.
|
21
|
+
version: 0.26.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.26.
|
28
|
+
version: 0.26.4
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-dev
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.26.
|
35
|
+
version: 0.26.4
|
36
36
|
type: :development
|
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.26.
|
42
|
+
version: 0.26.4
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: decidim-participatory_processes
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.26.
|
49
|
+
version: 0.26.4
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.26.
|
56
|
+
version: 0.26.4
|
57
57
|
description: A pages component for decidim's participatory processes.
|
58
58
|
email:
|
59
59
|
- josepjaume@gmail.com
|
@@ -80,6 +80,8 @@ files:
|
|
80
80
|
- app/packs/images/decidim/pages/decidim_pages.svg
|
81
81
|
- app/permissions/decidim/pages/permissions.rb
|
82
82
|
- app/presenters/decidim/pages/admin_log/page_presenter.rb
|
83
|
+
- app/serializers/decidim/pages/data_importer.rb
|
84
|
+
- app/serializers/decidim/pages/data_serializer.rb
|
83
85
|
- app/views/decidim/pages/admin/pages/_form.html.erb
|
84
86
|
- app/views/decidim/pages/admin/pages/edit.html.erb
|
85
87
|
- app/views/decidim/pages/application/show.html.erb
|
@@ -114,6 +116,7 @@ files:
|
|
114
116
|
- config/locales/fr.yml
|
115
117
|
- config/locales/ga-IE.yml
|
116
118
|
- config/locales/gl.yml
|
119
|
+
- config/locales/gn-PY.yml
|
117
120
|
- config/locales/hr-HR.yml
|
118
121
|
- config/locales/hr.yml
|
119
122
|
- config/locales/hu.yml
|
@@ -126,6 +129,7 @@ files:
|
|
126
129
|
- config/locales/ko.yml
|
127
130
|
- config/locales/lb-LU.yml
|
128
131
|
- config/locales/lb.yml
|
132
|
+
- config/locales/lo-LA.yml
|
129
133
|
- config/locales/lt-LT.yml
|
130
134
|
- config/locales/lt.yml
|
131
135
|
- config/locales/lv.yml
|
@@ -133,6 +137,7 @@ files:
|
|
133
137
|
- config/locales/mt.yml
|
134
138
|
- config/locales/nl.yml
|
135
139
|
- config/locales/no.yml
|
140
|
+
- config/locales/oc-FR.yml
|
136
141
|
- config/locales/om-ET.yml
|
137
142
|
- config/locales/pl.yml
|
138
143
|
- config/locales/pt-BR.yml
|