decidim-initiatives 0.26.0 → 0.26.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/initiatives/initiative_m/footer.erb +1 -1
- data/app/cells/decidim/initiatives/initiative_m/tags.erb +1 -1
- data/app/cells/decidim/initiatives/initiative_m_cell.rb +1 -0
- data/app/controllers/concerns/decidim/initiatives/needs_initiative_type.rb +30 -0
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +22 -22
- data/app/models/decidim/initiative.rb +4 -6
- data/app/views/decidim/initiatives/initiatives/_progress_bar.html.erb +2 -2
- data/app/views/decidim/initiatives/initiatives/show.html.erb +1 -1
- data/app/views/layouts/decidim/_initiative_header.html.erb +3 -3
- data/config/locales/ar.yml +2 -0
- data/config/locales/ca.yml +0 -2
- data/config/locales/cs.yml +2 -2
- data/config/locales/en.yml +2 -2
- data/config/locales/es-MX.yml +0 -2
- data/config/locales/es-PY.yml +0 -2
- data/config/locales/es.yml +0 -2
- data/config/locales/fi-plain.yml +2 -2
- data/config/locales/fi.yml +2 -2
- data/config/locales/fr-CA.yml +2 -2
- data/config/locales/fr.yml +2 -2
- data/config/locales/it.yml +0 -2
- data/config/locales/ja.yml +2 -2
- data/config/locales/lb.yml +0 -2
- data/config/locales/nl.yml +0 -1
- data/config/locales/pl.yml +0 -2
- data/config/locales/pt-BR.yml +0 -2
- data/config/locales/pt.yml +0 -2
- data/config/locales/ro-RO.yml +0 -2
- data/config/locales/tr-TR.yml +0 -2
- data/config/locales/zh-CN.yml +0 -1
- data/lib/decidim/initiatives/engine.rb +14 -0
- data/lib/decidim/initiatives/version.rb +1 -1
- metadata +13 -13
- data/config/initializers/mail_previews.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45db111dad7787dadef54db425611ded206cbac77ee988fada8d30f5b86f49c7
|
4
|
+
data.tar.gz: 5ddbac2b4adcca5285312a8bb7faae5b9c41c29750c923e789955cffcf833841
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67a11771a5df12bd1c77969776c5748b0c66aeb5babd1413a163b4ef10add6ac020ec85097d18509e1971284613c9aac1f9d4292ddaa208628e5ead71ac2ab35
|
7
|
+
data.tar.gz: dbaf1c3b5a998d999ff208c259c078ba099854ffcb545a82a4c582c6d65afaf629911efb461c74433b3c6e249155b17d54181c4958d908f508741c23ebd642f2
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_support/concern"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
module Initiatives
|
7
|
+
# Common methods for elements that need specific behaviour when there is only one initiative type.
|
8
|
+
module NeedsInitiativeType
|
9
|
+
extend ActiveSupport::Concern
|
10
|
+
|
11
|
+
included do
|
12
|
+
before_action :verify_initiative_type
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def any_initiative_type?
|
17
|
+
Decidim::InitiativesType.where(organization: current_organization).any?
|
18
|
+
end
|
19
|
+
|
20
|
+
def verify_initiative_type
|
21
|
+
unless any_initiative_type?
|
22
|
+
flash[:error] = "There needs to be an initiative type created by an administrator for initiatives to work"
|
23
|
+
redirect_to decidim.root_path
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
@@ -19,7 +19,7 @@ module Decidim
|
|
19
19
|
attribute :signature_start_date, Decidim::Attributes::LocalizedDate
|
20
20
|
attribute :signature_end_date, Decidim::Attributes::LocalizedDate
|
21
21
|
attribute :hashtag, String
|
22
|
-
attribute :offline_votes, Hash[
|
22
|
+
attribute :offline_votes, Hash[Symbol => Integer]
|
23
23
|
attribute :state, String
|
24
24
|
attribute :attachment, AttachmentForm
|
25
25
|
|
@@ -38,31 +38,11 @@ module Decidim
|
|
38
38
|
validate :notify_missing_attachment_if_errored
|
39
39
|
validate :area_is_not_removed
|
40
40
|
|
41
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
42
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
43
41
|
def map_model(model)
|
44
42
|
self.type_id = model.type.id
|
45
43
|
self.decidim_scope_id = model.scope&.id
|
46
|
-
self.offline_votes = model
|
47
|
-
|
48
|
-
if offline_votes.empty?
|
49
|
-
self.offline_votes = model.votable_initiative_type_scopes.each_with_object({}) do |initiative_scope_type, all_votes|
|
50
|
-
all_votes[initiative_scope_type.decidim_scopes_id || "global"] = [0, initiative_scope_type.scope_name]
|
51
|
-
end
|
52
|
-
else
|
53
|
-
offline_votes.delete("total")
|
54
|
-
self.offline_votes = offline_votes.each_with_object({}) do |(decidim_scope_id, votes), all_votes|
|
55
|
-
scope_name = model.votable_initiative_type_scopes.find do |initiative_scope_type|
|
56
|
-
initiative_scope_type.global_scope? && decidim_scope_id == "global" ||
|
57
|
-
initiative_scope_type.decidim_scopes_id == decidim_scope_id.to_i
|
58
|
-
end.scope_name
|
59
|
-
|
60
|
-
all_votes[decidim_scope_id || "global"] = [votes, scope_name]
|
61
|
-
end
|
62
|
-
end
|
44
|
+
self.offline_votes = offline_votes.empty? ? zero_offine_votes_with_scopes_names(model) : offline_votes_with_scopes_names(model)
|
63
45
|
end
|
64
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
65
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
66
46
|
|
67
47
|
def signature_type_updatable?
|
68
48
|
@signature_type_updatable ||= begin
|
@@ -91,6 +71,26 @@ module Decidim
|
|
91
71
|
|
92
72
|
private
|
93
73
|
|
74
|
+
# Private: set the in-person signatures to zero for every scope
|
75
|
+
def zero_offine_votes_with_scopes_names(model)
|
76
|
+
model.votable_initiative_type_scopes.each_with_object({}) do |initiative_scope_type, all_votes|
|
77
|
+
all_votes[initiative_scope_type.decidim_scopes_id&.to_s&.to_sym || "global"] = [0, initiative_scope_type.scope_name]
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Private: set the in-person signatures for every scope
|
82
|
+
def offline_votes_with_scopes_names(model)
|
83
|
+
model.offline_votes.delete("total")
|
84
|
+
model.offline_votes.each_with_object({}) do |(decidim_scope_id, votes), all_votes|
|
85
|
+
scope_name = model.votable_initiative_type_scopes.find do |initiative_scope_type|
|
86
|
+
initiative_scope_type.global_scope? && decidim_scope_id == "global" ||
|
87
|
+
initiative_scope_type.decidim_scopes_id == decidim_scope_id.to_i
|
88
|
+
end.scope_name
|
89
|
+
|
90
|
+
all_votes[decidim_scope_id || "global"] = [votes, scope_name]
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
94
|
def type
|
95
95
|
@type ||= type_id ? Decidim::InitiativesType.find(type_id) : context.initiative.type
|
96
96
|
end
|
@@ -261,14 +261,12 @@ module Decidim
|
|
261
261
|
|
262
262
|
# Public: Returns the percentage of required supports reached
|
263
263
|
def percentage
|
264
|
-
|
265
|
-
|
266
|
-
supports_count * 100 / supports_required
|
264
|
+
[supports_count * 100 / supports_required, 100].min
|
267
265
|
end
|
268
266
|
|
269
267
|
# Public: Whether the supports required objective has been reached
|
270
268
|
def supports_goal_reached?
|
271
|
-
|
269
|
+
votable_initiative_type_scopes.map(&:scope).all? { |scope| supports_goal_reached_for?(scope) }
|
272
270
|
end
|
273
271
|
|
274
272
|
# Public: Whether the supports required objective has been reached for a scope
|
@@ -320,9 +318,9 @@ module Decidim
|
|
320
318
|
end
|
321
319
|
|
322
320
|
def set_offline_votes_total
|
323
|
-
return if offline_votes.blank?
|
321
|
+
return if offline_votes.blank?
|
324
322
|
|
325
|
-
offline_votes["total"] = offline_votes[scope
|
323
|
+
offline_votes["total"] = offline_votes[scope&.id.to_s] || offline_votes["global"]
|
326
324
|
end
|
327
325
|
|
328
326
|
# Public: Finds all the InitiativeTypeScopes that are eligible to be voted by a user.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% if index == 0 %>
|
4
4
|
<%= cell(
|
5
5
|
"decidim/progress_bar",
|
6
|
-
current_initiative.
|
6
|
+
current_initiative.supports_count_for(type_scope.scope),
|
7
7
|
total: type_scope.supports_required,
|
8
8
|
units_name: "decidim.initiatives.initiatives.votes_count.count",
|
9
9
|
element_id: "initiative-#{current_initiative.id}-votes-count",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<% else %>
|
14
14
|
<%= cell(
|
15
15
|
"decidim/progress_bar",
|
16
|
-
current_initiative.
|
16
|
+
current_initiative.supports_count_for(type_scope.scope),
|
17
17
|
total: type_scope.supports_required,
|
18
18
|
subtitle_text: translated_attribute(type_scope.scope_name),
|
19
19
|
element_id: "initiative-scope-#{type_scope.id}-#{current_initiative.id}-votes-count",
|
@@ -34,7 +34,7 @@ edit_link(
|
|
34
34
|
<div class="columns section view-side mediumlarge-4 mediumlarge-push-8 large-3 large-push-9">
|
35
35
|
<div class="card text-center">
|
36
36
|
<div class="card__content">
|
37
|
-
<% if current_initiative.published? %>
|
37
|
+
<% if current_initiative.published? || current_initiative.rejected? || current_initiative.accepted? %>
|
38
38
|
<%= render partial: "progress_bar" %>
|
39
39
|
<% if current_initiative.votes_enabled? %>
|
40
40
|
<div id="initiative-<%= current_initiative.id %>-vote-cabin">
|
@@ -11,14 +11,14 @@
|
|
11
11
|
</h1>
|
12
12
|
</div>
|
13
13
|
<div>
|
14
|
-
<
|
14
|
+
<p class="text-highlight heading-small">
|
15
15
|
<% if current_participatory_space.hashtag.present? %>
|
16
16
|
<span class="process-header__hashtag">
|
17
|
-
<%= link_to "##{current_participatory_space.hashtag}",
|
17
|
+
<%= link_to "##{current_participatory_space.hashtag}", twitter_hashtag_url(current_participatory_space.hashtag), target: "_blank" %>
|
18
18
|
</span>
|
19
19
|
<% end %>
|
20
20
|
<%= strip_tags participatory_space_helpers.translated_attribute(current_participatory_space.type.title) %>
|
21
|
-
</
|
21
|
+
</p>
|
22
22
|
</div>
|
23
23
|
</div>
|
24
24
|
<%= render partial: "layouts/decidim/initiative_header_steps", locals: { initiative: current_participatory_space } %>
|
data/config/locales/ar.yml
CHANGED
data/config/locales/ca.yml
CHANGED
@@ -274,8 +274,6 @@ ca:
|
|
274
274
|
update: Actualitza
|
275
275
|
form:
|
276
276
|
authorizations: Configuració de l'autorització
|
277
|
-
child_scope_threshold_enabled_help: 'Aquest ajust de configuració no suporta recollida de signatures presencials. Habilita indicadors de signatures per subàmbits i funciona amb un controlador d''autoritzacions que associa un àmbit a l''usuari. Assegura''t de seleccionar aquesta autorització més a baix, en la configuració d''autorització. Perquè funcioni ha de configurar-se de manera jeràrquica : 1 àmbit - N subàmbits. Per a més informació sobre com funciona aquesta configuració, consulta aquest <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enllaç</a>.'
|
278
|
-
only_global_scope_enabled_help: Marca aquesta casella si has habilitat "Activar signatures per subàmbit" i vas configurar l'àmbit global com l'àmbit principal. En habilitar aquesta casella, la selecció del tipus d'iniciativa s'ometrà en l'assistent de creació d'iniciatives. Per a més informació sobre com funciona aquesta configuració, consulta aquest <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enllaç</a>.
|
279
277
|
options: Opcions
|
280
278
|
title: Informació general
|
281
279
|
initiative_type_scopes:
|
data/config/locales/cs.yml
CHANGED
@@ -280,8 +280,8 @@ cs:
|
|
280
280
|
update: Aktualizovat
|
281
281
|
form:
|
282
282
|
authorizations: Nastavení autorizace
|
283
|
-
child_scope_threshold_enabled_help: 'Tento příznak konfigurace nepodporuje offline hlasování,
|
284
|
-
only_global_scope_enabled_help: Zaškrtněte tuto poznámku, pokud jste povolili "Podřazená oblast působnosti" a nakonfigurovali globální rozsah jako vaši nadřazenou oblast působnosti. Povolením této možnosti bude výběr typu iniciativy přeskočeno v průvodci vytvořením iniciativy. Více informací o tom, jak tato konfigurace funguje, naleznete na tomto <a href="https://docs.decidim.org/admin
|
283
|
+
child_scope_threshold_enabled_help: 'Tento příznak konfigurace nepodporuje offline hlasování, umožňuje podřízené oblasti působnosti a pracuje s obslužnou rutinou autorizace, která uživateli přiřazuje rozsah, Ujistěte se, že jste vybrali tuto autorizaci, níže v nastavení autorizace. Aby fungovala obblast působnosti, musí být nastavena hierarchickým způsobem: 1 nadřazený - N podřazených. Více informací o tom, jak tato konfigurace funguje, naleznete na tomto <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">odkazu</a>.'
|
284
|
+
only_global_scope_enabled_help: Zaškrtněte tuto poznámku, pokud jste povolili "Podřazená oblast působnosti" a nakonfigurovali globální rozsah jako vaši nadřazenou oblast působnosti. Povolením této možnosti bude výběr typu iniciativy přeskočeno v průvodci vytvořením iniciativy. Více informací o tom, jak tato konfigurace funguje, naleznete na tomto <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">odkazu</a>.
|
285
285
|
options: Možnosti
|
286
286
|
title: Obecná informace
|
287
287
|
initiative_type_scopes:
|
data/config/locales/en.yml
CHANGED
@@ -275,8 +275,8 @@ en:
|
|
275
275
|
update: Update
|
276
276
|
form:
|
277
277
|
authorizations: Authorization settings
|
278
|
-
child_scope_threshold_enabled_help: 'This config flag doesn''t support offline votes, it enables sub-scopes and works with an authorization handler that associates a scope to the user, make sure you select that authorization, bellow in authorization settings. For it to work scopes need to be configured in hierarchical way : 1 Parent - N Child. For more info on how this configuration works, see this <a href="https://docs.decidim.org/admin
|
279
|
-
only_global_scope_enabled_help: Tick this flag if you enabled "Child scope signature" and configured the global scope as your parent scope. By enabling this, initiative type selection will be skipped in the initiative creation wizard. For more info on how this configuration works, see this <a href="https://docs.decidim.org/admin
|
278
|
+
child_scope_threshold_enabled_help: 'This config flag doesn''t support offline votes, it enables sub-scopes and works with an authorization handler that associates a scope to the user, make sure you select that authorization, bellow in authorization settings. For it to work scopes need to be configured in hierarchical way : 1 Parent - N Child. For more info on how this configuration works, see this <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">link</a>.'
|
279
|
+
only_global_scope_enabled_help: Tick this flag if you enabled "Child scope signature" and configured the global scope as your parent scope. By enabling this, initiative type selection will be skipped in the initiative creation wizard. For more info on how this configuration works, see this <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">link</a>.
|
280
280
|
options: Options
|
281
281
|
title: General information
|
282
282
|
initiative_type_scopes:
|
data/config/locales/es-MX.yml
CHANGED
@@ -274,8 +274,6 @@ es-MX:
|
|
274
274
|
update: Actualizar
|
275
275
|
form:
|
276
276
|
authorizations: Ajustes de autorización
|
277
|
-
child_scope_threshold_enabled_help: 'Este ajuste de configuración no soporta recogida de firmas en persona, habilita indicadores de firmas por subámbitos y funciona con un controlador de autorizaciones que asocia un ámbito al usuario. Asegúrate de seleccionar esa autorización más abajo, en la configuración de autorización. Para que funcione debe configurarse de manera jerárquica : 1 ámbito - N subámbitos. Para más información sobre cómo funciona esta configuración, consulta este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enlace</a>.'
|
278
|
-
only_global_scope_enabled_help: Marca esta casilla si habilitaste "Activar firmas por subámbito" y configuraste el ámbito global como el ámbito principal. Al habilitar esta casilla, la selección del tipo de iniciativa se omitirá en el asistente de creación de iniciativas. Para más información sobre cómo funciona esta configuración, consulta este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enlace</a>.
|
279
277
|
options: Opciones
|
280
278
|
title: Información general
|
281
279
|
initiative_type_scopes:
|
data/config/locales/es-PY.yml
CHANGED
@@ -274,8 +274,6 @@ es-PY:
|
|
274
274
|
update: Actualizar
|
275
275
|
form:
|
276
276
|
authorizations: Ajustes de autorización
|
277
|
-
child_scope_threshold_enabled_help: 'Este ajuste de configuración no soporta recogida de firmas en persona, habilita indicadores de firmas por subámbitos y funciona con un controlador de autorizaciones que asocia un ámbito al usuario. Asegúrate de seleccionar esa autorización más abajo, en la configuración de autorización. Para que funcione debe configurarse de manera jerárquica : 1 ámbito - N subámbitos. Para más información sobre cómo funciona esta configuración, consulta este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enlace</a>.'
|
278
|
-
only_global_scope_enabled_help: Marca esta casilla si habilitaste "Activar firmas por subámbito" y configuraste el ámbito global como el ámbito principal. Al habilitar esta casilla, la selección del tipo de iniciativa se omitirá en el asistente de creación de iniciativas. Para más información sobre cómo funciona esta configuración, consulta este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enlace</a>.
|
279
277
|
options: Opciones
|
280
278
|
title: Información general
|
281
279
|
initiative_type_scopes:
|
data/config/locales/es.yml
CHANGED
@@ -274,8 +274,6 @@ es:
|
|
274
274
|
update: Actualizar
|
275
275
|
form:
|
276
276
|
authorizations: Ajustes de autorización
|
277
|
-
child_scope_threshold_enabled_help: 'Este ajuste de configuración no soporta recogida de firmas en persona, habilita indicadores de firmas por subámbitos y funciona con un controlador de autorizaciones que asocia un ámbito al usuario. Asegúrate de seleccionar esa autorización más abajo, en la configuración de autorización. Para que funcione debe configurarse de manera jerárquica : 1 ámbito - N subámbitos. Para más información sobre cómo funciona esta configuración, consulta este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enlace</a>.'
|
278
|
-
only_global_scope_enabled_help: Marca esta casilla si habilitaste "Activar firmas por subámbito" y configuraste el ámbito global como el ámbito principal. Al habilitar esta casilla, la selección del tipo de iniciativa se omitirá en el asistente de creación de iniciativas. Para más información sobre cómo funciona esta configuración, consulta este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">enlace</a>.
|
279
277
|
options: Opciones
|
280
278
|
title: Información general
|
281
279
|
initiative_type_scopes:
|
data/config/locales/fi-plain.yml
CHANGED
@@ -274,8 +274,8 @@ fi-pl:
|
|
274
274
|
update: Päivitä
|
275
275
|
form:
|
276
276
|
authorizations: Varmennuksen asetukset
|
277
|
-
child_scope_threshold_enabled_help: 'Tämä asetus ei tue fyysisiä äänestyksiä, se ottaa käyttöön alateemat ja toimii sellaisten tunnistautumistapojen kanssa, jotka yhdistävät käyttäjän tiettyyn teemaan. Varmista, että valitset tällaisen tunnistautumistavan alla olevista asetuksista.
|
278
|
-
only_global_scope_enabled_help: Ota tämä asetus käyttöön, jos otit
|
277
|
+
child_scope_threshold_enabled_help: 'Tämä asetus ei tue fyysisiä äänestyksiä, se ottaa käyttöön alateemat ja toimii sellaisten tunnistautumistapojen kanssa, jotka yhdistävät käyttäjän tiettyyn teemaan. Varmista, että valitset tällaisen tunnistautumistavan alla olevista asetuksista. Tämän asetuksen toiminta vaatii teemojen määrityksen hierarkisesti: 1 isäntä - N lasta. Jos tarvitset lisätietoja kuinka tämä asetus toimii, tutustu <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">asetuksen dokumentaatioon täältä</a>.'
|
278
|
+
only_global_scope_enabled_help: Ota tämä asetus käyttöön, jos otit käyttöön "alateemojen allekirjoitukset" ja asetit yleisen yläteeman. Ottamalla tämän asetuksen käyttöön, aloitteen tyypin valinta sivuutetaan aloitteiden luontinäkymässä. Saat <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">lisätietoja tästä ominaisuudesta täältä</a>.
|
279
279
|
options: Valinnat
|
280
280
|
title: Yleistä tietoa
|
281
281
|
initiative_type_scopes:
|
data/config/locales/fi.yml
CHANGED
@@ -274,8 +274,8 @@ fi:
|
|
274
274
|
update: Päivitä
|
275
275
|
form:
|
276
276
|
authorizations: Varmennuksen asetukset
|
277
|
-
child_scope_threshold_enabled_help: 'Tämä asetus ei tue fyysisiä äänestyksiä, se ottaa käyttöön alateemat ja toimii sellaisten tunnistautumistapojen kanssa, jotka yhdistävät käyttäjän tiettyyn teemaan. Varmista, että valitset tällaisen tunnistautumistavan alla olevista asetuksista.
|
278
|
-
only_global_scope_enabled_help: Ota tämä asetus käyttöön, jos otit
|
277
|
+
child_scope_threshold_enabled_help: 'Tämä asetus ei tue fyysisiä äänestyksiä, se ottaa käyttöön alateemat ja toimii sellaisten tunnistautumistapojen kanssa, jotka yhdistävät käyttäjän tiettyyn teemaan. Varmista, että valitset tällaisen tunnistautumistavan alla olevista asetuksista. Tämän asetuksen toiminta vaatii teemojen määrityksen hierarkisesti: 1 isäntä - N lasta. Jos tarvitset lisätietoja kuinka tämä asetus toimii, tutustu <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">asetuksen dokumentaatioon täältä</a>.'
|
278
|
+
only_global_scope_enabled_help: Ota tämä asetus käyttöön, jos otit käyttöön "alateemojen allekirjoitukset" ja asetit yleisen yläteeman. Ottamalla tämän asetuksen käyttöön, aloitteen tyypin valinta sivuutetaan aloitteiden luontinäkymässä. Saat <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">lisätietoja tästä ominaisuudesta täältä</a>.
|
279
279
|
options: Valinnat
|
280
280
|
title: Yleistä tietoa
|
281
281
|
initiative_type_scopes:
|
data/config/locales/fr-CA.yml
CHANGED
@@ -274,8 +274,8 @@ fr-CA:
|
|
274
274
|
update: Mettre à jour
|
275
275
|
form:
|
276
276
|
authorizations: Paramètres d'autorisation
|
277
|
-
child_scope_threshold_enabled_help: 'Cette option de configuration ne gère pas les votes hors-ligne, elle permet d''activer des sous-secteurs et fonctionne avec un gestionnaire d''autorisation qui associe un secteur à l''utilisateur. Assurez-vous de sélectionner
|
278
|
-
only_global_scope_enabled_help: Cochez cette case si vous avez activé "
|
277
|
+
child_scope_threshold_enabled_help: 'Cette option de configuration ne gère pas les votes hors-ligne, elle permet d''activer des sous-secteurs et fonctionne avec un gestionnaire d''autorisation qui associe un secteur à l''utilisateur. Assurez-vous de sélectionner cette autorisation dans les paramètres d''autorisation ci-dessous. Pour que cela fonctionne, les secteurs doivent être configurées de manière hiérarchique : 1 Parent - N Enfants. Pour plus d''informations sur le fonctionnement de cette configuration, cliquez <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">ici</a>.'
|
278
|
+
only_global_scope_enabled_help: Cochez cette case si vous avez activé "Autoriser les signatures par sous-secteur" et configurer la portée globale comme votre portée parente. En activant cette option, la sélection du type d'initiative sera ignorée dans l'assistant de création d'initiative. Pour plus d'informations sur le fonctionnement de cette configuration, voir ce <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">lien</a>.
|
279
279
|
options: Paramètres
|
280
280
|
title: informations générales
|
281
281
|
initiative_type_scopes:
|
data/config/locales/fr.yml
CHANGED
@@ -274,8 +274,8 @@ fr:
|
|
274
274
|
update: Mettre à jour
|
275
275
|
form:
|
276
276
|
authorizations: Paramètres d'autorisation
|
277
|
-
child_scope_threshold_enabled_help: 'Cette option de configuration ne gère pas les votes hors-ligne, elle permet d''activer des sous-secteurs et fonctionne avec un gestionnaire d''autorisation qui associe un secteur à l''utilisateur. Assurez-vous de sélectionner
|
278
|
-
only_global_scope_enabled_help: Cochez cette case si vous avez activé "Autoriser les signatures par sous-secteur" et
|
277
|
+
child_scope_threshold_enabled_help: 'Cette option de configuration ne gère pas les votes hors-ligne, elle permet d''activer des sous-secteurs et fonctionne avec un gestionnaire d''autorisation qui associe un secteur à l''utilisateur. Assurez-vous de sélectionner cette autorisation dans les paramètres d''autorisation ci-dessous. Pour que cela fonctionne, les secteurs doivent être configurées de manière hiérarchique : 1 Parent - N Enfants. Pour plus d''informations sur le fonctionnement de cette configuration, cliquez <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">ici</a>.'
|
278
|
+
only_global_scope_enabled_help: Cochez cette case si vous avez activé "Autoriser les signatures par sous-secteur" et configurer la portée globale comme votre portée parente. En activant cette option, la sélection du type d'initiative sera ignorée dans l'assistant de création d'initiative. Pour plus d'informations sur le fonctionnement de cette configuration, voir ce <a href="https://docs.decidim.org/en/admin/spaces/initiatives/" target="_blank">lien</a>.
|
279
279
|
options: Paramètres
|
280
280
|
title: informations générales
|
281
281
|
initiative_type_scopes:
|
data/config/locales/it.yml
CHANGED
@@ -274,8 +274,6 @@ it:
|
|
274
274
|
update: Aggiornare
|
275
275
|
form:
|
276
276
|
authorizations: Impostazioni di autorizzazione
|
277
|
-
child_scope_threshold_enabled_help: 'Questo flag di configurazione non supporta i voti offline, abilita i sotto-ambiti e funziona con un gestore di autorizzazioni che associa un ambito all''utente, assicurarsi di selezionare tale autorizzazione, sotto nelle impostazioni di autorizzazione. Affinché gli ambiti di lavoro debbano essere configurati in modo gerarchico: 1 Genitore - N Bambino. Per ulteriori informazioni su come funziona questa configurazione, vedere questo <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">link</a>.'
|
278
|
-
only_global_scope_enabled_help: Seleziona questo contrassegno se hai abilitato "Child scope signature" e hai configurato l'ambito globale come ambito genitore. Abilitando questo, la selezione del tipo di iniziativa sarà saltata nella procedura guidata di creazione di iniziativa. Per ulteriori informazioni su come funziona questa configurazione, vedere questo <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">link</a>.
|
279
277
|
options: Opzioni
|
280
278
|
title: Informazione generale
|
281
279
|
initiative_type_scopes:
|
data/config/locales/ja.yml
CHANGED
@@ -271,8 +271,8 @@ ja:
|
|
271
271
|
update: 更新
|
272
272
|
form:
|
273
273
|
authorizations: 認証設定
|
274
|
-
child_scope_threshold_enabled_help:
|
275
|
-
only_global_scope_enabled_help: '
|
274
|
+
child_scope_threshold_enabled_help: "この設定では、対面での署名収集をサポートせず、サブスコープの署\n名フラグを有効にし、スコープとユーザーを関連付ける承認ハンドラと連携します。オーソリゼーションの設定で、下記のオーソリゼーションを必ず選択してください。これが機能するためには、1つのスコープ - N個のサブスコープというように、階層的に構成されている必要があります。この設定がどのように機能するかについては、 <a href=\"https://docs.decidim.org/en/admin/spaces/initiatives/\" target=\"_blank\">このリンク</a> を参照してください。"
|
275
|
+
only_global_scope_enabled_help: '「下層スコープ署名」を有効にし、グローバルスコープを親スコープとして設定する場合、このフラグをチェックします。これを有効にすると、イニシアチブ作成ウィザードでイニシアチブ種別の選択がスキップされます。この設定の仕組みについての詳細は、<a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">このリンク</a> を参照してください。'
|
276
276
|
options: オプション
|
277
277
|
title: 一般情報
|
278
278
|
initiative_type_scopes:
|
data/config/locales/lb.yml
CHANGED
@@ -204,8 +204,6 @@ lb:
|
|
204
204
|
no_members_yet: Es gibt keine Mitglieder im Promoter-Ausschuss
|
205
205
|
initiatives_types:
|
206
206
|
form:
|
207
|
-
child_scope_threshold_enabled_help: 'Cette option de configuration ne gère pas les votes hors-ligne, elle permet d''activer des sous-secteurs et fonctionne avec un gestionnaire d''autorisation qui associe un secteur à l''utilisateur. Assurez-vous de sélectionner une telle autorisation dans les paramètres d''autorisation ci-dessous. Pour que cela fonctionne, les secteurs doivent être configurées de manière hiérarchique : 1 Parent - N Enfants. Pour plus d''informations sur le fonctionnement de cette configuration, cliquez <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">ici</a>.'
|
208
|
-
only_global_scope_enabled_help: Cochez cette case si vous avez activé "Autoriser les signatures par sous-secteur" et configuré la portée globale comme votre portée parente. En activant cette option, la sélection du type d'initiative sera ignorée dans l'assistant de création d'initiative. Pour plus d'informations sur le fonctionnement de cette configuration, voir ce <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">lien</a>.
|
209
207
|
options: Optionen
|
210
208
|
title: Allgemeine Information
|
211
209
|
initiative_type_scopes:
|
data/config/locales/nl.yml
CHANGED
@@ -249,7 +249,6 @@ nl:
|
|
249
249
|
destroy: Verwijder
|
250
250
|
update: Bijwerken
|
251
251
|
form:
|
252
|
-
child_scope_threshold_enabled_help: 'Deze configuratie-vlag biedt geen ondersteuning voor offline stemmen, het maakt subscopes mogelijk en werkt met een autorisatieverwerker die een scope associeert met de gebruiker. Zorg ervoor dat je deze machtiging selecteert, onderaan in de autorisatie-instellingen. Om de toepassingsmogelijkheden te kunnen laten werken moet het op hiërarchische wijze worden geconfigureerd: 1 ouder - N kind. Voor meer informatie over hoe deze configuratie werkt, zie deze <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">link</a> .'
|
253
252
|
title: Algemene informatie
|
254
253
|
initiative_type_scopes:
|
255
254
|
title: Scopes voor het initiatieftype
|
data/config/locales/pl.yml
CHANGED
@@ -280,8 +280,6 @@ pl:
|
|
280
280
|
update: Aktualizuj
|
281
281
|
form:
|
282
282
|
authorizations: Ustawienia autoryzacji
|
283
|
-
child_scope_threshold_enabled_help: 'Ta konfiguracja nie pozwala na głosowania offline, zezwala na pod-zakresy i działa z procedura autoryzacji, która łączy zakres z użytkownikiem, upewnij się, że wybrałeś taką autoryzację, poniżej w sekcji autoryzacji. Żeby działały zakresy muszą być konfigurowane w hierarchii: 1 Rodzic - N element podrzędny. Więcej informacji o działaniu tej konfiguracji znajdziesz pod tym <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">linkiem</a>.'
|
284
|
-
only_global_scope_enabled_help: Zaznacz tę flagę, jeśli włączyłeś opcję "Podpisy zakresu podrzędnego" i skonfigurowałeś globalny zakres jako zakres nadrzędny. Umożliwiając to działanie, wybór typu inicjatywy zostanie pominięty w kreatorze tworzenia inicjatyw. Aby uzyskać więcej informacji na temat funkcjonowania tej konfiguracji, zobacz ten <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">link</a>.
|
285
283
|
options: Ustawienia
|
286
284
|
title: Informacje ogólne
|
287
285
|
initiative_type_scopes:
|
data/config/locales/pt-BR.yml
CHANGED
@@ -274,8 +274,6 @@ pt-BR:
|
|
274
274
|
update: Atualizar
|
275
275
|
form:
|
276
276
|
authorizations: Opções de autorização
|
277
|
-
child_scope_threshold_enabled_help: 'Esse parâmetro de configuração não suporta votos off-line, permite subescopos e funciona com um manipulador de autorização que associa o escopo ao usuário, certifique-se de selecionar a autorização, abaixo nas configurações de autorização. Para que funcione, os escopos precisam ser configurados de forma hierárquica: 1 Pai - N Criança. Para mais informações sobre como essa configuração funciona, consulte este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">link</a>.'
|
278
|
-
only_global_scope_enabled_help: Marque este sinalizador se você habilitou "Assinatura de escopo Filho" e configurou o escopo global como seu escopo pai. Habilitando esta possibilidade, a selecção do tipo de iniciativa será ignorada no assistente de criação de iniciativa. Para mais informações sobre como essa configuração funciona, consulte este <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">link</a>.
|
279
277
|
options: Opções
|
280
278
|
title: Informação geral
|
281
279
|
initiative_type_scopes:
|
data/config/locales/pt.yml
CHANGED
@@ -274,8 +274,6 @@ pt:
|
|
274
274
|
update: Atualizar
|
275
275
|
form:
|
276
276
|
authorizations: Definições de autorização
|
277
|
-
child_scope_threshold_enabled_help: 'Este sinalizador não suporta votações off-line, activa sub-âmbitos e actua com um regulador de autorização que associa um âmbito ao utilizador, certifique-se que selecciona essa autorização, abaixo, na configuração de autorizações. Para que funcione os âmbitos precisam de estar configurados duma forma hierárquica: 1 Ascendente - N Descendentes. Para mais informação no funcionamento desta configuração, ver <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">ligação</a>.'
|
278
|
-
only_global_scope_enabled_help: Active este sinalizador se activou a “assinatura de âmbito descendente” e configurou o âmbito global como sendo o seu âmbito ascendente. Ao activá-lo, a selecção do tipo de iniciativa será ignorada no assistente de criação de iniciativa. Para mais informação no funcionamento desta configuração, ver <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">ligação</a>.
|
279
277
|
options: Opções
|
280
278
|
title: Informação geral
|
281
279
|
initiative_type_scopes:
|
data/config/locales/ro-RO.yml
CHANGED
@@ -277,8 +277,6 @@ ro:
|
|
277
277
|
update: Actualizare
|
278
278
|
form:
|
279
279
|
authorizations: Setări de autorizare
|
280
|
-
child_scope_threshold_enabled_help: 'Acest steag de configurare nu acceptă voturi offline, permite sub-scopurilor și funcționează cu un handler de autorizare care asociază un domeniu utilizatorului, asigură-te că ai ales acea autorizație, mai jos în setările de autorizare. Pentru ca acesta să funcţioneze domeniile de aplicare trebuie configurate în mod ierarhic: 1 părinte - N Child. Pentru mai multe informații despre cum funcționează această configurație, vedeți linkul <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank"></a>.'
|
281
|
-
only_global_scope_enabled_help: Bifați acest steag dacă ați activat "Semnătura Child scope sigure" și ați configurat domeniul global ca domeniu părinte. Prin acest lucru, selecția de tip de inițiativă va fi omisă în asistentul pentru crearea de inițiative. Pentru mai multe informații despre cum funcționează această configurație, vedeți linkul <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank"></a>.
|
282
280
|
options: Opţiuni
|
283
281
|
title: Informaţii generale
|
284
282
|
initiative_type_scopes:
|
data/config/locales/tr-TR.yml
CHANGED
@@ -264,8 +264,6 @@ tr:
|
|
264
264
|
update: Güncelle
|
265
265
|
form:
|
266
266
|
authorizations: Yetkilendirme ayarları
|
267
|
-
child_scope_threshold_enabled_help: 'Bu yapılandırma bayrağı çevrimdışı oyları desteklemez, alt kapsamları etkinleştirir ve kullanıcıyla bir kapsamı ilişkilendiren bir yetkilendirme işleyicisi ile çalışır, aşağıdaki yetkilendirme ayarlarında bu yetkilendirmeyi seçtiğinizden emin olun. Çalışması için kapsamların hiyerarşik şekilde yapılandırılması gerekir: 1 Ana - N Alt. Bu yapılandırmanın nasıl çalıştığı hakkında daha fazla bilgi için bu <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank"> bağlantıya </a> bakın.'
|
268
|
-
only_global_scope_enabled_help: '"Alt kapsam imzasını" etkinleştirdiyseniz ve genel kapsamı ana kapsamınız olarak yapılandırdıysanız bu bayrağı işaretleyin. Bunu etkinleştirdiğinizde, girişim oluşturma sihirbazında girişim türü seçimi atlanacaktır. Bu yapılandırmanın nasıl çalıştığı hakkında daha fazla bilgi için bu <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank"> bağlantıya </a> bakın.'
|
269
267
|
options: Seçenekler
|
270
268
|
title: Genel bilgi
|
271
269
|
initiative_type_scopes:
|
data/config/locales/zh-CN.yml
CHANGED
@@ -255,7 +255,6 @@ zh-CN:
|
|
255
255
|
update: 更新
|
256
256
|
form:
|
257
257
|
authorizations: 授权设置
|
258
|
-
only_global_scope_enabled_help: 如果您启用了“子范围签名”并将全局范围设置为您的上级范围,请勾选此标记。 通过启用此功能,倡议类型选择将会在创建向导中跳过。 关于此配置如何工作的更多信息,请查看 <a href="https://docs.decidim.org/admin-manual/en/initiatives/" target="_blank">链接</a>。
|
259
258
|
options: 备选方案
|
260
259
|
title: 通告周知
|
261
260
|
initiative_type_scopes:
|
@@ -122,6 +122,20 @@ module Decidim
|
|
122
122
|
initializer "decidim_initiatives.webpacker.assets_path" do
|
123
123
|
Decidim.register_assets_path File.expand_path("app/packs", root)
|
124
124
|
end
|
125
|
+
|
126
|
+
initializer "decidim_initiatives.preview_mailer" do
|
127
|
+
# Load in mailer previews for apps to use in development.
|
128
|
+
# We need to make sure we call `Preview.all` before requiring our
|
129
|
+
# previews, otherwise any previews the app attempts to add need to be
|
130
|
+
# manually required.
|
131
|
+
if Rails.env.development? || Rails.env.test?
|
132
|
+
ActionMailer::Preview.all
|
133
|
+
|
134
|
+
Dir[root.join("spec/mailers/previews/**/*_preview.rb")].each do |file|
|
135
|
+
require_dependency file
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
125
139
|
end
|
126
140
|
end
|
127
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-initiatives
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.26.
|
4
|
+
version: 0.26.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Salvador Perez Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.26.
|
19
|
+
version: 0.26.1
|
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.
|
26
|
+
version: 0.26.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-comments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.26.
|
33
|
+
version: 0.26.1
|
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.26.
|
40
|
+
version: 0.26.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.26.
|
47
|
+
version: 0.26.1
|
48
48
|
type: :runtime
|
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.26.
|
54
|
+
version: 0.26.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim-verifications
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.26.
|
61
|
+
version: 0.26.1
|
62
62
|
type: :runtime
|
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.26.
|
68
|
+
version: 0.26.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: origami
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.26.
|
145
|
+
version: 0.26.1
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.26.
|
152
|
+
version: 0.26.1
|
153
153
|
description: Citizen initiatives plugin for decidim.
|
154
154
|
email:
|
155
155
|
- jsperezg@gmail.com
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- app/controllers/concerns/decidim/initiatives/admin/filterable.rb
|
197
197
|
- app/controllers/concerns/decidim/initiatives/admin/initiative_admin.rb
|
198
198
|
- app/controllers/concerns/decidim/initiatives/needs_initiative.rb
|
199
|
+
- app/controllers/concerns/decidim/initiatives/needs_initiative_type.rb
|
199
200
|
- app/controllers/concerns/decidim/initiatives/orderable.rb
|
200
201
|
- app/controllers/concerns/decidim/initiatives/single_initiative_type.rb
|
201
202
|
- app/controllers/concerns/decidim/initiatives/type_selector_options.rb
|
@@ -377,7 +378,6 @@ files:
|
|
377
378
|
- app/views/layouts/decidim/initiative_creation.html.erb
|
378
379
|
- app/views/layouts/decidim/initiative_signature_creation.html.erb
|
379
380
|
- config/assets.rb
|
380
|
-
- config/initializers/mail_previews.rb
|
381
381
|
- config/initializers/wicked_pdf.rb
|
382
382
|
- config/locales/am-ET.yml
|
383
383
|
- config/locales/ar-SA.yml
|