decidim-templates 0.23.5 → 0.24.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 +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 +1 -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 +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/es.yml +1 -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 +1 -1
- data/config/locales/ro-RO.yml +1 -1
- data/config/locales/sv.yml +0 -1
- 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 +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d57faab60878f78ed3c7c63faa1ac919674bf920080249ebbfb323bfa6e57df5
|
4
|
+
data.tar.gz: 6a850da108de14c4ceaf2d280ba6f8f077d65b0a5390ed881914f88a68422eb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9da2902f2187a731c23d051b713b2a687baeab2c9d60e6d021c24094af625532e6dcd0cd7ae3784f964e683bcc4290e5d345c30741e51df5d7a141b01ff496b
|
7
|
+
data.tar.gz: a250304aac44fe007f3557e9a4693c8b40db4be110780cdd7f5119fcca47a7d9c5e5575eb88c3699a3745f0f6f284f5744e2a7e857ba7d1286a4af54b5963dfd
|
@@ -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
@@ -48,7 +48,7 @@ ca:
|
|
48
48
|
form:
|
49
49
|
save: Desar
|
50
50
|
template_title: Informació de la plantilla
|
51
|
-
title:
|
51
|
+
title: Plantilla del qüestionari %{questionnaire_for}
|
52
52
|
index:
|
53
53
|
confirm_delete: Segur que vols eliminar aquesta plantilla?
|
54
54
|
title: Plantilles de qüestionari
|
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
@@ -48,7 +48,7 @@ es-MX:
|
|
48
48
|
form:
|
49
49
|
save: Guardar
|
50
50
|
template_title: Información de la plantilla
|
51
|
-
title:
|
51
|
+
title: Plantilla de cuestionario %{questionnaire_for}
|
52
52
|
index:
|
53
53
|
confirm_delete: '¿Seguro que quieres eliminar esta plantilla?'
|
54
54
|
title: Plantillas de cuestionario
|
data/config/locales/es-PY.yml
CHANGED
@@ -48,7 +48,7 @@ es-PY:
|
|
48
48
|
form:
|
49
49
|
save: Guardar
|
50
50
|
template_title: Información de la plantilla
|
51
|
-
title:
|
51
|
+
title: Plantilla de cuestionario %{questionnaire_for}
|
52
52
|
index:
|
53
53
|
confirm_delete: '¿Seguro que quieres eliminar esta plantilla?'
|
54
54
|
title: Plantillas de cuestionario
|
data/config/locales/es.yml
CHANGED
@@ -48,7 +48,7 @@ es:
|
|
48
48
|
form:
|
49
49
|
save: Guardar
|
50
50
|
template_title: Información de la plantilla
|
51
|
-
title:
|
51
|
+
title: Plantilla de cuestionario %{questionnaire_for}
|
52
52
|
index:
|
53
53
|
confirm_delete: '¿Seguro que quieres eliminar esta plantilla?'
|
54
54
|
title: Plantillas de cuestionario
|
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
data/config/locales/ro-RO.yml
CHANGED
data/config/locales/sv.yml
CHANGED
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.2
|
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-05-07 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.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.
|
26
|
+
version: 0.24.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.
|
33
|
+
version: 0.24.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.
|
40
|
+
version: 0.24.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.
|
47
|
+
version: 0.24.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.
|
54
|
+
version: 0.24.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.
|
61
|
+
version: 0.24.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.
|
68
|
+
version: 0.24.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:
|
@@ -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
190
|
version: '0'
|
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
|