decidim-templates 0.23.1 → 0.23.2

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: 2661ad0dc28fb43c505e7dfed73d0f342a08343e271e7621ef5d210c4374cbf6
4
- data.tar.gz: fc2f89fd052179bb886970031000ae4bdc5e2a5cd2c2c9b50d09771f5733a62c
3
+ metadata.gz: 7a0ccc6e2f4a27e7e8e3996a8018b160aeff91a0c1d355f26ed1dd62be918674
4
+ data.tar.gz: ef8089ba4d456229fb6885dc2a150a29ec2def8ae1bd9b4f89c027d76678180a
5
5
  SHA512:
6
- metadata.gz: a6acd8788cf6ac64f3ed03b1b4dda62bb9bbac407cd225d851a8b28b431731331f1753ccbe0f3188afbc9584888e71cac0d5273748ada8dcaad84d0cb6bb6ea1
7
- data.tar.gz: 43cfb4456653bd10f9bd47f3f39853dde75513c2618787717ff5e8c472dcb942e213fed611cc26741ccdedc9bcb95879a2e1f1137c96fe148462da6aefa2b686
6
+ metadata.gz: f062aff6f714fbb92f41751a9bafe9bcaed593c8156783ca29b60a00b3cf1b8576a37fdf4b2f7b4a5b56bd30d0eb3be102a703ccd533dd787a06b581d83b402a
7
+ data.tar.gz: cffa0a5fc27ebe2a8f6738e07e2ebf91f12a6ca3a983384eddf77ee6d9f8b1aae7afe8f666b15c3f4d0f5c80ac7865d00b34b87c3bd49e9d0d3d47366739eacc
@@ -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}
57
+ of_total_steps: sur %{total_steps}
58
58
  tos_agreement: En participant, vous acceptez les 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ł problem z zastosowaniem tego szablonu.
9
+ success: Szablon zastosowany pomyślnie
10
+ copy:
11
+ error: Wystąpił problem podczas kopiowania tego szablonu.
12
+ success: Szablon został skopiowany pomyślnie
13
+ create:
14
+ error: Wystąpił błąd podczas tworzenia tego szablonu.
15
+ success: Szablon utworzony pomyślnie
16
+ destroy:
17
+ success: Szablon usunięty pomyślnie
18
+ empty: Brak szablonów.
19
+ update:
20
+ error: Wystąpił problem podczas opuszczania tego szablonu.
21
+ success: Szablon zaktualizowany pomyślnie
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: Brak 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 Warunki 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.1"
7
+ "0.23.2"
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.1
4
+ version: 0.23.2
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-12 00:00:00.000000000 Z
11
+ date: 2021-02-09 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.1
19
+ version: 0.23.2
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.1
26
+ version: 0.23.2
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.1
33
+ version: 0.23.2
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.1
40
+ version: 0.23.2
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.1
47
+ version: 0.23.2
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.1
54
+ version: 0.23.2
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.1
61
+ version: 0.23.2
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.1
68
+ version: 0.23.2
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: []