decidim-surveys 0.8.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 400fd2349b42363b5a902e5b5ab6bfaadc5a54a0
4
- data.tar.gz: 6328306f35b13e48486b9822d916f612948cf945
2
+ SHA256:
3
+ metadata.gz: 80ab4e2f11d8d50604b1e72080d308bf52755949283dcc2dcc57ff2c3c04807d
4
+ data.tar.gz: e950b928355a0c1403c00806c2e25b9c786c160d0dedf8d86ff98440ddb5788a
5
5
  SHA512:
6
- metadata.gz: 455c19d70a0074c4c85c13cd81f8b3722b99c25252ca8e57cb04fead436850910cc64919e94d2da1e99762de0a5a6b893a2889a0098511d74440d8409e96c2e6
7
- data.tar.gz: efe7378b235daa92b05651c1106f48479ba18f87e50c85f3ca3fe4b589e1056c19f01bda88f0ac53690763b3eb823be430e306a6e0b425ab142ea3d8748986c7
6
+ metadata.gz: 1a0f43e6be3c83ac542d1e4f90b29c78914e6a13caa2f0fa9df91145c84d406847c56db5fa8032162a1f4fa9091129e3dcfe0db8ce62219def948edb735a54b2
7
+ data.tar.gz: 3f42048c360695eb05aa01168688991e46b28da28e38bda6779c69377aa5200795b8e9c8a4a0fc5ef0aec9b5275565aaa527d5d380489c9c161b6c20ca429421
@@ -1,8 +1,19 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36.02 36.02">
2
- <path d="M373,545.54a18,18,0,1,1,18-18A18,18,0,0,1,373,545.54Zm0-34a16,16,0,1,0,16,16A16,16,0,0,0,373,511.53Z" transform="translate(-354.99 -509.53)"/>
3
- <path d="M377.73,536.41h-9.46a1,1,0,1,1,0-2h9.46A1,1,0,0,1,377.73,536.41Z" transform="translate(-354.99 -509.53)"/>
4
- <path d="M375,525.54h-6.73a1,1,0,1,1,0-2H375A1,1,0,1,1,375,525.54Z" transform="translate(-354.99 -509.53)"/>
5
- <path d="M375,535.41a1,1,0,0,1-1-1v-9.87a1,1,0,1,1,2,0v9.87A1,1,0,0,1,375,535.41Z" transform="translate(-354.99 -509.53)"/>
6
- <path d="M373,523a3,3,0,1,1,3-3A3,3,0,0,1,373,523Zm0-4a1,1,0,1,0,1,1A1,1,0,0,0,373,519Z" transform="translate(-354.99 -509.53)"/>
7
- <path d="M371,535.41a1,1,0,0,1-1-1v-9.87a1,1,0,1,1,2,0v9.87A1,1,0,0,1,371,535.41Z" transform="translate(-354.99 -509.53)"/>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 36 36" style="enable-background:new 0 0 36 36;" xml:space="preserve">
5
+ <path d="M27,28H9c-0.6,0-1-0.4-1-1V11c0-0.6,0.4-1,1-1h3.1c0.6,0,1,0.4,1,1v1.9h9.7V11c0-0.6,0.4-1,1-1H27c0.6,0,1,0.4,1,1v16
6
+ C28,27.6,27.6,28,27,28z M10,26h16V12h-1.2v1.9c0,0.6-0.4,1-1,1H12.1c-0.6,0-1-0.4-1-1V12H10V26z"/>
7
+ <g>
8
+ <g>
9
+ <path d="M21,11h-6c-0.6,0-1-0.4-1-1s0.4-1,1-1h6c0.6,0,1,0.4,1,1S21.6,11,21,11z"/>
10
+ </g>
11
+ <g>
12
+ <path d="M18.7,11h-1.5c-0.6,0-1-0.4-1-1V8c0-0.6,0.4-1,1-1h1.5c0.6,0,1,0.4,1,1v2C19.7,10.5,19.3,11,18.7,11z"/>
13
+ </g>
14
+ </g>
15
+ <g>
16
+ <path d="M18,36.1c-9.9,0-18-8.1-18-18s8.1-18,18-18s18,8.1,18,18S27.9,36.1,18,36.1z M18,2.1c-8.8,0-16,7.2-16,16s7.2,16,16,16
17
+ s16-7.2,16-16S26.8,2.1,18,2.1z"/>
18
+ </g>
8
19
  </svg>
@@ -1,9 +1,14 @@
1
- form.answer-survey {
2
- .radio-button-collection, .check-box-collection {
1
+ form.answer-survey{
2
+ .radio-button-collection,
3
+ .check-box-collection{
3
4
  margin: 0 0 1rem;
4
5
  }
5
6
 
6
- .tos-agreement-help-text {
7
- margin: 0.2rem 0 0;
7
+ .tos-agreement-help-text{
8
+ margin: .2rem 0 0;
9
+ }
10
+
11
+ label.survey-question{
12
+ font-weight: bold;
8
13
  }
9
14
  }
@@ -18,7 +18,7 @@ module Decidim
18
18
  #
19
19
  # Returns nothing.
20
20
  def map_model(model)
21
- self.question_id = model.id
21
+ self.question_id = model.decidim_survey_question_id
22
22
  end
23
23
 
24
24
  private
@@ -33,7 +33,7 @@
33
33
  <% @form.answers.each_with_index do |answer, answer_idx| %>
34
34
  <div class="row column">
35
35
  <% field_id = "survey_#{survey.id}_question_#{answer.question.id}_answer_body" %>
36
- <%= label_tag field_id , "#{answer_idx + 1}. #{translated_attribute(answer.question.body)} #{'*' if answer.question.mandatory?}" %>
36
+ <%= label_tag field_id , "#{answer_idx + 1}. #{translated_attribute(answer.question.body)} #{'*' if answer.question.mandatory?}", class: 'survey-question' %>
37
37
 
38
38
  <% case answer.question.question_type %>
39
39
  <% when "short_answer" %>
@@ -76,7 +76,7 @@
76
76
  </div>
77
77
 
78
78
  <div class="button--double form-general-submit">
79
- <%= form.submit t(".submit"), class: "button", data: { confirm: t('.are_you_sure') } %>
79
+ <%= form.submit t(".submit"), class: "button", data: { confirm: t('.are_you_sure'), disable: true } %>
80
80
  </div>
81
81
  <% end %>
82
82
  </div>
@@ -1,4 +1,3 @@
1
- ---
2
1
  ca:
3
2
  activemodel:
4
3
  attributes:
@@ -1,4 +1,3 @@
1
- ---
2
1
  es:
3
2
  activemodel:
4
3
  attributes:
@@ -14,10 +14,10 @@ fr:
14
14
  name: Enquête
15
15
  settings:
16
16
  global:
17
- announcement: Annonce
17
+ announcement: Message d'annonce
18
18
  step:
19
19
  allow_answers: Autoriser les réponses
20
- announcement: Annonce
20
+ announcement: Message d'annonce
21
21
  surveys:
22
22
  admin:
23
23
  exports:
@@ -0,0 +1,69 @@
1
+ gl:
2
+ activemodel:
3
+ attributes:
4
+ survey_answer:
5
+ body: Resposta
6
+ survey_question:
7
+ mandatory: Obrigatorio
8
+ question_type: Tipo
9
+ decidim:
10
+ features:
11
+ surveys:
12
+ actions:
13
+ answer: Resposta
14
+ name: Enquisa
15
+ settings:
16
+ global:
17
+ announcement: Anuncio
18
+ step:
19
+ allow_answers: Permitir respostas
20
+ announcement: Anuncio
21
+ surveys:
22
+ admin:
23
+ exports:
24
+ survey_user_answers: Enquisas respostas dos usuarios
25
+ models:
26
+ components:
27
+ description: Descrición
28
+ tos: Condicións de servicio
29
+ surveys:
30
+ answer_option:
31
+ answer_option: Opción de resposta
32
+ remove_answer_option: Eliminar a opción de resposta
33
+ statement: Declaración
34
+ edit:
35
+ save: Gardar
36
+ title: Título
37
+ form:
38
+ add_question: Engadir pregunta
39
+ already_answered_warning: Algunha xente xa respondeu a enquisa para que non poida modificar as súas preguntas.
40
+ question:
41
+ add_answer_option: Engadir unha opción de resposta
42
+ question: Pregunta
43
+ remove_question: Elimina a pregunta
44
+ statement: Declaración
45
+ update:
46
+ invalid: Houbo erros ao gardar a enquisa.
47
+ success: A enquisa gardouse correctamente.
48
+ question_types:
49
+ long_answer: Resposta longa
50
+ multiple_option: Múltipla opción
51
+ short_answer: Resposta curta
52
+ single_option: Opción única
53
+ surveys:
54
+ answer:
55
+ invalid: Houbo erros ao responder a enquisa.
56
+ success: A enquisa respondeu con éxito.
57
+ show:
58
+ answer_survey:
59
+ anonymous_user_message: <a href="%{sign_in_link}">Inicia sesión coa túa conta</a> ou <a href="%{sign_up_link}">insigne</a> para responder á enquisa.
60
+ title: Responde a enquisa
61
+ are_you_sure: Non se pode desfacer esta acción e non poderá editar as túas respostas. Estás seguro?
62
+ submit: Enviar
63
+ survey_answered:
64
+ body: Xa contestou esta enquisa.
65
+ title: A enquisa respondeu
66
+ survey_closed:
67
+ body: A enquisa está pechada e non se pode responder.
68
+ title: Enquisa pechada
69
+ tos_agreement: Ao participar nesta enquisa aceptas as Condicións de servizo
@@ -16,7 +16,7 @@ it:
16
16
  global:
17
17
  announcement: Annuncio
18
18
  step:
19
- allow_answers: Consentire risposte
19
+ allow_answers: Consenti risposte
20
20
  announcement: Annuncio
21
21
  surveys:
22
22
  admin:
@@ -57,7 +57,7 @@ it:
57
57
  show:
58
58
  answer_survey:
59
59
  anonymous_user_message: <a href="%{sign_in_link}">Entra con il tuo account</a> or <a href="%{sign_up_link}">Registrati</a> per poter commentare.
60
- title: Rispondere al questionario
60
+ title: Rispondi al questionario
61
61
  are_you_sure: Questa azione non potrà essere cancellata e non sarà più possibile modificare le risposte. Sei sicuro?
62
62
  submit: Invia
63
63
  survey_answered:
@@ -0,0 +1,69 @@
1
+ pt-BR:
2
+ activemodel:
3
+ attributes:
4
+ survey_answer:
5
+ body: Resposta
6
+ survey_question:
7
+ mandatory: Obrigatório
8
+ question_type: Tipo
9
+ decidim:
10
+ features:
11
+ surveys:
12
+ actions:
13
+ answer: Responda
14
+ name: Pesquisa
15
+ settings:
16
+ global:
17
+ announcement: Anúncio
18
+ step:
19
+ allow_answers: Permitir respostas
20
+ announcement: Anúncio
21
+ surveys:
22
+ admin:
23
+ exports:
24
+ survey_user_answers: Avalie as respostas dos usuários
25
+ models:
26
+ components:
27
+ description: Descrição
28
+ tos: Termos de serviço
29
+ surveys:
30
+ answer_option:
31
+ answer_option: Opção de resposta
32
+ remove_answer_option: Eliminar opção de resposta
33
+ statement: Declaração
34
+ edit:
35
+ save: Salve 
36
+ title: Título
37
+ form:
38
+ add_question: Adicionar pergunta
39
+ already_answered_warning: A pesquisa já foi respondida por alguns usuários para que você não possa modificar suas perguntas.
40
+ question:
41
+ add_answer_option: Adicionar opção de resposta
42
+ question: Questão
43
+ remove_question: Remova a pergunta
44
+ statement: Declaração
45
+ update:
46
+ invalid: Houve erros ao salvar a pesquisa.
47
+ success: Pesquisa salva com sucesso.
48
+ question_types:
49
+ long_answer: Resposta longa
50
+ multiple_option: Opção múltipla
51
+ short_answer: Resposta curta
52
+ single_option: Opção única
53
+ surveys:
54
+ answer:
55
+ invalid: Houve erros ao responder a pesquisa.
56
+ success: Pesquisa respondida com sucesso.
57
+ show:
58
+ answer_survey:
59
+ anonymous_user_message: <a href="%{sign_in_link}">Inscreva-se com sua conta</a> ou <a href="%{sign_up_link}">sign up</a> para responder a pesquisa.
60
+ title: Responda a pesquisa
61
+ are_you_sure: Esta ação não pode ser desfeita e você não poderá editar suas respostas. Você tem certeza?
62
+ submit: Enviar
63
+ survey_answered:
64
+ body: Você já respondeu esta pesquisa.
65
+ title: Pesquisa respondida
66
+ survey_closed:
67
+ body: A pesquisa está fechada e não pode ser respondida.
68
+ title: Pesquisa fechada
69
+ tos_agreement: Ao participar desta pesquisa você aceita seus Termos de Serviço
@@ -0,0 +1,69 @@
1
+ sv:
2
+ activemodel:
3
+ attributes:
4
+ survey_answer:
5
+ body: Svar
6
+ survey_question:
7
+ mandatory: Obligatorisk
8
+ question_type: Typ
9
+ decidim:
10
+ features:
11
+ surveys:
12
+ actions:
13
+ answer: Svar
14
+ name: Undersökning
15
+ settings:
16
+ global:
17
+ announcement: Meddelande
18
+ step:
19
+ allow_answers: Tillåt svar
20
+ announcement: Meddelande
21
+ surveys:
22
+ admin:
23
+ exports:
24
+ survey_user_answers: Survey användarens svar
25
+ models:
26
+ components:
27
+ description: Beskrivning
28
+ tos: Användarvillkor
29
+ surveys:
30
+ answer_option:
31
+ answer_option: Svaralternativ
32
+ remove_answer_option: Ta bort svaralternativet
33
+ statement: Påstående
34
+ edit:
35
+ save: Spara
36
+ title: Titel
37
+ form:
38
+ add_question: Lägg till fråga
39
+ already_answered_warning: Undersökningen är redan besvarad av vissa användare så att du inte kan ändra sina frågor.
40
+ question:
41
+ add_answer_option: Lägg till svaralternativ
42
+ question: Fråga
43
+ remove_question: Ta bort fråga
44
+ statement: Påstående
45
+ update:
46
+ invalid: Det har varit fel när du sparat undersökningen.
47
+ success: Undersökningen sparades framgångsrikt.
48
+ question_types:
49
+ long_answer: Långt svar
50
+ multiple_option: Flera alternativ
51
+ short_answer: Kort svar
52
+ single_option: Enkelt alternativ
53
+ surveys:
54
+ answer:
55
+ invalid: Det har förekommit fel vid besvarandet av undersökningen.
56
+ success: Undersökningen svarades framgångsrikt.
57
+ show:
58
+ answer_survey:
59
+ anonymous_user_message: <a href="%{sign_in_link}"> Logga in med ditt konto</a> eller <a href="%{sign_up_link}">sign up</a> för att svara på enkäten.
60
+ title: Besvara undersökningen
61
+ are_you_sure: Den här åtgärden kan inte ångras och du kommer inte att kunna redigera dina svar. Är du säker?
62
+ submit: Lämna
63
+ survey_answered:
64
+ body: Du har redan besvarat denna enkät.
65
+ title: Undersökningen svarade
66
+ survey_closed:
67
+ body: Undersökningen är stängd och kan inte besvaras.
68
+ title: Undersökningen stängd
69
+ tos_agreement: Genom att delta i denna undersökning accepterar du användarvillkoren
@@ -15,9 +15,7 @@ Decidim.register_feature(:surveys) do |feature|
15
15
  end
16
16
 
17
17
  feature.on(:before_destroy) do |instance|
18
- if Decidim::Surveys::Survey.where(feature: instance).any?
19
- raise "Can't destroy this feature when there are surveys"
20
- end
18
+ raise "Can't destroy this feature when there are surveys" if Decidim::Surveys::Survey.where(feature: instance).any?
21
19
  end
22
20
 
23
21
  feature.register_stat :surveys_count do |features, start_at, end_at|
@@ -27,7 +25,7 @@ Decidim.register_feature(:surveys) do |feature|
27
25
  surveys.count
28
26
  end
29
27
 
30
- feature.register_stat :answers_count, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |features, start_at, end_at|
28
+ feature.register_stat :answers_count, priority: Decidim::StatsRegistry::MEDIUM_PRIORITY do |features, start_at, end_at|
31
29
  surveys = Decidim::Surveys::Survey.where(feature: features)
32
30
  answers = Decidim::Surveys::SurveyAnswer.where(survey: surveys)
33
31
  answers = answers.where("created_at >= ?", start_at) if start_at.present?
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-surveys version.
5
5
  module Surveys
6
6
  def self.version
7
- "0.8.4"
7
+ "0.9.0"
8
8
  end
9
9
  end
10
10
  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.8.4
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-01-16 00:00:00.000000000 Z
13
+ date: 2018-02-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,71 +18,71 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.8.4
21
+ version: 0.9.0
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.8.4
28
+ version: 0.9.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: jquery-tmpl-rails
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: 1.1.0
35
+ version: '1.1'
36
36
  type: :runtime
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: 1.1.0
42
+ version: '1.1'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-admin
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.8.4
49
+ version: 0.9.0
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.8.4
56
+ version: 0.9.0
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-dev
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.8.4
63
+ version: 0.9.0
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.8.4
70
+ version: 0.9.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-participatory_processes
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.8.4
77
+ version: 0.9.0
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.8.4
85
- description: A component for decidim's participatory processes.
84
+ version: 0.9.0
85
+ description: A surveys component for decidim's participatory spaces.
86
86
  email:
87
87
  - josepjaume@gmail.com
88
88
  - mrc2407@gmail.com
@@ -131,11 +131,14 @@ files:
131
131
  - config/locales/eu.yml
132
132
  - config/locales/fi.yml
133
133
  - config/locales/fr.yml
134
+ - config/locales/gl.yml
134
135
  - config/locales/it.yml
135
136
  - config/locales/nl.yml
136
137
  - config/locales/pl.yml
138
+ - config/locales/pt-BR.yml
137
139
  - config/locales/pt.yml
138
140
  - config/locales/ru.yml
141
+ - config/locales/sv.yml
139
142
  - config/locales/uk.yml
140
143
  - db/migrate/20170511092231_create_decidim_surveys.rb
141
144
  - db/migrate/20170515090916_create_decidim_survey_questions.rb
@@ -164,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
167
  requirements:
165
168
  - - ">="
166
169
  - !ruby/object:Gem::Version
167
- version: 2.3.1
170
+ version: '2.3'
168
171
  required_rubygems_version: !ruby/object:Gem::Requirement
169
172
  requirements:
170
173
  - - ">="
@@ -172,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
175
  version: '0'
173
176
  requirements: []
174
177
  rubyforge_project:
175
- rubygems_version: 2.6.13
178
+ rubygems_version: 2.7.3
176
179
  signing_key:
177
180
  specification_version: 4
178
- summary: A component for decidim's participatory processes.
181
+ summary: Decidim surveys module
179
182
  test_files: []