decidim-surveys 0.12.2 → 0.13.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/decidim/surveys/survey_answer.rb +10 -0
- data/config/locales/fr.yml +6 -6
- data/lib/decidim/surveys/component.rb +2 -0
- data/lib/decidim/surveys/version.rb +1 -1
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 500baa68370d82c51f731448d9d8ca7dd83ff84991ad217f21b34c30bdb8014d
|
4
|
+
data.tar.gz: 1649e14e00e0509577393cda3f91e74c50083ff0e32012f21c7b9c79a7c8fcf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3bb92d5727027c890ffa3d79b60d6525cb96ab0973abf8084684fa1e1245dc7d32764f3f55825c8574cd1aca3d1e3da5f0bfce08b2730ef46d7b964a4bc38bb
|
7
|
+
data.tar.gz: 12484f3ad7247d4b137d2f0fe5f0f310cebf6ca55c5bf8fcc9fdabda449bb244516a22e94454385f63dfa699b1b5f4e49ff538830f9a4e9397052e96d261da6d
|
@@ -4,6 +4,8 @@ module Decidim
|
|
4
4
|
module Surveys
|
5
5
|
# The data store for a SurveyAnswer in the Decidim::Surveys component.
|
6
6
|
class SurveyAnswer < Surveys::ApplicationRecord
|
7
|
+
include Decidim::DataPortability
|
8
|
+
|
7
9
|
belongs_to :user, class_name: "Decidim::User", foreign_key: "decidim_user_id"
|
8
10
|
belongs_to :survey, class_name: "Survey", foreign_key: "decidim_survey_id"
|
9
11
|
belongs_to :question, class_name: "SurveyQuestion", foreign_key: "decidim_survey_question_id"
|
@@ -20,6 +22,14 @@ module Decidim
|
|
20
22
|
validate :user_survey_same_organization
|
21
23
|
validate :question_belongs_to_survey
|
22
24
|
|
25
|
+
def self.user_collection(user)
|
26
|
+
where(decidim_user_id: user.id)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.export_serializer
|
30
|
+
Decidim::Surveys::SurveyUserAnswersSerializer
|
31
|
+
end
|
32
|
+
|
23
33
|
private
|
24
34
|
|
25
35
|
def user_survey_same_organization
|
data/config/locales/fr.yml
CHANGED
@@ -41,12 +41,12 @@ fr:
|
|
41
41
|
surveys:
|
42
42
|
survey_closed:
|
43
43
|
email_intro: L'enquête %{resource_title} proposée dans %{participatory_space_title} est maintenant terminée.
|
44
|
-
email_outro: Vous
|
45
|
-
email_subject: L'enquête
|
46
|
-
notification_title: L'enquête <a href="%{resource_path}">%{resource_title}</a>
|
44
|
+
email_outro: Vous avez reçu une notification venant de %{participatory_space_title}. Vous pouvez arrêter de recevoir ces notifications à partir du lien précédent.
|
45
|
+
email_subject: L'enquête du processus participatif %{participatory_space_title} est terminée
|
46
|
+
notification_title: L'enquête <a href="%{resource_path}">%{resource_title}</a> lancée dans <a href="%{participatory_space_url}">%{participatory_space_title}</a> est terminée.
|
47
47
|
survey_opened:
|
48
|
-
email_intro: 'L''enquête %{resource_title} est désormais ouverte
|
49
|
-
email_outro: Vous avez reçu cette notification car vous suivez
|
48
|
+
email_intro: 'L''enquête %{resource_title} est désormais ouverte sur le processus participatif %{participatory_space_title}. Vous pouvez y participer depuis la page suivante :'
|
49
|
+
email_outro: Vous avez reçu cette notification car vous suivez le processus %{participatory_space_title}. Vous pouvez arrêter de recevoir ces notifications à partir du lien précédent.
|
50
50
|
email_subject: Une nouvelle enquête a été créée dans %{participatory_space_title}
|
51
51
|
notification_title: 'L''enquête <a href="%{resource_path}">%{resource_title}</a> est ouverte. Vous pouvez y participer en vous rendant sur le lien suivant : <a href="%{participatory_space_url}">%{participatory_space_title}</a>.'
|
52
52
|
forms:
|
@@ -99,7 +99,7 @@ fr:
|
|
99
99
|
max_choices: 'Nombre de choix maximum : %{n}'
|
100
100
|
show:
|
101
101
|
answer_survey:
|
102
|
-
anonymous_user_message: Pour répondre à l'enquête<a href="%{sign_in_link}"> identifiez-vous avec votre compte</a> ou <a href="%{sign_up_link}">inscrivez-vous
|
102
|
+
anonymous_user_message: Pour répondre à l'enquête<a href="%{sign_in_link}"> identifiez-vous avec votre compte</a> ou <a href="%{sign_up_link}">inscrivez-vous.</a> .
|
103
103
|
title: Participer à l'enquête
|
104
104
|
are_you_sure: Cette action ne peut pas être annulée et vous ne pourrez plus modifier vos réponses. Êtes-vous prêt à valider votre participation ?
|
105
105
|
submit: Envoyer
|
@@ -15,6 +15,8 @@ Decidim.register_component(:surveys) do |component|
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
+
component.data_portable_entities = ["Decidim::Surveys::SurveyAnswer"]
|
19
|
+
|
18
20
|
component.on(:before_destroy) do |instance|
|
19
21
|
raise "Can't destroy this component when there are surveys" if Decidim::Surveys::Survey.where(component: instance).any?
|
20
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-surveys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,64 +10,64 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.13.a
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.13.a
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-admin
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.13.a
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.13.a
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: decidim-dev
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.13.a
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- -
|
54
|
+
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.13.a
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-participatory_processes
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.13.a
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.13.a
|
71
71
|
description: A surveys component for decidim's participatory spaces.
|
72
72
|
email:
|
73
73
|
- josepjaume@gmail.com
|
@@ -176,9 +176,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
176
|
version: '2.3'
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- - "
|
179
|
+
- - ">"
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
181
|
+
version: 1.3.1
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
184
|
rubygems_version: 2.7.6
|