decidim-templates 0.23.0 → 0.23.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-templates might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15b5623bd6f2b9895948b9aaf4303141fd7b7ad1c744dc2b7a758e0df266d126
4
- data.tar.gz: 9ec3eeb85d017fda86de2cd78d8356a71c7024ab614ae4a51cdd79cc02c3a6c4
3
+ metadata.gz: cebdef77213ba4b649a3de95269d0013b0cfc1a77bea10b15512422f65ed82b0
4
+ data.tar.gz: 779288be80e20e780b9b781fe142eae06082311e8150c539a9d36ebdeab8b568
5
5
  SHA512:
6
- metadata.gz: 921b38f01434f1813dbf0d61861f9272780c63f694b839637c340c35547d15d66384d851776fea749a622b35e50fd721c3850dcbe68913c72a944f6ca59464a2
7
- data.tar.gz: a012a76536210867ce34f6154f11cea93390aece331d9949fc70227680664456f57c27d9a74ef846a64181b161cbcd0d9a37a375f3c3142e903606da0c788e83
6
+ metadata.gz: cc6d306bf6f0122408da9fa6a7f0511405e7ed129c25b49d8acb77b3e0d5d013461154f207fbb223648d5d7b943cab2cedbcf902f308c2b8517dd341997f0cd1
7
+ data.tar.gz: 1313174fbf75598b4b9cb8492e38ac764bf4a878fe9b71b1269660a31229eab1e52e7638a07cb869ca4da6df94900f432fd5c6a3b7407fc2533c2483dbba193f
@@ -52,3 +52,9 @@ de:
52
52
  index:
53
53
  confirm_delete: Möchten Sie diese Vorlage wirklich löschen?
54
54
  title: Fragebogenvorlagen
55
+ preview:
56
+ current_step: Schritt %{step}
57
+ of_total_steps: von %{total_steps}
58
+ tos_agreement: Mit der Teilnahme stimmen Sie den Nutzungsbedingungen zu
59
+ template_types:
60
+ questionnaires: Fragebögen
@@ -2,7 +2,7 @@ fr:
2
2
  decidim:
3
3
  admin:
4
4
  menu:
5
- templates: Modèles 
5
+ templates: Modèles de questionnaire
6
6
  templates:
7
7
  apply:
8
8
  error: Une erreur est survenue lors de l'application de ce modèle.
@@ -54,7 +54,7 @@ fr:
54
54
  title: Modèles de questionnaire
55
55
  preview:
56
56
  current_step: Étape %{step}
57
- of_total_steps: de %{total_steps}
58
- tos_agreement: En participant, vous acceptez ses conditions d'utilisation
57
+ of_total_steps: sur %{total_steps}
58
+ tos_agreement: En participant, vous acceptez ces conditions d'utilisation
59
59
  template_types:
60
60
  questionnaires: Questionnaires
@@ -1 +1,60 @@
1
1
  gl:
2
+ decidim:
3
+ admin:
4
+ menu:
5
+ templates: Padróns
6
+ templates:
7
+ apply:
8
+ error: Produciuse un problema ao aplicar o padrón.
9
+ success: Padrón aplicado con éxito
10
+ copy:
11
+ error: Produciuse un problema ao copiar o padrón.
12
+ success: Padrón copiado con éxito
13
+ create:
14
+ error: Produciuse un problema ao crear o padrón.
15
+ success: Padrón creado con éxito
16
+ destroy:
17
+ success: Padrón eliminado con éxito
18
+ empty: Aínda non hai padróns.
19
+ update:
20
+ error: Produciuse un problema ao actualizar o padrón.
21
+ success: Padrón actualizado con éxito
22
+ titles:
23
+ template_types:
24
+ questionnaires: Padrón para cuestionarios
25
+ templates: Padróns
26
+ models:
27
+ questionnaire_template:
28
+ fields:
29
+ questions: Número de preguntas
30
+ title: Título do cuestionario
31
+ template:
32
+ fields:
33
+ created_at: Creado o
34
+ name: Padrón
35
+ templates:
36
+ admin:
37
+ questionnaire_templates:
38
+ choose:
39
+ create_from_template: Crear a partir dun padrón
40
+ description: Estás a punto de crear un novo cuestonario. Podes escoller un padrón predefinido e modificalo despois.
41
+ label: Escoller padrón
42
+ placeholder: Escoller padrón
43
+ skip_template: Omitir
44
+ edit:
45
+ edit: Editar
46
+ empty: Aínda non hai preguntas
47
+ questionnaire: Cuestionario
48
+ form:
49
+ save: Gardar
50
+ template_title: Información do padrón
51
+ title: Cuestionario
52
+ index:
53
+ confirm_delete: Tes a certeza de querer eliminar este padrón?
54
+ title: Padróns de cuestionario
55
+ preview:
56
+ current_step: Paso %{step}
57
+ of_total_steps: de %{total_steps}
58
+ tos_agreement: Ao participar, aceptas os termos do servizo
59
+ template_types:
60
+ questionnaires: Cuestionarios
@@ -1 +1,60 @@
1
1
  pl:
2
+ decidim:
3
+ admin:
4
+ menu:
5
+ templates: Szablony
6
+ templates:
7
+ apply:
8
+ error: Wystąpił błąd z zastosowaniem tego szablonu.
9
+ success: Szablon został zastosowany
10
+ copy:
11
+ error: Wystąpił błąd podczas kopiowania tego szablonu.
12
+ success: Szablon został skopiowany
13
+ create:
14
+ error: Wystąpił błąd podczas tworzenia tego szablonu.
15
+ success: Szablon został utworzony
16
+ destroy:
17
+ success: Szablon został usunięty
18
+ empty: Brak szablonów.
19
+ update:
20
+ error: Wystąpił błąd podczas aktualizowania szablonu.
21
+ success: Szablon został zaktualizowany
22
+ titles:
23
+ template_types:
24
+ questionnaires: Szablony kwestionariusza
25
+ templates: Szablony
26
+ models:
27
+ questionnaire_template:
28
+ fields:
29
+ questions: Liczba pytań
30
+ title: Tytuł kwestionariusza
31
+ template:
32
+ fields:
33
+ created_at: Utworzono
34
+ name: Szablon
35
+ templates:
36
+ admin:
37
+ questionnaire_templates:
38
+ choose:
39
+ create_from_template: Utwórz z szablonu
40
+ description: Zamierzasz utworzyć nowy kwestionariusz. Możesz wybrać predefiniowany szablon i zmodyfikować go później.
41
+ label: Wybierz szablon
42
+ placeholder: Wybierz szablon
43
+ skip_template: Pomiń
44
+ edit:
45
+ edit: Edytuj
46
+ empty: Nie ma jeszcze żadnych pytań
47
+ questionnaire: Kwestionariusz
48
+ form:
49
+ save: Zapisz
50
+ template_title: Informacje o szablonie
51
+ title: Kwestionariusz
52
+ index:
53
+ confirm_delete: Czy na pewno chcesz usunąć ten szablon?
54
+ title: Szablony kwestionariusza
55
+ preview:
56
+ current_step: Krok %{step}
57
+ of_total_steps: z %{total_steps}
58
+ tos_agreement: Biorąc udział akceptujesz Regulamin korzystania z serwisu
59
+ template_types:
60
+ questionnaires: Kwestionariusze
@@ -0,0 +1 @@
1
+ si:
@@ -0,0 +1 @@
1
+ sw:
@@ -1 +1,60 @@
1
1
  tr:
2
+ decidim:
3
+ admin:
4
+ menu:
5
+ templates: Şablonlar
6
+ templates:
7
+ apply:
8
+ error: Bu şablonu uygularken bir sorun oluştu.
9
+ success: Şablon başarıyla uygulandı
10
+ copy:
11
+ error: Bu şablonu kopyalarken bir sorun oluştu.
12
+ success: Şablon başarıyla kopyalandı
13
+ create:
14
+ error: Bu şablonu oluştururken bir hata oluştu.
15
+ success: Şablon başarıyla oluşturuldu
16
+ destroy:
17
+ success: Şablon başarıyla silindi
18
+ empty: Burada henüz şablon yok.
19
+ update:
20
+ error: Bu şablonu güncellerken bir sorun oluştu.
21
+ success: Şablon başarıyla güncellendi
22
+ titles:
23
+ template_types:
24
+ questionnaires: Anket şablonları
25
+ templates: Şablonlar
26
+ models:
27
+ questionnaire_template:
28
+ fields:
29
+ questions: Soruların sayısı
30
+ title: Anket Başlığı
31
+ template:
32
+ fields:
33
+ created_at: Oluşturuldu
34
+ name: Şablon
35
+ templates:
36
+ admin:
37
+ questionnaire_templates:
38
+ choose:
39
+ create_from_template: Şablondan Oluştur
40
+ description: Yeni bir anket oluşturmak üzeresiniz. Önceden tanımlanmış bir şablon seçebilir ve daha sonra değiştirebilirsiniz.
41
+ label: Şablon seç
42
+ placeholder: Şablon seç
43
+ skip_template: Atla
44
+ edit:
45
+ edit: Düzenle
46
+ empty: Henüz bir soru yok
47
+ questionnaire: Anket
48
+ form:
49
+ save: Kaydet
50
+ template_title: Şablon Bilgisi
51
+ title: Anket
52
+ index:
53
+ confirm_delete: Bu şablonu silmek istediğinizden emin misiniz?
54
+ title: Anket şablonları
55
+ preview:
56
+ current_step: '%{step} adım'
57
+ of_total_steps: '%{total_steps}'
58
+ tos_agreement: Katılarak, Hizmet Şartları'nı kabul etmiş olursunuz
59
+ template_types:
60
+ questionnaires: Anketler
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateDecidimTemplates < ActiveRecord::Migration[5.2]
4
+ def change
5
+ create_table :decidim_templates_templates do |t|
6
+ t.integer :decidim_organization_id, null: false, index: { name: "index_decidim_templates_organization" }
7
+ t.references :templatable, polymorphic: true, index: { name: "index_decidim_templates_templatable" }
8
+ t.jsonb :name, null: false
9
+ t.jsonb :description
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
data/db/seeds.rb ADDED
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ if !Rails.env.production? || ENV["SEED"]
4
+ print "Creating seeds for decidim-templates...\n" unless Rails.env.test?
5
+
6
+ require "decidim/faker/localized"
7
+
8
+ # Since we usually migrate and seed in the same process, make sure
9
+ # that we don't have invalid or cached information after a migration.
10
+ decidim_tables = ActiveRecord::Base.connection.tables.select do |table|
11
+ table.starts_with?("decidim_")
12
+ end
13
+ decidim_tables.map do |table|
14
+ table.tr("_", "/").classify.safe_constantize
15
+ end.compact.each(&:reset_column_information)
16
+
17
+ organization = Decidim::Organization.first
18
+
19
+ questionnaire_template = Decidim::Templates::Template.create!(
20
+ organization: organization,
21
+ name: Decidim::Faker::Localized.sentence(2),
22
+ description: Decidim::Faker::Localized.paragraph
23
+ )
24
+
25
+ questionnaire = Decidim::Forms::Questionnaire.create!(
26
+ questionnaire_for: questionnaire_template,
27
+ title: Decidim::Faker::Localized.paragraph,
28
+ description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
29
+ Decidim::Faker::Localized.paragraph(3)
30
+ end,
31
+ tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
32
+ Decidim::Faker::Localized.paragraph(2)
33
+ end
34
+ )
35
+
36
+ %w(short_answer long_answer).each_with_index do |text_question_type, index|
37
+ Decidim::Forms::Question.create!(
38
+ questionnaire: questionnaire,
39
+ body: Decidim::Faker::Localized.paragraph,
40
+ question_type: text_question_type,
41
+ position: index
42
+ )
43
+ end
44
+
45
+ %w(single_option multiple_option).each_with_index do |multiple_choice_question_type, index|
46
+ question = Decidim::Forms::Question.create!(
47
+ questionnaire: questionnaire,
48
+ body: Decidim::Faker::Localized.paragraph,
49
+ question_type: multiple_choice_question_type,
50
+ position: index + 2
51
+ )
52
+
53
+ 3.times do
54
+ question.answer_options.create!(body: Decidim::Faker::Localized.sentence)
55
+ end
56
+
57
+ question.display_conditions.create!(
58
+ condition_question: questionnaire.questions.find_by(position: question.position - 2),
59
+ question: question,
60
+ condition_type: :answered,
61
+ mandatory: true
62
+ )
63
+ end
64
+
65
+ %w(matrix_single matrix_multiple).each do |matrix_question_type|
66
+ question = Decidim::Forms::Question.create!(
67
+ questionnaire: questionnaire,
68
+ body: Decidim::Faker::Localized.paragraph,
69
+ question_type: matrix_question_type
70
+ )
71
+
72
+ 3.times do
73
+ question.answer_options.create!(body: Decidim::Faker::Localized.sentence)
74
+ question.matrix_rows.create!(body: Decidim::Faker::Localized.sentence)
75
+ end
76
+ end
77
+
78
+ questionnaire_template.update!(templatable: questionnaire)
79
+ end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-templates version.
5
5
  module Templates
6
6
  def self.version
7
- "0.23.0"
7
+ "0.23.4"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.23.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vera Rojman
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-05 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.23.0
19
+ version: 0.23.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.23.0
26
+ version: 0.23.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-forms
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.23.0
33
+ version: 0.23.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.23.0
40
+ version: 0.23.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-admin
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.23.0
47
+ version: 0.23.4
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.23.0
54
+ version: 0.23.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-dev
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.23.0
61
+ version: 0.23.4
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.23.0
68
+ version: 0.23.4
69
69
  description: This module provides a solution to create templates for different Decidim
70
70
  models, such as Proposals and Questionnaires..
71
71
  email:
@@ -146,11 +146,13 @@ files:
146
146
  - config/locales/pt.yml
147
147
  - config/locales/ro-RO.yml
148
148
  - config/locales/ru.yml
149
+ - config/locales/si-LK.yml
149
150
  - config/locales/sk.yml
150
151
  - config/locales/sl.yml
151
152
  - config/locales/so-SO.yml
152
153
  - config/locales/sr-CS.yml
153
154
  - config/locales/sv.yml
155
+ - config/locales/sw-KE.yml
154
156
  - config/locales/ti-ER.yml
155
157
  - config/locales/tr-TR.yml
156
158
  - config/locales/uk.yml
@@ -158,6 +160,8 @@ files:
158
160
  - config/locales/vi.yml
159
161
  - config/locales/zh-CN.yml
160
162
  - config/locales/zh-TW.yml
163
+ - db/migrate/20200518093819_create_decidim_templates.rb
164
+ - db/seeds.rb
161
165
  - lib/decidim/templates.rb
162
166
  - lib/decidim/templates/admin.rb
163
167
  - lib/decidim/templates/admin_engine.rb
@@ -169,7 +173,7 @@ homepage: https://github.com/decidim/decidim-module-templates
169
173
  licenses:
170
174
  - AGPL-3.0
171
175
  metadata: {}
172
- post_install_message:
176
+ post_install_message:
173
177
  rdoc_options: []
174
178
  require_paths:
175
179
  - lib
@@ -185,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
189
  version: '0'
186
190
  requirements: []
187
191
  rubygems_version: 3.0.3
188
- signing_key:
192
+ signing_key:
189
193
  specification_version: 4
190
194
  summary: A decidim templates module
191
195
  test_files: []