decidim-templates 0.23.6 → 0.24.0.rc1
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 +4 -4
- data/app/controllers/decidim/templates/admin/questionnaire_templates/questionnaires_controller.rb +4 -0
- data/app/helpers/decidim/templates/admin/templates_menu_helper.rb +15 -0
- data/app/models/decidim/templates/template.rb +1 -1
- data/app/views/decidim/templates/admin/questionnaire_templates/index.html.erb +1 -1
- data/app/views/layouts/decidim/admin/templates.html.erb +2 -10
- data/config/locales/ca.yml +0 -1
- data/config/locales/cs.yml +1 -1
- data/config/locales/de.yml +1 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/es-MX.yml +0 -1
- data/config/locales/es-PY.yml +0 -1
- data/config/locales/es.yml +0 -1
- data/config/locales/fi-plain.yml +1 -1
- data/config/locales/fi.yml +1 -1
- data/config/locales/fr-CA.yml +1 -1
- data/config/locales/fr.yml +1 -1
- data/config/locales/gl.yml +1 -1
- data/config/locales/it.yml +0 -1
- data/config/locales/ja.yml +1 -1
- data/config/locales/nl.yml +0 -1
- data/config/locales/pl.yml +11 -11
- data/config/locales/ro-RO.yml +0 -59
- data/config/locales/sv.yml +0 -24
- data/config/locales/tr-TR.yml +1 -1
- data/config/locales/zh-CN.yml +0 -1
- data/db/seeds.rb +3 -3
- data/lib/decidim/templates/admin_engine.rb +16 -0
- data/lib/decidim/templates/version.rb +1 -1
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7f28a7e01fac13ab4feac71b22610e79753a1501ae7a2014839fe2d7aead3ff
|
4
|
+
data.tar.gz: d1eeaa1de5491987e7aa8521ea358c0da407e72e2c10a1acd5e20b44bb3cb4d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c0233906c397fa7c519be4a5c21a4382eab9f7b9a01eff515da84a62d6fc9a5da36ac5cea4d4c492f8d5532fb7e783bff23650d87a00cfb1feb09c9d43cf9e1
|
7
|
+
data.tar.gz: 44a73fbbde545623663f889df56e860f53f54390d720fc29b9a607a401c104101b465de7397f698d511bb5f8c0061df3f3db5892069da03f3e95ed8cee5669d4
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Templates
|
5
|
+
module Admin
|
6
|
+
module TemplatesMenuHelper
|
7
|
+
include Decidim::Admin::SidebarMenuHelper
|
8
|
+
|
9
|
+
def template_types_menu
|
10
|
+
@template_types_menu ||= sidebar_menu(:admin_template_types_menu)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -15,7 +15,7 @@ module Decidim
|
|
15
15
|
foreign_key: "decidim_organization_id",
|
16
16
|
class_name: "Decidim::Organization"
|
17
17
|
|
18
|
-
belongs_to :templatable,
|
18
|
+
belongs_to :templatable, foreign_type: "templatable_type", polymorphic: true, optional: true
|
19
19
|
|
20
20
|
before_destroy :destroy_templatable
|
21
21
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h2 class="card-title">
|
4
4
|
<%= t ".title" %>
|
5
5
|
<% if allowed_to?(:create, :template) %>
|
6
|
-
<%= link_to t("actions.new", scope: "decidim.admin", name: t("template.name", scope: "decidim.models").downcase), [
|
6
|
+
<%= link_to t("actions.new", scope: "decidim.admin", name: t("template.name", scope: "decidim.models").downcase), ["new", "questionnaire_template"], class: "button tiny button--title new" %>
|
7
7
|
<% end %>
|
8
8
|
</h2>
|
9
9
|
</div>
|
@@ -1,13 +1,5 @@
|
|
1
|
-
<% content_for :
|
2
|
-
|
3
|
-
<ul>
|
4
|
-
<% template_types.each_pair do |name, url| %>
|
5
|
-
<li <% if is_active_link?(url) %> class="is-active" <% end %>>
|
6
|
-
<%= aria_selected_link_to name, url %>
|
7
|
-
</li>
|
8
|
-
<% end %>
|
9
|
-
</ul>
|
10
|
-
</div>
|
1
|
+
<% content_for :sidebar_menu_nav do %>
|
2
|
+
<%= template_types_menu.render %>
|
11
3
|
<% end %>
|
12
4
|
|
13
5
|
<%= render "layouts/decidim/admin/application" do %>
|
data/config/locales/ca.yml
CHANGED
data/config/locales/cs.yml
CHANGED
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
data/config/locales/es-MX.yml
CHANGED
data/config/locales/es-PY.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/fi-plain.yml
CHANGED
data/config/locales/fi.yml
CHANGED
data/config/locales/fr-CA.yml
CHANGED
@@ -48,7 +48,7 @@ fr-CA:
|
|
48
48
|
form:
|
49
49
|
save: Sauvegarder
|
50
50
|
template_title: Informations sur le modèle
|
51
|
-
title:
|
51
|
+
title: Modèle de questionnaire %{questionnaire_for}
|
52
52
|
index:
|
53
53
|
confirm_delete: Êtes-vous sûr de vouloir supprimer ce modèle?
|
54
54
|
title: Modèles de questionnaire
|
data/config/locales/fr.yml
CHANGED
@@ -48,7 +48,7 @@ fr:
|
|
48
48
|
form:
|
49
49
|
save: Sauvegarder
|
50
50
|
template_title: Informations sur le modèle
|
51
|
-
title:
|
51
|
+
title: Modèle de questionnaire %{questionnaire_for}
|
52
52
|
index:
|
53
53
|
confirm_delete: Êtes-vous sûr de vouloir supprimer ce modèle?
|
54
54
|
title: Modèles de questionnaire
|
data/config/locales/gl.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/pl.yml
CHANGED
@@ -5,20 +5,20 @@ pl:
|
|
5
5
|
templates: Szablony
|
6
6
|
templates:
|
7
7
|
apply:
|
8
|
-
error: Wystąpił
|
9
|
-
success: Szablon
|
8
|
+
error: Wystąpił problem z zastosowaniem tego szablonu.
|
9
|
+
success: Szablon zastosowany pomyślnie
|
10
10
|
copy:
|
11
|
-
error: Wystąpił
|
12
|
-
success: Szablon został skopiowany
|
11
|
+
error: Wystąpił problem podczas kopiowania tego szablonu.
|
12
|
+
success: Szablon został skopiowany pomyślnie
|
13
13
|
create:
|
14
14
|
error: Wystąpił błąd podczas tworzenia tego szablonu.
|
15
|
-
success: Szablon
|
15
|
+
success: Szablon utworzony pomyślnie
|
16
16
|
destroy:
|
17
|
-
success: Szablon
|
17
|
+
success: Szablon usunięty pomyślnie
|
18
18
|
empty: Brak szablonów.
|
19
19
|
update:
|
20
|
-
error: Wystąpił
|
21
|
-
success: Szablon
|
20
|
+
error: Wystąpił problem podczas opuszczania tego szablonu.
|
21
|
+
success: Szablon zaktualizowany pomyślnie
|
22
22
|
titles:
|
23
23
|
template_types:
|
24
24
|
questionnaires: Szablony kwestionariusza
|
@@ -43,18 +43,18 @@ pl:
|
|
43
43
|
skip_template: Pomiń
|
44
44
|
edit:
|
45
45
|
edit: Edytuj
|
46
|
-
empty:
|
46
|
+
empty: Brak pytań
|
47
47
|
questionnaire: Kwestionariusz
|
48
48
|
form:
|
49
49
|
save: Zapisz
|
50
50
|
template_title: Informacje o szablonie
|
51
|
-
title:
|
51
|
+
title: Szablon kwestionariusza %{questionnaire_for}
|
52
52
|
index:
|
53
53
|
confirm_delete: Czy na pewno chcesz usunąć ten szablon?
|
54
54
|
title: Szablony kwestionariusza
|
55
55
|
preview:
|
56
56
|
current_step: Krok %{step}
|
57
57
|
of_total_steps: z %{total_steps}
|
58
|
-
tos_agreement: Biorąc udział akceptujesz
|
58
|
+
tos_agreement: Biorąc udział akceptujesz Warunki korzystania z serwisu
|
59
59
|
template_types:
|
60
60
|
questionnaires: Kwestionariusze
|
data/config/locales/ro-RO.yml
CHANGED
@@ -1,60 +1 @@
|
|
1
1
|
ro:
|
2
|
-
decidim:
|
3
|
-
admin:
|
4
|
-
menu:
|
5
|
-
templates: Șabloane
|
6
|
-
templates:
|
7
|
-
apply:
|
8
|
-
error: A apărut o eroare la aplicarea acestui șablon.
|
9
|
-
success: Șablonul aplicat cu succes
|
10
|
-
copy:
|
11
|
-
error: A apărut o eroare la copierea acestui șablon.
|
12
|
-
success: Șablon copiat cu succes
|
13
|
-
create:
|
14
|
-
error: A apărut o eroare la crearea acestui șablon.
|
15
|
-
success: Șablon creat cu succes
|
16
|
-
destroy:
|
17
|
-
success: Şablon şters cu succes
|
18
|
-
empty: Nu există încă nici un şabloan.
|
19
|
-
update:
|
20
|
-
error: A apărut o eroare la actualizarea acestui șablon.
|
21
|
-
success: Şablon actualizat cu succes
|
22
|
-
titles:
|
23
|
-
template_types:
|
24
|
-
questionnaires: Şabloane chestionar
|
25
|
-
templates: Şabloane
|
26
|
-
models:
|
27
|
-
questionnaire_template:
|
28
|
-
fields:
|
29
|
-
questions: Număr de întrebări
|
30
|
-
title: Nume chestionar
|
31
|
-
template:
|
32
|
-
fields:
|
33
|
-
created_at: Creat la
|
34
|
-
name: Șablon
|
35
|
-
templates:
|
36
|
-
admin:
|
37
|
-
questionnaire_templates:
|
38
|
-
choose:
|
39
|
-
create_from_template: Creați un șablon
|
40
|
-
description: Sunteți pe cale să creați un nou chestionar. Puteți alege un șablon predefinit și să-l modificați ulterior.
|
41
|
-
label: Alegeți un șablon
|
42
|
-
placeholder: Alegeți un șablon
|
43
|
-
skip_template: Treci peste
|
44
|
-
edit:
|
45
|
-
edit: Editează
|
46
|
-
empty: Încă nu există întrebări
|
47
|
-
questionnaire: Chestionar
|
48
|
-
form:
|
49
|
-
save: Salveaza
|
50
|
-
template_title: Informatii Sablon
|
51
|
-
title: Chestionar
|
52
|
-
index:
|
53
|
-
confirm_delete: Sunteți sigur că doriți să ștergeți acest șablon?
|
54
|
-
title: Şabloane chestionar
|
55
|
-
preview:
|
56
|
-
current_step: Pasul %{step}
|
57
|
-
of_total_steps: din %{total_steps}
|
58
|
-
tos_agreement: Prin participare acceptați termenii și condițiile sale de utilizare
|
59
|
-
template_types:
|
60
|
-
questionnaires: Chestionare
|
data/config/locales/sv.yml
CHANGED
@@ -1,25 +1 @@
|
|
1
1
|
sv:
|
2
|
-
decidim:
|
3
|
-
admin:
|
4
|
-
menu:
|
5
|
-
templates: Mallar
|
6
|
-
titles:
|
7
|
-
templates: Mallar
|
8
|
-
models:
|
9
|
-
template:
|
10
|
-
fields:
|
11
|
-
created_at: Skapad den
|
12
|
-
name: Mall
|
13
|
-
templates:
|
14
|
-
admin:
|
15
|
-
questionnaire_templates:
|
16
|
-
choose:
|
17
|
-
skip_template: Hoppa över
|
18
|
-
edit:
|
19
|
-
edit: Redigera
|
20
|
-
questionnaire: Enkät
|
21
|
-
form:
|
22
|
-
save: Spara
|
23
|
-
title: Enkät
|
24
|
-
preview:
|
25
|
-
current_step: Steg %{step} av
|
data/config/locales/tr-TR.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
data/db/seeds.rb
CHANGED
@@ -18,7 +18,7 @@ if !Rails.env.production? || ENV["SEED"]
|
|
18
18
|
|
19
19
|
questionnaire_template = Decidim::Templates::Template.create!(
|
20
20
|
organization: organization,
|
21
|
-
name: Decidim::Faker::Localized.sentence(2),
|
21
|
+
name: Decidim::Faker::Localized.sentence(word_count: 2),
|
22
22
|
description: Decidim::Faker::Localized.paragraph
|
23
23
|
)
|
24
24
|
|
@@ -26,10 +26,10 @@ if !Rails.env.production? || ENV["SEED"]
|
|
26
26
|
questionnaire_for: questionnaire_template,
|
27
27
|
title: Decidim::Faker::Localized.paragraph,
|
28
28
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
29
|
-
Decidim::Faker::Localized.paragraph(3)
|
29
|
+
Decidim::Faker::Localized.paragraph(sentence_count: 3)
|
30
30
|
end,
|
31
31
|
tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
32
|
-
Decidim::Faker::Localized.paragraph(2)
|
32
|
+
Decidim::Faker::Localized.paragraph(sentence_count: 2)
|
33
33
|
end
|
34
34
|
)
|
35
35
|
|
@@ -30,6 +30,22 @@ module Decidim
|
|
30
30
|
root to: "questionnaire_templates#index"
|
31
31
|
end
|
32
32
|
|
33
|
+
initializer "decidim_templates.action_controller" do |_app|
|
34
|
+
ActiveSupport.on_load :action_controller do
|
35
|
+
helper Decidim::Templates::Admin::TemplatesMenuHelper if respond_to?(:helper)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
initializer "decidim_participatory_processes.admin_participatory_processes_menu" do
|
40
|
+
Decidim.menu :admin_template_types_menu do |menu|
|
41
|
+
template_types.each_pair do |name, url|
|
42
|
+
menu.item name, url,
|
43
|
+
if: allowed_to?(:index, :templates),
|
44
|
+
active: is_active_link?(url)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
33
49
|
initializer "decidim_templates.admin_mount_routes" do
|
34
50
|
Decidim::Core::Engine.routes do
|
35
51
|
mount Decidim::Templates::AdminEngine, at: "/admin/templates", as: "decidim_admin_templates"
|
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.
|
4
|
+
version: 0.24.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vera Rojman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-01 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.
|
19
|
+
version: 0.24.0.rc1
|
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.
|
26
|
+
version: 0.24.0.rc1
|
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.
|
33
|
+
version: 0.24.0.rc1
|
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.
|
40
|
+
version: 0.24.0.rc1
|
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.
|
47
|
+
version: 0.24.0.rc1
|
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.
|
54
|
+
version: 0.24.0.rc1
|
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.
|
61
|
+
version: 0.24.0.rc1
|
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.
|
68
|
+
version: 0.24.0.rc1
|
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:
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- app/controllers/decidim/templates/application_controller.rb
|
94
94
|
- app/forms/decidim/templates/admin/template_form.rb
|
95
95
|
- app/helpers/decidim/templates/admin/templates_helper.rb
|
96
|
+
- app/helpers/decidim/templates/admin/templates_menu_helper.rb
|
96
97
|
- app/helpers/decidim/templates/application_helper.rb
|
97
98
|
- app/models/concerns/decidim/templates/templatable.rb
|
98
99
|
- app/models/decidim/templates/application_record.rb
|
@@ -181,14 +182,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
182
|
requirements:
|
182
183
|
- - ">="
|
183
184
|
- !ruby/object:Gem::Version
|
184
|
-
version: '2.
|
185
|
+
version: '2.7'
|
185
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
187
|
requirements:
|
187
|
-
- - "
|
188
|
+
- - ">"
|
188
189
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
190
|
+
version: 1.3.1
|
190
191
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
192
|
+
rubygems_version: 3.1.2
|
192
193
|
signing_key:
|
193
194
|
specification_version: 4
|
194
195
|
summary: A decidim templates module
|