decidim-consultations 0.23.1 → 0.24.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/consultations/consultation_m_cell.rb +2 -0
  3. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +4 -9
  4. data/app/commands/decidim/consultations/admin/update_consultation.rb +3 -0
  5. data/app/commands/decidim/consultations/admin/update_question.rb +13 -5
  6. data/app/helpers/decidim/consultations/admin/consultation_menu_helper.rb +15 -0
  7. data/app/helpers/decidim/consultations/questions_helper.rb +2 -0
  8. data/app/views/decidim/consultations/admin/consultations/index.html.erb +4 -0
  9. data/app/views/decidim/consultations/admin/questions/index.html.erb +4 -0
  10. data/app/views/decidim/consultations/admin/response_groups/index.html.erb +2 -0
  11. data/app/views/decidim/consultations/admin/responses/index.html.erb +2 -0
  12. data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +1 -1
  13. data/app/views/decidim/consultations/consultations/_filters_small_view.html.erb +1 -1
  14. data/app/views/layouts/decidim/admin/consultation.html.erb +8 -23
  15. data/app/views/layouts/decidim/admin/consultations.html.erb +4 -0
  16. data/config/locales/ar.yml +0 -2
  17. data/config/locales/ca.yml +3 -2
  18. data/config/locales/cs.yml +9 -8
  19. data/config/locales/de.yml +8 -7
  20. data/config/locales/el.yml +0 -2
  21. data/config/locales/en.yml +3 -2
  22. data/config/locales/es-MX.yml +3 -2
  23. data/config/locales/es-PY.yml +3 -2
  24. data/config/locales/es.yml +3 -2
  25. data/config/locales/eu.yml +0 -2
  26. data/config/locales/fi-plain.yml +4 -3
  27. data/config/locales/fi.yml +7 -6
  28. data/config/locales/fr-CA.yml +3 -2
  29. data/config/locales/fr.yml +3 -2
  30. data/config/locales/gl.yml +0 -2
  31. data/config/locales/hu.yml +0 -2
  32. data/config/locales/id-ID.yml +0 -2
  33. data/config/locales/is-IS.yml +4 -0
  34. data/config/locales/it.yml +2 -2
  35. data/config/locales/ja.yml +0 -2
  36. data/config/locales/lv.yml +0 -2
  37. data/config/locales/nl.yml +8 -9
  38. data/config/locales/no.yml +0 -2
  39. data/config/locales/pl.yml +8 -7
  40. data/config/locales/pt-BR.yml +0 -2
  41. data/config/locales/pt.yml +0 -2
  42. data/config/locales/ro-RO.yml +0 -6
  43. data/config/locales/ru.yml +1 -1
  44. data/config/locales/si-LK.yml +1 -0
  45. data/config/locales/sk.yml +0 -2
  46. data/config/locales/sv.yml +0 -2
  47. data/config/locales/sw-KE.yml +1 -0
  48. data/config/locales/tr-TR.yml +117 -42
  49. data/config/locales/uk.yml +1 -1
  50. data/config/locales/zh-CN.yml +0 -2
  51. data/lib/decidim/api/consultation_question_type.rb +52 -0
  52. data/lib/decidim/api/consultation_type.rb +29 -0
  53. data/lib/decidim/consultations.rb +1 -0
  54. data/lib/decidim/consultations/admin_engine.rb +25 -1
  55. data/lib/decidim/consultations/api.rb +8 -0
  56. data/lib/decidim/consultations/engine.rb +7 -1
  57. data/lib/decidim/consultations/participatory_space.rb +24 -24
  58. data/lib/decidim/consultations/query_extensions.rb +43 -0
  59. data/lib/decidim/consultations/test/factories.rb +2 -2
  60. data/lib/decidim/consultations/version.rb +1 -1
  61. metadata +24 -19
  62. data/app/types/decidim/consultations/consultation_question_type.rb +0 -57
  63. data/app/types/decidim/consultations/consultation_type.rb +0 -32
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Consultations
5
- # This type represents a consultation.
6
- ConsultationType = GraphQL::ObjectType.define do
7
- interfaces [
8
- -> { Decidim::Core::ParticipatorySpaceInterface }
9
- ]
10
-
11
- name "Consultation"
12
- description "A consultation"
13
-
14
- field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this consultation"
15
- field :description, Decidim::Core::TranslatedFieldType, "The description of this consultation"
16
- field :slug, !types.String, "Slug of this consultation"
17
- field :createdAt, !Decidim::Core::DateTimeType, "The time this consultation was created", property: :created_at
18
- field :updatedAt, !Decidim::Core::DateTimeType, "The time this consultation was updated", property: :updated_at
19
- field :publishedAt, !Decidim::Core::DateTimeType, "The time this consultation was published", property: :published_at
20
-
21
- field :introductoryVideoUrl, types.String, "The introductory video url for this consultation", property: :introductory_video_url
22
- field :introductoryImage, types.String, "The introductory image for this consultation", property: :introductory_image
23
- field :bannerImage, types.String, "The banner image for this consultation", property: :banner_image
24
- field :highlightedScope, Decidim::Core::ScopeApiType, "This is the highlighted scope of this consultation", property: :highlighted_scope
25
- field :startVotingDate, Decidim::Core::DateType, "Start date of the voting for this consultation", property: :start_voting_date
26
- field :endVotingDate, Decidim::Core::DateType, "End date of the voting for this consultation", property: :end_voting_date
27
- field :resultsPublishedAt, Decidim::Core::DateType, "Date when the results have been published", property: :results_published_at
28
-
29
- field :questions, types[Decidim::Consultations::ConsultationQuestionType], ""
30
- end
31
- end
32
- end