decidim-surveys 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -9
  3. data/app/assets/stylesheets/decidim/surveys/surveys.scss +2 -2
  4. data/app/commands/decidim/surveys/create_survey.rb +1 -1
  5. data/app/controllers/decidim/surveys/admin/surveys_controller.rb +6 -37
  6. data/app/controllers/decidim/surveys/surveys_controller.rb +8 -22
  7. data/app/jobs/decidim/surveys/settings_change_job.rb +6 -3
  8. data/app/models/decidim/surveys/survey.rb +2 -12
  9. data/app/permissions/decidim/surveys/admin/permissions.rb +1 -1
  10. data/app/permissions/decidim/surveys/permissions.rb +1 -1
  11. data/app/queries/decidim/surveys/metrics/answers_metric_manage.rb +70 -0
  12. data/app/queries/decidim/surveys/metrics/survey_participants_metric_measure.rb +30 -0
  13. data/config/locales/ca.yml +5 -66
  14. data/config/locales/de.yml +5 -66
  15. data/config/locales/en.yml +5 -66
  16. data/config/locales/es-PY.yml +5 -66
  17. data/config/locales/es.yml +5 -66
  18. data/config/locales/eu.yml +5 -66
  19. data/config/locales/fi-pl.yml +5 -66
  20. data/config/locales/fi.yml +5 -66
  21. data/config/locales/fr.yml +5 -66
  22. data/config/locales/gl.yml +5 -66
  23. data/config/locales/hu.yml +5 -66
  24. data/config/locales/id-ID.yml +0 -70
  25. data/config/locales/it.yml +5 -66
  26. data/config/locales/nl.yml +5 -66
  27. data/config/locales/pl.yml +5 -66
  28. data/config/locales/pt-BR.yml +5 -66
  29. data/config/locales/pt.yml +5 -66
  30. data/config/locales/ru.yml +0 -66
  31. data/config/locales/sv.yml +5 -66
  32. data/config/locales/tr-TR.yml +0 -70
  33. data/config/locales/uk.yml +0 -66
  34. data/lib/decidim/surveys.rb +0 -2
  35. data/lib/decidim/surveys/admin_engine.rb +1 -5
  36. data/lib/decidim/surveys/component.rb +18 -15
  37. data/lib/decidim/surveys/engine.rb +17 -4
  38. data/lib/decidim/surveys/test/factories.rb +2 -42
  39. data/lib/decidim/surveys/version.rb +1 -1
  40. data/lib/tasks/decidim_surveys_tasks.rake +92 -0
  41. metadata +28 -42
  42. data/app/assets/config/admin/decidim_surveys_manifest.js +0 -1
  43. data/app/assets/config/decidim_surveys_manifest.js +0 -1
  44. data/app/assets/images/decidim/surveys/icon.svg +0 -19
  45. data/app/assets/javascripts/decidim/surveys/admin/auto_buttons_by_min_items.component.js.es6 +0 -25
  46. data/app/assets/javascripts/decidim/surveys/admin/auto_select_options_by_total_items.component.js.es6 +0 -23
  47. data/app/assets/javascripts/decidim/surveys/admin/surveys.js.es6 +0 -188
  48. data/app/assets/javascripts/decidim/surveys/autosortable_checkboxes.component.js.es6 +0 -65
  49. data/app/assets/javascripts/decidim/surveys/option_attached_inputs.component.js.es6 +0 -32
  50. data/app/assets/javascripts/decidim/surveys/surveys.js.es6 +0 -20
  51. data/app/commands/decidim/surveys/admin/update_survey.rb +0 -86
  52. data/app/commands/decidim/surveys/answer_survey.rb +0 -54
  53. data/app/forms/decidim/surveys/admin/survey_answer_option_form.rb +0 -23
  54. data/app/forms/decidim/surveys/admin/survey_form.rb +0 -27
  55. data/app/forms/decidim/surveys/admin/survey_question_form.rb +0 -35
  56. data/app/forms/decidim/surveys/survey_answer_choice_form.rb +0 -15
  57. data/app/forms/decidim/surveys/survey_answer_form.rb +0 -69
  58. data/app/forms/decidim/surveys/survey_form.rb +0 -22
  59. data/app/helpers/decidim/surveys/admin/application_helper.rb +0 -19
  60. data/app/models/decidim/surveys/survey_answer.rb +0 -45
  61. data/app/models/decidim/surveys/survey_answer_choice.rb +0 -15
  62. data/app/models/decidim/surveys/survey_answer_option.rb +0 -11
  63. data/app/models/decidim/surveys/survey_question.rb +0 -36
  64. data/app/queries/decidim/surveys/survey_user_answers.rb +0 -28
  65. data/app/views/decidim/surveys/admin/surveys/_answer_option.html.erb +0 -44
  66. data/app/views/decidim/surveys/admin/surveys/_form.html.erb +0 -51
  67. data/app/views/decidim/surveys/admin/surveys/_question.html.erb +0 -115
  68. data/app/views/decidim/surveys/admin/surveys/edit.html.erb +0 -7
  69. data/app/views/decidim/surveys/surveys/_answer.html.erb +0 -94
  70. data/app/views/decidim/surveys/surveys/show.html.erb +0 -84
  71. data/lib/decidim/surveys/data_portability_survey_user_answers_serializer.rb +0 -37
  72. data/lib/decidim/surveys/survey_user_answers_serializer.rb +0 -29
@@ -1,71 +1 @@
1
1
  id:
2
- activemodel:
3
- attributes:
4
- survey_question:
5
- mandatory: Wajib
6
- max_choices: Jumlah pilihan maksimum
7
- question_type: Mengetik
8
- errors:
9
- models:
10
- survey_answer:
11
- attributes:
12
- choices:
13
- missing: tidak lengkap
14
- too_many: terlalu banyak
15
- decidim:
16
- forms:
17
- errors:
18
- survey_answer:
19
- body: Tubuh tidak boleh kosong
20
- surveys:
21
- admin:
22
- models:
23
- components:
24
- description: Deskripsi
25
- tos: Ketentuan layanan
26
- surveys:
27
- answer_option:
28
- answer_option: Opsi jawaban
29
- free_text: Teks gratis
30
- remove: Menghapus
31
- statement: Pernyataan
32
- edit:
33
- save: Menyimpan
34
- title: Judul
35
- form:
36
- add_question: Tambahkan pertanyaan
37
- already_answered_warning: Survei ini telah dijawab oleh beberapa pengguna sehingga Anda tidak dapat mengubah pertanyaannya.
38
- question:
39
- add_answer_option: Tambahkan opsi jawaban
40
- any: Apa saja
41
- description: Deskripsi
42
- down: Turun
43
- question: Pertanyaan
44
- remove: Menghapus
45
- statement: Pernyataan
46
- up: Naik
47
- question_types:
48
- long_answer: Jawaban panjang
49
- multiple_option: Pilihan ganda
50
- short_answer: Jawaban singkat
51
- single_option: Opsi tunggal
52
- sorting: Penyortiran
53
- surveys:
54
- question:
55
- max_choices: 'Pilihan maksimal: %{n}'
56
- show:
57
- answer_survey:
58
- anonymous_user_message: <a href="%{sign_in_link}">Masuk dengan akun Anda</a> atau <a href="%{sign_up_link}">mendaftar</a> untuk menjawab survei.
59
- title: Jawab survei
60
- are_you_sure: Tindakan ini tidak dapat diurungkan dan Anda tidak akan dapat mengedit jawaban Anda. Apakah kamu yakin?
61
- submit: Menyerahkan
62
- survey_answered:
63
- body: Anda telah menjawab survei ini.
64
- title: Survey menjawab
65
- survey_closed:
66
- body: Survei ditutup dan tidak dapat dijawab.
67
- title: Survey ditutup
68
- survey_for_private_users:
69
- body: Survei hanya tersedia untuk pengguna pribadi
70
- title: Survey ditutup
71
- tos_agreement: Dengan berpartisipasi dalam survei ini, Anda menerima Ketentuan Layanan
@@ -1,19 +1,5 @@
1
1
  it:
2
2
  activemodel:
3
- attributes:
4
- survey_answer:
5
- body: Risposta
6
- survey_question:
7
- mandatory: Obbligatorio
8
- max_choices: Numero massimo di scelte
9
- question_type: Tipo
10
- errors:
11
- models:
12
- survey_answer:
13
- attributes:
14
- choices:
15
- missing: non sono completi
16
- too_many: sono troppi
17
3
  models:
18
4
  decidim/surveys/closed_survey_event: Sondaggio terminato
19
5
  decidim/surveys/opened_survey_event: Sondaggio iniziato
@@ -49,69 +35,22 @@ it:
49
35
  email_outro: Hai ricevuto questa notifica perché stai seguendo %{participatory_space_title}. È possibile interrompere la ricezione di notifiche seguendo il collegamento precedente.
50
36
  email_subject: Una nuova indagine su %{participatory_space_title}
51
37
  notification_title: Il sondaggio <a href="%{resource_path}">%{resource_title}</a> in <a href="%{participatory_space_url}">%{participatory_space_title}</a> è ora aperto.
52
- forms:
53
- errors:
54
- survey_answer:
55
- body: Il corpo non può essere vuoto
38
+ metrics:
39
+ survey_answers:
40
+ description: Numero di sondaggi rispondenti dagli utenti
41
+ object: risposte ai sondaggi
42
+ title: Risposte ai sondaggi
56
43
  surveys:
57
44
  admin:
58
45
  exports:
59
46
  survey_user_answers: Risposte degli utente al questionario
60
- models:
61
- components:
62
- description: Descrizione
63
- tos: Termini del servizio
64
47
  surveys:
65
- answer_option:
66
- answer_option: Opzione di risposta
67
- free_text: Testo libero
68
- remove: Rimuovere
69
- statement: Dichiarazione
70
- edit:
71
- save: Salva
72
- title: Titolo
73
- form:
74
- add_question: Aggiungi domanda
75
- already_answered_warning: Dato che alcuni utenti hanno già risposto al questionario, non è più possibile modificare le domande.
76
- question:
77
- add_answer_option: Aggiungre opzione di risposta
78
- any: Qualunque
79
- description: Descrizione
80
- down: Giù
81
- question: Domanda
82
- remove: Rimuovere
83
- statement: Dichiarazione
84
- up: Su
85
48
  update:
86
49
  invalid: Ci sono stati degli errori durante il salvataggio dell'indagine.
87
50
  success: Il questionario è stato salvato correttamente.
88
51
  last_activity:
89
52
  new_survey_at_html: "<span>Nuovo sondaggio al %{link}</span>"
90
- question_types:
91
- long_answer: Risposta lunga
92
- multiple_option: Opzione multipla
93
- short_answer: Risposta breve
94
- single_option: Opzione unica
95
- sorting: Ordinamento
96
53
  surveys:
97
54
  answer:
98
55
  invalid: Ci sono stati degli errori durante il salvataggio dell'indagine.
99
56
  success: Il questionario è stato salvato correttamente.
100
- question:
101
- max_choices: 'Scelte massime: %{n}'
102
- show:
103
- answer_survey:
104
- 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.
105
- title: Rispondi al questionario
106
- are_you_sure: Questa azione non potrà essere cancellata e non sarà più possibile modificare le risposte. Sei sicuro?
107
- submit: Invia
108
- survey_answered:
109
- body: Hai già risposto a questo sondaggio, grazie.
110
- title: Questionario risposto
111
- survey_closed:
112
- body: L'indagine è chiusa e non è più possibile rispondere.
113
- title: Questionario chiuso
114
- survey_for_private_users:
115
- body: Il sondaggio è disponibile solo per gli utenti privati
116
- title: Sondaggio chiuso
117
- tos_agreement: Partecipando a questo sondaggio, accetti le sue condizioni di servizio
@@ -1,19 +1,5 @@
1
1
  nl:
2
2
  activemodel:
3
- attributes:
4
- survey_answer:
5
- body: Antwoorden
6
- survey_question:
7
- mandatory: Verplicht
8
- max_choices: Maximum aantal keuzes
9
- question_type: Type
10
- errors:
11
- models:
12
- survey_answer:
13
- attributes:
14
- choices:
15
- missing: zijn niet compleet
16
- too_many: zijn te veel
17
3
  models:
18
4
  decidim/surveys/closed_survey_event: Enquête beëindigd
19
5
  decidim/surveys/opened_survey_event: Enquête is gestart
@@ -49,69 +35,22 @@ nl:
49
35
  email_outro: Je hebt deze melding ontvangen omdat je %{participatory_space_title}volgt. Je kan de notificaties uitschakelen door de voorgaande link te volgen.
50
36
  email_subject: Een nieuwe enquête in %{participatory_space_title}
51
37
  notification_title: De enquête <a href="%{resource_path}">%{resource_title}</a> in <a href="%{participatory_space_url}">%{participatory_space_title}</a> is nu geopend.
52
- forms:
53
- errors:
54
- survey_answer:
55
- body: Mag niet leeg zijn
38
+ metrics:
39
+ survey_answers:
40
+ description: Aantal enquêtes beantwoord door gebruikers
41
+ object: antwoorden op enquêtes
42
+ title: Antwoorden op enquêtes
56
43
  surveys:
57
44
  admin:
58
45
  exports:
59
46
  survey_user_answers: Enquête gebruikersantwoorden
60
- models:
61
- components:
62
- description: Beschrijving
63
- tos: Servicevoorwaarden
64
47
  surveys:
65
- answer_option:
66
- answer_option: Antwoord optie
67
- free_text: Vrije tekst
68
- remove: Verwijderen
69
- statement: Stelling
70
- edit:
71
- save: Opslaan
72
- title: Titel
73
- form:
74
- add_question: Vraag toevoegen
75
- already_answered_warning: Het onderzoek is al door sommige gebruikers beantwoord, hierdoor kunt u de vragen niet meer bewerken.
76
- question:
77
- add_answer_option: Voeg antwoord optie toe
78
- any: Elk
79
- description: Omschrijving
80
- down: Omlaag
81
- question: Vraag
82
- remove: Verwijder
83
- statement: Stelling
84
- up: Omhoog
85
48
  update:
86
49
  invalid: Er zijn fouten geweest bij het opslaan van de enquête.
87
50
  success: Enquête succesvol opgeslagen.
88
51
  last_activity:
89
52
  new_survey_at_html: "<span>Nieuwe enquête op %{link}</span>"
90
- question_types:
91
- long_answer: Lang antwoord
92
- multiple_option: Meerdere opties
93
- short_answer: Kort antwoord
94
- single_option: Enkelvoudige optie
95
- sorting: Sorteren
96
53
  surveys:
97
54
  answer:
98
55
  invalid: Er zijn fouten opgetreden bij het opslaan van de pagina.
99
56
  success: Enquête met succes beantwoord.
100
- question:
101
- max_choices: 'Max. aantal keuzes: %{n}'
102
- show:
103
- answer_survey:
104
- anonymous_user_message: <a href="%{sign_in_link}">Meld u aan met uw account</a> of <a href="%{sign_up_link}">schrijf u in</a> om uw reactie toe te voegen.
105
- title: Antwoorden op de enquête
106
- are_you_sure: Deze actie kan niet ongedaan gemaakt worden en u kunt uw antwoorden niet wijzigen. Weet u het zeker?
107
- submit: Verzenden
108
- survey_answered:
109
- body: U heeft deze enquête al beantwoord.
110
- title: Enquête beantwoord
111
- survey_closed:
112
- body: De enquête is gesloten en kan niet worden beantwoord.
113
- title: Enquête gesloten
114
- survey_for_private_users:
115
- body: De enquête is alleen beschikbaar voor privé-gebruikers
116
- title: Enquête gesloten
117
- tos_agreement: Door deel te nemen aan dit onderzoek accepteert u de gebruiksvoorwaarden
@@ -1,19 +1,5 @@
1
1
  pl:
2
2
  activemodel:
3
- attributes:
4
- survey_answer:
5
- body: Odpowiedź
6
- survey_question:
7
- mandatory: Obowiązkowy
8
- max_choices: Maksymalna liczba opcji
9
- question_type: Rodzaj
10
- errors:
11
- models:
12
- survey_answer:
13
- attributes:
14
- choices:
15
- missing: nie są kompletne
16
- too_many: jest zbyt wiele
17
3
  models:
18
4
  decidim/surveys/closed_survey_event: Ankieta zakończyła się
19
5
  decidim/surveys/opened_survey_event: Rozpoczęto ankietę
@@ -53,69 +39,22 @@ pl:
53
39
  email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz %{participatory_space_title}. Możesz przestać otrzymywać powiadomienia po poprzednim linku.
54
40
  email_subject: Nowa ankieta w %{participatory_space_title}
55
41
  notification_title: Ankieta <a href="%{resource_path}">%{resource_title}</a> w <a href="%{participatory_space_url}">%{participatory_space_title}</a> jest teraz otwarta.
56
- forms:
57
- errors:
58
- survey_answer:
59
- body: Treść nie może być pusta
42
+ metrics:
43
+ survey_answers:
44
+ description: Liczba ankiet odebranych przez użytkowników
45
+ object: odpowiedzi na ankiety
46
+ title: Odpowiedzi na ankiety
60
47
  surveys:
61
48
  admin:
62
49
  exports:
63
50
  survey_user_answers: Odpowiedzi na pytania użytkowników
64
- models:
65
- components:
66
- description: Opis
67
- tos: Warunki usługi
68
51
  surveys:
69
- answer_option:
70
- answer_option: Odpowiedź
71
- free_text: Dowolny tekst
72
- remove: Usunąć
73
- statement: Komunikat
74
- edit:
75
- save: Zapisać
76
- title: Tytuł
77
- form:
78
- add_question: Dodaj pytanie
79
- already_answered_warning: Ankieta jest już udzielana przez niektórych użytkowników, więc nie można modyfikować jej pytań.
80
- question:
81
- add_answer_option: Dodaj odpowiedź
82
- any: Każdy
83
- description: Opis
84
- down: Na dół
85
- question: Pytanie
86
- remove: Usunąć
87
- statement: Komunikat
88
- up: W górę
89
52
  update:
90
53
  invalid: Podczas zapisywania ankiety wystąpiły błędy.
91
54
  success: Ankieta została zapisana pomyślnie.
92
55
  last_activity:
93
56
  new_survey_at_html: "<span>Nowa ankieta na %{link}</span>"
94
- question_types:
95
- long_answer: Długa odpowiedź
96
- multiple_option: Wiele opcji
97
- short_answer: Krótka odpowiedź
98
- single_option: Pojedyncza opcja
99
- sorting: Sortowanie
100
57
  surveys:
101
58
  answer:
102
59
  invalid: Podczas odpowiadania na ankiet pojawiły się błędy.
103
60
  success: Ankieta odpowiedziała skutecznie.
104
- question:
105
- max_choices: 'Maksymalne opcje: %{n}'
106
- show:
107
- answer_survey:
108
- anonymous_user_message: <a href="%{sign_in_link}">Zaloguj się na swoje konto</a> lub <a href="%{sign_up_link}">zarejestruj się</a>, aby odpowiedzieć na ankietę.
109
- title: Odbierz ankietę
110
- are_you_sure: Ta czynność nie może zostać cofnięta i nie będzie można edytować odpowiedzi. Jesteś pewny?
111
- submit: Zatwierdź
112
- survey_answered:
113
- body: Odpowiedziałeś już na to pytanie.
114
- title: Ankieta odpowiedziała
115
- survey_closed:
116
- body: Ankieta jest zamknięta i nie można jej odpowiedzieć.
117
- title: Ankieta zamknięta
118
- survey_for_private_users:
119
- body: Ankieta jest dostępna tylko dla użytkowników prywatnych
120
- title: Ankieta została zamknięta
121
- tos_agreement: Uczestnicząc w tym ankiecie akceptujesz Warunki korzystania z usługi
@@ -1,19 +1,5 @@
1
1
  pt-BR:
2
2
  activemodel:
3
- attributes:
4
- survey_answer:
5
- body: Responda
6
- survey_question:
7
- mandatory: Obrigatório
8
- max_choices: Número máximo de escolhas
9
- question_type: Tipo
10
- errors:
11
- models:
12
- survey_answer:
13
- attributes:
14
- choices:
15
- missing: não estão completos
16
- too_many: são muitos
17
3
  models:
18
4
  decidim/surveys/closed_survey_event: Estudo finalizado
19
5
  decidim/surveys/opened_survey_event: Enquete iniciada
@@ -49,69 +35,22 @@ pt-BR:
49
35
  email_outro: Você recebeu esta notificação porque está seguindo %{participatory_space_title}. Você pode parar de receber notificações após o link anterior.
50
36
  email_subject: Uma nova pesquisa em %{participatory_space_title}
51
37
  notification_title: A pesquisa <a href="%{resource_path}">%{resource_title}</a> em <a href="%{participatory_space_url}">%{participatory_space_title}</a> está agora aberta.
52
- forms:
53
- errors:
54
- survey_answer:
55
- body: O corpo não pode ficar em branco
38
+ metrics:
39
+ survey_answers:
40
+ description: Número de pesquisas respondidas por usuários
41
+ object: respostas para pesquisas
42
+ title: Respostas para pesquisas
56
43
  surveys:
57
44
  admin:
58
45
  exports:
59
46
  survey_user_answers: Avalie as respostas dos usuários
60
- models:
61
- components:
62
- description: Descrição
63
- tos: Termos de serviço
64
47
  surveys:
65
- answer_option:
66
- answer_option: Opção de resposta
67
- free_text: Texto livre
68
- remove: Remover
69
- statement: Declaração
70
- edit:
71
- save: Salvar
72
- title: Título
73
- form:
74
- add_question: Adicionar pergunta
75
- already_answered_warning: A pesquisa já foi respondida por alguns usuários para que você não possa modificar suas perguntas.
76
- question:
77
- add_answer_option: Adicionar opção de resposta
78
- any: Qualquer
79
- description: Descrição
80
- down: Baixa
81
- question: Questão
82
- remove: Remover
83
- statement: Declaração
84
- up: Acima
85
48
  update:
86
49
  invalid: Houve erros ao salvar a pesquisa.
87
50
  success: Pesquisa salva com sucesso.
88
51
  last_activity:
89
52
  new_survey_at_html: "<span>Nova pesquisa em %{link}</span>"
90
- question_types:
91
- long_answer: Resposta longa
92
- multiple_option: Opção múltipla
93
- short_answer: Resposta curta
94
- single_option: Opção única
95
- sorting: Classificação
96
53
  surveys:
97
54
  answer:
98
55
  invalid: Houve erros ao responder a pesquisa.
99
56
  success: Pesquisa respondida com sucesso.
100
- question:
101
- max_choices: 'Escolhas máximas: %{n}'
102
- show:
103
- answer_survey:
104
- 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.
105
- title: Responda a pesquisa
106
- are_you_sure: Esta ação não pode ser desfeita e você não poderá editar suas respostas. Você tem certeza?
107
- submit: Enviar
108
- survey_answered:
109
- body: Você já respondeu esta pesquisa.
110
- title: Pesquisa respondida
111
- survey_closed:
112
- body: A pesquisa está fechada e não pode ser respondida.
113
- title: Pesquisa fechada
114
- survey_for_private_users:
115
- body: A pesquisa está disponível apenas para usuários particulares
116
- title: Inquérito encerrado
117
- tos_agreement: Ao participar desta pesquisa você aceita seus Termos de Serviço