decidim-pages 0.26.2 → 0.26.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14d69f110932332108f677c1865e89e0828ff5457e937bbf67b5f7173e13de2c
4
- data.tar.gz: 4bae94036ec62b22c1c567b631992a85547eb94e4312c03517bbc86e78fbeed0
3
+ metadata.gz: d83da23518e74fdd44576700d16814165ec8995f6d3dd2ae3cbc1499b5b61db4
4
+ data.tar.gz: bcbdc8460ca9837b1c493e2e413ced0f32e152dded8e9077ef31ac6945442e33
5
5
  SHA512:
6
- metadata.gz: a702f00cbdb70ab0c65a511624516f5c43ec7fffdad28059486f0a9b047ca12b5403cfd81c13c9c2a6386932ca7c2525e1a6eb3cde1b3af4c316ca1b67a3a866
7
- data.tar.gz: 4529f02741de055c27d9818ce6b66f263e98c70f84f6bbbcfd3c92cc156d21e6351980c2095380b20a2b95febf15d4d6608692a7f81d5bd0f602a3ca3770b1c5
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
@@ -30,6 +30,6 @@ ca:
30
30
  success: Pàgina desada correctament.
31
31
  home:
32
32
  hero:
33
- participate_title: Participeu en els processos de la plataforma
33
+ participate_title: Participa en els processos de la plataforma
34
34
  sub_hero:
35
35
  register_title: Registra't per tenir un compte
@@ -29,5 +29,7 @@ de:
29
29
  invalid: Beim Speichern der Seite sind Fehler aufgetreten.
30
30
  success: Seite erfolgreich gespeichert
31
31
  home:
32
+ hero:
33
+ participate_title: Beteiligen Sie sich an den Prozessen auf dieser Plattform
32
34
  sub_hero:
33
35
  register_title: Registrieren
@@ -30,6 +30,6 @@ es-MX:
30
30
  success: Página guardada correctamente.
31
31
  home:
32
32
  hero:
33
- participate_title: Participar en los procesos de la plataforma
33
+ participate_title: Participa en los procesos de la plataforma
34
34
  sub_hero:
35
35
  register_title: Regístrate para tener una cuenta
@@ -30,6 +30,6 @@ es-PY:
30
30
  success: Página guardada correctamente.
31
31
  home:
32
32
  hero:
33
- participate_title: Participar en los procesos de la plataforma
33
+ participate_title: Participa en los procesos de la plataforma
34
34
  sub_hero:
35
35
  register_title: Regístrate para tener una cuenta
@@ -30,6 +30,6 @@ es:
30
30
  success: Página guardada correctamente.
31
31
  home:
32
32
  hero:
33
- participate_title: Participar en los procesos de la plataforma
33
+ participate_title: Participa en los procesos de la plataforma
34
34
  sub_hero:
35
35
  register_title: Regístrate para tener una cuenta
@@ -0,0 +1 @@
1
+ gn:
@@ -28,3 +28,8 @@ hu:
28
28
  update:
29
29
  invalid: Hiba történt az oldal mentése során.
30
30
  success: Oldal mentése sikeres.
31
+ home:
32
+ hero:
33
+ participate_title: Részvétel a platform folyamataiban
34
+ sub_hero:
35
+ register_title: A fiók létrehozásához iratkozz fel
@@ -0,0 +1 @@
1
+ lo:
@@ -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:
@@ -30,5 +30,7 @@ ro:
30
30
  invalid: A apărut o eroare la salvarea paginii.
31
31
  success: Pagina a fost salvată cu succes.
32
32
  home:
33
+ hero:
34
+ participate_title: Participă la procesele platformei
33
35
  sub_hero:
34
36
  register_title: Înregistrează-te pentru a crea un cont
@@ -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"
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-pages version.
5
5
  module Pages
6
6
  def self.version
7
- "0.26.2"
7
+ "0.26.4"
8
8
  end
9
9
  end
10
10
  end
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.2
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-06-14 00:00:00.000000000 Z
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.2
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.2
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.2
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.2
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.2
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.2
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