decidim-surveys 0.29.5 → 0.30.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/app/cells/decidim/surveys/survey_card_metadata_cell.rb +43 -0
 - data/app/cells/decidim/surveys/survey_cell.rb +26 -0
 - data/app/cells/decidim/surveys/survey_l_cell.rb +34 -0
 - data/app/cells/decidim/surveys/survey_s_cell.rb +21 -0
 - data/app/commands/decidim/surveys/admin/create_survey.rb +21 -0
 - data/app/commands/decidim/surveys/admin/publish_survey.rb +58 -0
 - data/app/commands/decidim/surveys/admin/unpublish_survey.rb +44 -0
 - data/app/commands/decidim/surveys/admin/update_survey.rb +62 -0
 - data/app/commands/decidim/surveys/publish_answers.rb +55 -0
 - data/app/commands/decidim/surveys/unpublish_answers.rb +55 -0
 - data/app/controllers/concerns/decidim/surveys/admin/filterable.rb +23 -0
 - data/app/controllers/decidim/surveys/admin/answers_controller.rb +73 -0
 - data/app/controllers/decidim/surveys/admin/publish_answers_controller.rb +66 -0
 - data/app/controllers/decidim/surveys/admin/surveys_controller.rb +99 -11
 - data/app/controllers/decidim/surveys/surveys_controller.rb +50 -5
 - data/app/forms/decidim/surveys/admin/survey_form.rb +18 -0
 - data/app/helpers/decidim/surveys/application_helper.rb +34 -0
 - data/app/helpers/decidim/surveys/publish_answers_helper.rb +104 -0
 - data/app/helpers/decidim/surveys/survey_helper.rb +4 -0
 - data/app/models/decidim/surveys/survey.rb +67 -12
 - data/app/permissions/decidim/surveys/admin/permissions.rb +10 -3
 - data/app/permissions/decidim/surveys/permissions.rb +0 -2
 - data/app/presenters/decidim/surveys/admin_log/survey_presenter.rb +34 -0
 - data/app/queries/decidim/surveys/metrics/answers_metric_manage.rb +3 -3
 - data/app/queries/decidim/surveys/metrics/survey_participants_metric_measure.rb +2 -2
 - data/app/views/decidim/surveys/admin/answers/index.html.erb +49 -0
 - data/app/views/decidim/surveys/admin/answers/show.html.erb +43 -0
 - data/app/views/decidim/surveys/admin/publish_answers/_toggle_button.html.erb +22 -0
 - data/app/views/decidim/surveys/admin/publish_answers/index.html.erb +44 -0
 - data/app/views/decidim/surveys/admin/surveys/_form.html.erb +28 -0
 - data/app/views/decidim/surveys/admin/surveys/edit.html.erb +4 -21
 - data/app/views/decidim/surveys/admin/surveys/edit_questions.html.erb +47 -0
 - data/app/views/decidim/surveys/admin/surveys/index.html.erb +51 -0
 - data/app/views/decidim/surveys/surveys/_published_questions_answers.html.erb +13 -0
 - data/app/views/decidim/surveys/surveys/_surveys.html.erb +13 -0
 - data/app/views/decidim/surveys/surveys/index.html.erb +27 -0
 - data/app/views/decidim/surveys/surveys/index.js.erb +4 -0
 - data/app/views/decidim/surveys/surveys/not_allowed.html.erb +22 -0
 - data/config/locales/ar.yml +4 -3
 - data/config/locales/bg.yml +0 -14
 - data/config/locales/ca.yml +83 -14
 - data/config/locales/cs.yml +87 -14
 - data/config/locales/de.yml +83 -14
 - data/config/locales/el.yml +0 -11
 - data/config/locales/en.yml +83 -14
 - data/config/locales/es-MX.yml +83 -14
 - data/config/locales/es-PY.yml +83 -14
 - data/config/locales/es.yml +83 -14
 - data/config/locales/eu.yml +83 -14
 - data/config/locales/fi-plain.yml +83 -14
 - data/config/locales/fi.yml +83 -14
 - data/config/locales/fr-CA.yml +74 -14
 - data/config/locales/fr.yml +74 -14
 - data/config/locales/ga-IE.yml +0 -4
 - data/config/locales/gl.yml +0 -10
 - data/config/locales/hu.yml +0 -3
 - data/config/locales/id-ID.yml +0 -2
 - data/config/locales/is-IS.yml +0 -2
 - data/config/locales/it.yml +3 -14
 - data/config/locales/ja.yml +86 -19
 - data/config/locales/lb.yml +0 -10
 - data/config/locales/lt.yml +0 -11
 - data/config/locales/lv.yml +0 -3
 - data/config/locales/nl.yml +0 -10
 - data/config/locales/no.yml +0 -10
 - data/config/locales/pl.yml +0 -14
 - data/config/locales/pt-BR.yml +0 -14
 - data/config/locales/pt.yml +0 -10
 - data/config/locales/ro-RO.yml +0 -11
 - data/config/locales/ru.yml +0 -2
 - data/config/locales/sk.yml +0 -3
 - data/config/locales/sv.yml +0 -14
 - data/config/locales/tr-TR.yml +0 -16
 - data/config/locales/uk.yml +0 -2
 - data/config/locales/zh-CN.yml +0 -6
 - data/config/locales/zh-TW.yml +0 -11
 - data/db/migrate/20240828103030_add_deleted_at_to_decidim_surveys_surveys.rb +8 -0
 - data/db/migrate/20240925124312_add_settings_to_decidim_surveys_surveys.rb +42 -0
 - data/db/migrate/20250115193836_add_allow_survey_editing.rb +7 -0
 - data/decidim-surveys.gemspec +1 -1
 - data/lib/decidim/api/survey_type.rb +2 -2
 - data/lib/decidim/api/surveys_type.rb +4 -5
 - data/lib/decidim/surveys/admin_engine.rb +15 -5
 - data/lib/decidim/surveys/component.rb +7 -24
 - data/lib/decidim/surveys/engine.rb +2 -2
 - data/lib/decidim/surveys/seeds.rb +115 -10
 - data/lib/decidim/surveys/test/factories.rb +24 -0
 - data/lib/decidim/surveys/version.rb +1 -1
 - metadata +48 -19
 - data/app/commands/decidim/surveys/create_survey.rb +0 -19
 - data/app/views/decidim/surveys/admin/component/_actions.html.erb +0 -44
 - data/config/locales/ca-IT.yml +0 -77
 
    
        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.30.0.rc1
         
     | 
| 
       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: 2025- 
     | 
| 
      
 13 
     | 
    
         
            +
            date: 2025-02-18 00:00:00.000000000 Z
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies:
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       16 
16 
     | 
    
         
             
              name: decidim-core
         
     | 
| 
         @@ -18,84 +18,84 @@ dependencies: 
     | 
|
| 
       18 
18 
     | 
    
         
             
                requirements:
         
     | 
| 
       19 
19 
     | 
    
         
             
                - - '='
         
     | 
| 
       20 
20 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       21 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 21 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       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.30.0.rc1
         
     | 
| 
       29 
29 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       30 
30 
     | 
    
         
             
              name: decidim-forms
         
     | 
| 
       31 
31 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       32 
32 
     | 
    
         
             
                requirements:
         
     | 
| 
       33 
33 
     | 
    
         
             
                - - '='
         
     | 
| 
       34 
34 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       35 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 35 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       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: 0. 
     | 
| 
      
 42 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       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. 
     | 
| 
      
 49 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       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.30.0.rc1
         
     | 
| 
       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. 
     | 
| 
      
 63 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       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.30.0.rc1
         
     | 
| 
       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. 
     | 
| 
      
 77 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       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. 
     | 
| 
      
 84 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       85 
85 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       86 
86 
     | 
    
         
             
              name: decidim-templates
         
     | 
| 
       87 
87 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       88 
88 
     | 
    
         
             
                requirements:
         
     | 
| 
       89 
89 
     | 
    
         
             
                - - '='
         
     | 
| 
       90 
90 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       91 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 91 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       92 
92 
     | 
    
         
             
              type: :development
         
     | 
| 
       93 
93 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       94 
94 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       95 
95 
     | 
    
         
             
                requirements:
         
     | 
| 
       96 
96 
     | 
    
         
             
                - - '='
         
     | 
| 
       97 
97 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       98 
     | 
    
         
            -
                    version: 0. 
     | 
| 
      
 98 
     | 
    
         
            +
                    version: 0.30.0.rc1
         
     | 
| 
       99 
99 
     | 
    
         
             
            description: A surveys component for decidim's participatory spaces.
         
     | 
| 
       100 
100 
     | 
    
         
             
            email:
         
     | 
| 
       101 
101 
     | 
    
         
             
            - josepjaume@gmail.com
         
     | 
| 
         @@ -108,13 +108,28 @@ files: 
     | 
|
| 
       108 
108 
     | 
    
         
             
            - README.md
         
     | 
| 
       109 
109 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       110 
110 
     | 
    
         
             
            - app/cells/decidim/surveys/survey_activity_cell.rb
         
     | 
| 
       111 
     | 
    
         
            -
            - app/ 
     | 
| 
      
 111 
     | 
    
         
            +
            - app/cells/decidim/surveys/survey_card_metadata_cell.rb
         
     | 
| 
      
 112 
     | 
    
         
            +
            - app/cells/decidim/surveys/survey_cell.rb
         
     | 
| 
      
 113 
     | 
    
         
            +
            - app/cells/decidim/surveys/survey_l_cell.rb
         
     | 
| 
      
 114 
     | 
    
         
            +
            - app/cells/decidim/surveys/survey_s_cell.rb
         
     | 
| 
      
 115 
     | 
    
         
            +
            - app/commands/decidim/surveys/admin/create_survey.rb
         
     | 
| 
      
 116 
     | 
    
         
            +
            - app/commands/decidim/surveys/admin/publish_survey.rb
         
     | 
| 
      
 117 
     | 
    
         
            +
            - app/commands/decidim/surveys/admin/unpublish_survey.rb
         
     | 
| 
      
 118 
     | 
    
         
            +
            - app/commands/decidim/surveys/admin/update_survey.rb
         
     | 
| 
      
 119 
     | 
    
         
            +
            - app/commands/decidim/surveys/publish_answers.rb
         
     | 
| 
      
 120 
     | 
    
         
            +
            - app/commands/decidim/surveys/unpublish_answers.rb
         
     | 
| 
      
 121 
     | 
    
         
            +
            - app/controllers/concerns/decidim/surveys/admin/filterable.rb
         
     | 
| 
      
 122 
     | 
    
         
            +
            - app/controllers/decidim/surveys/admin/answers_controller.rb
         
     | 
| 
       112 
123 
     | 
    
         
             
            - app/controllers/decidim/surveys/admin/application_controller.rb
         
     | 
| 
      
 124 
     | 
    
         
            +
            - app/controllers/decidim/surveys/admin/publish_answers_controller.rb
         
     | 
| 
       113 
125 
     | 
    
         
             
            - app/controllers/decidim/surveys/admin/surveys_controller.rb
         
     | 
| 
       114 
126 
     | 
    
         
             
            - app/controllers/decidim/surveys/application_controller.rb
         
     | 
| 
       115 
127 
     | 
    
         
             
            - app/controllers/decidim/surveys/surveys_controller.rb
         
     | 
| 
       116 
128 
     | 
    
         
             
            - app/events/decidim/surveys/closed_survey_event.rb
         
     | 
| 
       117 
129 
     | 
    
         
             
            - app/events/decidim/surveys/opened_survey_event.rb
         
     | 
| 
      
 130 
     | 
    
         
            +
            - app/forms/decidim/surveys/admin/survey_form.rb
         
     | 
| 
      
 131 
     | 
    
         
            +
            - app/helpers/decidim/surveys/application_helper.rb
         
     | 
| 
      
 132 
     | 
    
         
            +
            - app/helpers/decidim/surveys/publish_answers_helper.rb
         
     | 
| 
       118 
133 
     | 
    
         
             
            - app/helpers/decidim/surveys/survey_helper.rb
         
     | 
| 
       119 
134 
     | 
    
         
             
            - app/jobs/decidim/surveys/clean_survey_answers_job.rb
         
     | 
| 
       120 
135 
     | 
    
         
             
            - app/jobs/decidim/surveys/settings_change_job.rb
         
     | 
| 
         @@ -123,14 +138,26 @@ files: 
     | 
|
| 
       123 
138 
     | 
    
         
             
            - app/models/decidim/surveys/survey.rb
         
     | 
| 
       124 
139 
     | 
    
         
             
            - app/permissions/decidim/surveys/admin/permissions.rb
         
     | 
| 
       125 
140 
     | 
    
         
             
            - app/permissions/decidim/surveys/permissions.rb
         
     | 
| 
      
 141 
     | 
    
         
            +
            - app/presenters/decidim/surveys/admin_log/survey_presenter.rb
         
     | 
| 
       126 
142 
     | 
    
         
             
            - app/queries/decidim/surveys/metrics/answers_metric_manage.rb
         
     | 
| 
       127 
143 
     | 
    
         
             
            - app/queries/decidim/surveys/metrics/survey_participants_metric_measure.rb
         
     | 
| 
       128 
144 
     | 
    
         
             
            - app/serializers/decidim/surveys/data_importer.rb
         
     | 
| 
       129 
145 
     | 
    
         
             
            - app/serializers/decidim/surveys/data_serializer.rb
         
     | 
| 
       130 
     | 
    
         
            -
            - app/views/decidim/surveys/admin/ 
     | 
| 
      
 146 
     | 
    
         
            +
            - app/views/decidim/surveys/admin/answers/index.html.erb
         
     | 
| 
      
 147 
     | 
    
         
            +
            - app/views/decidim/surveys/admin/answers/show.html.erb
         
     | 
| 
      
 148 
     | 
    
         
            +
            - app/views/decidim/surveys/admin/publish_answers/_toggle_button.html.erb
         
     | 
| 
      
 149 
     | 
    
         
            +
            - app/views/decidim/surveys/admin/publish_answers/index.html.erb
         
     | 
| 
      
 150 
     | 
    
         
            +
            - app/views/decidim/surveys/admin/surveys/_form.html.erb
         
     | 
| 
       131 
151 
     | 
    
         
             
            - app/views/decidim/surveys/admin/surveys/edit.html.erb
         
     | 
| 
      
 152 
     | 
    
         
            +
            - app/views/decidim/surveys/admin/surveys/edit_questions.html.erb
         
     | 
| 
      
 153 
     | 
    
         
            +
            - app/views/decidim/surveys/admin/surveys/index.html.erb
         
     | 
| 
       132 
154 
     | 
    
         
             
            - app/views/decidim/surveys/survey_confirmation_mailer/confirmation.html.erb
         
     | 
| 
      
 155 
     | 
    
         
            +
            - app/views/decidim/surveys/surveys/_published_questions_answers.html.erb
         
     | 
| 
      
 156 
     | 
    
         
            +
            - app/views/decidim/surveys/surveys/_surveys.html.erb
         
     | 
| 
      
 157 
     | 
    
         
            +
            - app/views/decidim/surveys/surveys/index.html.erb
         
     | 
| 
      
 158 
     | 
    
         
            +
            - app/views/decidim/surveys/surveys/index.js.erb
         
     | 
| 
       133 
159 
     | 
    
         
             
            - app/views/decidim/surveys/surveys/no_permission.html.erb
         
     | 
| 
      
 160 
     | 
    
         
            +
            - app/views/decidim/surveys/surveys/not_allowed.html.erb
         
     | 
| 
       134 
161 
     | 
    
         
             
            - config/assets.rb
         
     | 
| 
       135 
162 
     | 
    
         
             
            - config/locales/am-ET.yml
         
     | 
| 
       136 
163 
     | 
    
         
             
            - config/locales/ar-SA.yml
         
     | 
| 
         @@ -139,7 +166,6 @@ files: 
     | 
|
| 
       139 
166 
     | 
    
         
             
            - config/locales/bg.yml
         
     | 
| 
       140 
167 
     | 
    
         
             
            - config/locales/bn-BD.yml
         
     | 
| 
       141 
168 
     | 
    
         
             
            - config/locales/bs-BA.yml
         
     | 
| 
       142 
     | 
    
         
            -
            - config/locales/ca-IT.yml
         
     | 
| 
       143 
169 
     | 
    
         
             
            - config/locales/ca.yml
         
     | 
| 
       144 
170 
     | 
    
         
             
            - config/locales/cs-CZ.yml
         
     | 
| 
       145 
171 
     | 
    
         
             
            - config/locales/cs.yml
         
     | 
| 
         @@ -237,6 +263,9 @@ files: 
     | 
|
| 
       237 
263 
     | 
    
         
             
            - db/migrate/20200610090725_remove_survey_answers.rb
         
     | 
| 
       238 
264 
     | 
    
         
             
            - db/migrate/20200610090845_remove_survey_questions.rb
         
     | 
| 
       239 
265 
     | 
    
         
             
            - db/migrate/20200610105927_remove_survey_columns.rb
         
     | 
| 
      
 266 
     | 
    
         
            +
            - db/migrate/20240828103030_add_deleted_at_to_decidim_surveys_surveys.rb
         
     | 
| 
      
 267 
     | 
    
         
            +
            - db/migrate/20240925124312_add_settings_to_decidim_surveys_surveys.rb
         
     | 
| 
      
 268 
     | 
    
         
            +
            - db/migrate/20250115193836_add_allow_survey_editing.rb
         
     | 
| 
       240 
269 
     | 
    
         
             
            - decidim-surveys.gemspec
         
     | 
| 
       241 
270 
     | 
    
         
             
            - lib/decidim/api/survey_type.rb
         
     | 
| 
       242 
271 
     | 
    
         
             
            - lib/decidim/api/surveys_type.rb
         
     | 
| 
         @@ -267,14 +296,14 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       267 
296 
     | 
    
         
             
              requirements:
         
     | 
| 
       268 
297 
     | 
    
         
             
              - - "~>"
         
     | 
| 
       269 
298 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       270 
     | 
    
         
            -
                  version: 3. 
     | 
| 
      
 299 
     | 
    
         
            +
                  version: 3.3.0
         
     | 
| 
       271 
300 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       272 
301 
     | 
    
         
             
              requirements:
         
     | 
| 
       273 
302 
     | 
    
         
             
              - - ">="
         
     | 
| 
       274 
303 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       275 
304 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       276 
305 
     | 
    
         
             
            requirements: []
         
     | 
| 
       277 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 306 
     | 
    
         
            +
            rubygems_version: 3.5.11
         
     | 
| 
       278 
307 
     | 
    
         
             
            signing_key:
         
     | 
| 
       279 
308 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       280 
309 
     | 
    
         
             
            summary: Decidim surveys module
         
     | 
| 
         @@ -1,19 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module Decidim
         
     | 
| 
       4 
     | 
    
         
            -
              module Surveys
         
     | 
| 
       5 
     | 
    
         
            -
                # Command that gets called whenever a component's survey has to be created. It
         
     | 
| 
       6 
     | 
    
         
            -
                # usually happens as a callback when the component itself is created.
         
     | 
| 
       7 
     | 
    
         
            -
                class CreateSurvey < Decidim::Command
         
     | 
| 
       8 
     | 
    
         
            -
                  def initialize(component)
         
     | 
| 
       9 
     | 
    
         
            -
                    @component = component
         
     | 
| 
       10 
     | 
    
         
            -
                  end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
                  def call
         
     | 
| 
       13 
     | 
    
         
            -
                    @survey = Survey.new(component: @component, questionnaire: Decidim::Forms::Questionnaire.new)
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
                    @survey.save ? broadcast(:ok) : broadcast(:invalid)
         
     | 
| 
       16 
     | 
    
         
            -
                  end
         
     | 
| 
       17 
     | 
    
         
            -
                end
         
     | 
| 
       18 
     | 
    
         
            -
              end
         
     | 
| 
       19 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,44 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            <% if component.manifest.admin_engine %>
         
     | 
| 
       2 
     | 
    
         
            -
              <%= icon_link_to "pencil-line", manage_component_path(component), t("actions.manage", scope: "decidim.admin"), class: "action-icon--manage" %>
         
     | 
| 
       3 
     | 
    
         
            -
            <% else %>
         
     | 
| 
       4 
     | 
    
         
            -
              <span class="action-space icon"></span>
         
     | 
| 
       5 
     | 
    
         
            -
            <% end %>
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            <% if allowed_to? :share, :component, component: component %>
         
     | 
| 
       8 
     | 
    
         
            -
              <%= icon_link_to "share-line", url_for(action: :share, id: component, controller: "components"), t("actions.share", scope: "decidim.admin"), target: :blank, class: "action-icon--share" %>
         
     | 
| 
       9 
     | 
    
         
            -
            <% else %>
         
     | 
| 
       10 
     | 
    
         
            -
              <span class="action-space icon"></span>
         
     | 
| 
       11 
     | 
    
         
            -
            <% end %>
         
     | 
| 
       12 
     | 
    
         
            -
            <% if allowed_to? :update, :component, component: component %>
         
     | 
| 
       13 
     | 
    
         
            -
              <%= icon_link_to "settings-4-line", url_for(action: :edit, id: component, controller: "components"), t("actions.configure", scope: "decidim.admin"), class: "action-icon--configure" %>
         
     | 
| 
       14 
     | 
    
         
            -
            <% else %>
         
     | 
| 
       15 
     | 
    
         
            -
              <span class="action-space icon"></span>
         
     | 
| 
       16 
     | 
    
         
            -
            <% end %>
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            <% if allowed_to?(:update, :component, component: component) %>
         
     | 
| 
       19 
     | 
    
         
            -
              <% if component.published? %>
         
     | 
| 
       20 
     | 
    
         
            -
                <%= icon_link_to "close-circle-line", url_for(action: :unpublish, id: component, controller: "components"), t("actions.unpublish", scope: "decidim.admin"), class: "action-icon--unpublish", method: :put %>
         
     | 
| 
       21 
     | 
    
         
            -
              <% else %>
         
     | 
| 
       22 
     | 
    
         
            -
                <%= icon_link_to "check-line", url_for(action: :publish, id: component, controller: "components"), t("actions.publish", scope: "decidim.admin"), class: "action-icon--publish", method: :put, data: { confirm: t(".answers_alert") } %>
         
     | 
| 
       23 
     | 
    
         
            -
              <% end %>
         
     | 
| 
       24 
     | 
    
         
            -
            <% else %>
         
     | 
| 
       25 
     | 
    
         
            -
              <span class="action-space icon"></span>
         
     | 
| 
       26 
     | 
    
         
            -
            <% end %>
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
            <%= icon_link_to "eye-line", main_component_path(component), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %>
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
            <% if allowed_to? :update, :component, component: component %>
         
     | 
| 
       31 
     | 
    
         
            -
              <% if component.manifest.actions.empty? %>
         
     | 
| 
       32 
     | 
    
         
            -
                <%= icon "key-2-line", class: "action-icon action-icon--disabled" %>
         
     | 
| 
       33 
     | 
    
         
            -
              <% else %>
         
     | 
| 
       34 
     | 
    
         
            -
                <%= icon_link_to "key-2-line", url_for(action: :edit, component_id: component, controller: "component_permissions"), t("actions.permissions", scope: "decidim.admin"), class: "action-icon--permissions" %>
         
     | 
| 
       35 
     | 
    
         
            -
              <% end %>
         
     | 
| 
       36 
     | 
    
         
            -
            <% else %>
         
     | 
| 
       37 
     | 
    
         
            -
              <span class="action-space icon"></span>
         
     | 
| 
       38 
     | 
    
         
            -
            <% end %>
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
            <% if allowed_to? :destroy, :component, component: component %>
         
     | 
| 
       41 
     | 
    
         
            -
              <%= icon_link_to "delete-bin-line", url_for(action: :destroy, id: component, controller: "components"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %>
         
     | 
| 
       42 
     | 
    
         
            -
            <% else %>
         
     | 
| 
       43 
     | 
    
         
            -
              <span class="action-space icon"></span>
         
     | 
| 
       44 
     | 
    
         
            -
            <% end %>
         
     | 
    
        data/config/locales/ca-IT.yml
    DELETED
    
    | 
         @@ -1,77 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            ---
         
     | 
| 
       2 
     | 
    
         
            -
            ca-IT:
         
     | 
| 
       3 
     | 
    
         
            -
              activemodel:
         
     | 
| 
       4 
     | 
    
         
            -
                models:
         
     | 
| 
       5 
     | 
    
         
            -
                  decidim/surveys/closed_survey_event: Ha acabat l'enquesta
         
     | 
| 
       6 
     | 
    
         
            -
                  decidim/surveys/opened_survey_event: Ha començat l'enquesta
         
     | 
| 
       7 
     | 
    
         
            -
              activerecord:
         
     | 
| 
       8 
     | 
    
         
            -
                models:
         
     | 
| 
       9 
     | 
    
         
            -
                  decidim/surveys/survey:
         
     | 
| 
       10 
     | 
    
         
            -
                    one: Enquesta
         
     | 
| 
       11 
     | 
    
         
            -
                    other: Enquestes
         
     | 
| 
       12 
     | 
    
         
            -
                  decidim/surveys/survey_answer:
         
     | 
| 
       13 
     | 
    
         
            -
                    one: Resposta
         
     | 
| 
       14 
     | 
    
         
            -
                    other: Respostes
         
     | 
| 
       15 
     | 
    
         
            -
              decidim:
         
     | 
| 
       16 
     | 
    
         
            -
                components:
         
     | 
| 
       17 
     | 
    
         
            -
                  surveys:
         
     | 
| 
       18 
     | 
    
         
            -
                    actions:
         
     | 
| 
       19 
     | 
    
         
            -
                      answer: Respondre
         
     | 
| 
       20 
     | 
    
         
            -
                    name: Enquesta
         
     | 
| 
       21 
     | 
    
         
            -
                    settings:
         
     | 
| 
       22 
     | 
    
         
            -
                      global:
         
     | 
| 
       23 
     | 
    
         
            -
                        announcement: Avís
         
     | 
| 
       24 
     | 
    
         
            -
                        clean_after_publish: Esborrar les respostes en publicar l'enquesta
         
     | 
| 
       25 
     | 
    
         
            -
                        ends_at: Respostes acceptades fins a
         
     | 
| 
       26 
     | 
    
         
            -
                        ends_at_help: Deixar en blanc per cap data específica
         
     | 
| 
       27 
     | 
    
         
            -
                        scope_id: Àmbit
         
     | 
| 
       28 
     | 
    
         
            -
                        scopes_enabled: Àmbits habilitats
         
     | 
| 
       29 
     | 
    
         
            -
                        starts_at: Respostes acceptades de
         
     | 
| 
       30 
     | 
    
         
            -
                        starts_at_help: Deixar en blanc per cap data específica
         
     | 
| 
       31 
     | 
    
         
            -
                      step:
         
     | 
| 
       32 
     | 
    
         
            -
                        allow_answers: Permetre respostes
         
     | 
| 
       33 
     | 
    
         
            -
                        allow_unregistered: Permet a usuàries no registrades contestar l'enquesta
         
     | 
| 
       34 
     | 
    
         
            -
                        allow_unregistered_help: Si està activat, no serà necessari iniciar sessió per a respondre l'enquesta. Això pot implicar una recollida de dades pobra o poc fiable i serà més vulnerable a atacs automatitzats. Fes-ho servir amb precaució! És important que una participant pugui respondre a la mateixa enquesta diverses vegades, fent servir diferents navegador o la funció de "navegació privada" del seu navegadro web.
         
     | 
| 
       35 
     | 
    
         
            -
                        announcement: Avís
         
     | 
| 
       36 
     | 
    
         
            -
                events:
         
     | 
| 
       37 
     | 
    
         
            -
                  surveys:
         
     | 
| 
       38 
     | 
    
         
            -
                    survey_closed:
         
     | 
| 
       39 
     | 
    
         
            -
                      email_intro: L'enquesta %{resource_title} a %{participatory_space_title} ha estat tancada.
         
     | 
| 
       40 
     | 
    
         
            -
                      email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior.
         
     | 
| 
       41 
     | 
    
         
            -
                      email_subject: S'ha acabat una enquesta a %{participatory_space_title}
         
     | 
| 
       42 
     | 
    
         
            -
                      notification_title: L'enquesta <a href="%{resource_path}">%{resource_title}</a> a <a href="%{participatory_space_url}">%{participatory_space_title}</a> ha acabat.
         
     | 
| 
       43 
     | 
    
         
            -
                    survey_opened:
         
     | 
| 
       44 
     | 
    
         
            -
                      email_intro: 'L''enquesta %{resource_title} a %{participatory_space_title} ja està oberta. Pots participar-hi des d''aquesta pàgina:'
         
     | 
| 
       45 
     | 
    
         
            -
                      email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior.
         
     | 
| 
       46 
     | 
    
         
            -
                      email_subject: Una nova enquesta a %{participatory_space_title}
         
     | 
| 
       47 
     | 
    
         
            -
                      notification_title: L'enquesta <a href="%{resource_path}">%{resource_title}</a> en <a href="%{participatory_space_url}">%{participatory_space_title}</a> ja està oberta.
         
     | 
| 
       48 
     | 
    
         
            -
                metrics:
         
     | 
| 
       49 
     | 
    
         
            -
                  survey_answers:
         
     | 
| 
       50 
     | 
    
         
            -
                    description: Nombre d'enquestes contestades per les participants
         
     | 
| 
       51 
     | 
    
         
            -
                    object: respostes a enquestes
         
     | 
| 
       52 
     | 
    
         
            -
                    title: Respostes a enquestes
         
     | 
| 
       53 
     | 
    
         
            -
                statistics:
         
     | 
| 
       54 
     | 
    
         
            -
                  answers_count: Respostes
         
     | 
| 
       55 
     | 
    
         
            -
                surveys:
         
     | 
| 
       56 
     | 
    
         
            -
                  admin:
         
     | 
| 
       57 
     | 
    
         
            -
                    component:
         
     | 
| 
       58 
     | 
    
         
            -
                      actions:
         
     | 
| 
       59 
     | 
    
         
            -
                        answers_alert: Si publiques el component, s'eliminaran tots els resultats.
         
     | 
| 
       60 
     | 
    
         
            -
                    exports:
         
     | 
| 
       61 
     | 
    
         
            -
                      survey_user_answers: Respostes de les participants de l'enquesta
         
     | 
| 
       62 
     | 
    
         
            -
                    surveys:
         
     | 
| 
       63 
     | 
    
         
            -
                      update:
         
     | 
| 
       64 
     | 
    
         
            -
                        invalid: S'ha produït un error en desar l'enquesta.
         
     | 
| 
       65 
     | 
    
         
            -
                        success: Enquesta desada correctament.
         
     | 
| 
       66 
     | 
    
         
            -
                  last_activity:
         
     | 
| 
       67 
     | 
    
         
            -
                    new_survey: 'Nova enquesta:'
         
     | 
| 
       68 
     | 
    
         
            -
                  survey_confirmation_mailer:
         
     | 
| 
       69 
     | 
    
         
            -
                    confirmation:
         
     | 
| 
       70 
     | 
    
         
            -
                      body: Has respost amb èxit a l'enquesta %{questionnaire_title} dins de %{participatory_space}
         
     | 
| 
       71 
     | 
    
         
            -
                      subject: Confirmació de resposta al qüestionari %{questionnaire_title}
         
     | 
| 
       72 
     | 
    
         
            -
                    export_name: Respostes a l'enquesta
         
     | 
| 
       73 
     | 
    
         
            -
                  surveys:
         
     | 
| 
       74 
     | 
    
         
            -
                    answer:
         
     | 
| 
       75 
     | 
    
         
            -
                      invalid: S'ha produït un error en respondre l'enquesta.
         
     | 
| 
       76 
     | 
    
         
            -
                      spam_detected: Hi ha hagut un problema responent el formulari. Potser has anat massa ràpid, ho pots tornar a intentar?
         
     | 
| 
       77 
     | 
    
         
            -
                      success: Enquesta resposta correctament.
         
     |