decidim-consultations 0.19.1 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/decidim/consultations/icon.svg +1 -3
  3. data/app/assets/images/decidim/consultations/icon2.svg +1 -88
  4. data/app/assets/javascripts/decidim/consultations/utils_multiple.js +1 -1
  5. data/app/assets/stylesheets/decidim/consultations/_question.scss +0 -6
  6. data/app/assets/stylesheets/decidim/consultations/_question_multiple_votes.scss +22 -0
  7. data/app/assets/stylesheets/decidim/consultations/consultations.scss +1 -0
  8. data/app/assets/stylesheets/decidim/consultations/consultations/_consultations-header.scss +0 -1
  9. data/app/cells/decidim/consultations/consultation_m/data.erb +1 -1
  10. data/app/cells/decidim/consultations/consultation_m/footer.erb +1 -1
  11. data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +3 -3
  12. data/app/commands/decidim/consultations/admin/create_response.rb +2 -1
  13. data/app/commands/decidim/consultations/admin/create_response_group.rb +40 -0
  14. data/app/commands/decidim/consultations/admin/destroy_response_group.rb +39 -0
  15. data/app/commands/decidim/consultations/admin/update_consultation.rb +9 -4
  16. data/app/commands/decidim/consultations/admin/update_response.rb +3 -2
  17. data/app/commands/decidim/consultations/admin/update_response_group.rb +46 -0
  18. data/app/controllers/concerns/decidim/consultations/admin/filterable.rb +27 -0
  19. data/app/controllers/decidim/consultations/admin/consultations_controller.rb +2 -1
  20. data/app/controllers/decidim/consultations/admin/response_groups_controller.rb +88 -0
  21. data/app/controllers/decidim/consultations/admin/responses_controller.rb +1 -0
  22. data/app/forms/decidim/consultations/admin/consultation_form.rb +5 -6
  23. data/app/forms/decidim/consultations/admin/question_form.rb +5 -6
  24. data/app/forms/decidim/consultations/admin/response_form.rb +5 -0
  25. data/app/forms/decidim/consultations/admin/response_group_form.rb +18 -0
  26. data/app/helpers/decidim/consultations/admin/questions_helper.rb +11 -0
  27. data/app/models/decidim/consultation.rb +25 -0
  28. data/app/models/decidim/consultations/question.rb +34 -1
  29. data/app/models/decidim/consultations/response.rb +11 -0
  30. data/app/models/decidim/consultations/response_group.rb +23 -0
  31. data/app/permissions/decidim/consultations/admin/permissions.rb +16 -0
  32. data/app/permissions/decidim/consultations/permissions.rb +2 -0
  33. data/app/presenters/decidim/consultations/question_stats_presenter.rb +1 -1
  34. data/app/types/decidim/consultations/consultation_question_type.rb +57 -0
  35. data/app/types/decidim/consultations/consultation_type.rb +32 -0
  36. data/app/views/decidim/consultations/admin/consultations/index.html.erb +3 -2
  37. data/app/views/decidim/consultations/admin/response_groups/_form.html.erb +11 -0
  38. data/app/views/decidim/consultations/admin/response_groups/edit.html.erb +18 -0
  39. data/app/views/decidim/consultations/admin/response_groups/index.html.erb +56 -0
  40. data/app/views/decidim/consultations/admin/response_groups/new.html.erb +13 -0
  41. data/app/views/decidim/consultations/admin/responses/_form.html.erb +3 -0
  42. data/app/views/decidim/consultations/admin/responses/index.html.erb +12 -1
  43. data/app/views/decidim/consultations/consultations/_consultation_card.html.erb +3 -3
  44. data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +2 -2
  45. data/app/views/decidim/consultations/consultations/_filters.html.erb +9 -4
  46. data/app/views/decidim/consultations/consultations/_question.html.erb +2 -2
  47. data/app/views/decidim/consultations/consultations/index.html.erb +3 -3
  48. data/app/views/decidim/consultations/question_multiple_votes/_form.html.erb +14 -10
  49. data/app/views/decidim/consultations/question_multiple_votes/show.html.erb +8 -2
  50. data/app/views/decidim/consultations/questions/_vote_button.html.erb +70 -67
  51. data/app/views/decidim/consultations/questions/_vote_modal.html.erb +1 -1
  52. data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -1
  53. data/app/views/decidim/consultations/questions/show.html.erb +4 -4
  54. data/app/views/layouts/decidim/_question_components.html.erb +3 -3
  55. data/app/views/layouts/decidim/_question_header.html.erb +1 -1
  56. data/app/views/layouts/decidim/admin/question.html.erb +1 -1
  57. data/app/views/layouts/decidim/consultation.html.erb +1 -0
  58. data/config/locales/am-ET.yml +1 -0
  59. data/config/locales/ar.yml +29 -1
  60. data/config/locales/bg-BG.yml +1 -0
  61. data/config/locales/bg.yml +1 -0
  62. data/config/locales/ca.yml +29 -1
  63. data/config/locales/cs.yml +37 -9
  64. data/config/locales/da-DK.yml +1 -0
  65. data/config/locales/da.yml +1 -0
  66. data/config/locales/de.yml +82 -1
  67. data/config/locales/el-GR.yml +1 -0
  68. data/config/locales/el.yml +377 -0
  69. data/config/locales/en.yml +29 -1
  70. data/config/locales/eo.yml +1 -0
  71. data/config/locales/es-MX.yml +29 -1
  72. data/config/locales/es-PY.yml +29 -1
  73. data/config/locales/es.yml +29 -1
  74. data/config/locales/et-EE.yml +1 -0
  75. data/config/locales/et.yml +1 -0
  76. data/config/locales/eu.yml +0 -1
  77. data/config/locales/fi-plain.yml +29 -1
  78. data/config/locales/fi.yml +38 -10
  79. data/config/locales/fr-CA.yml +377 -0
  80. data/config/locales/fr.yml +30 -2
  81. data/config/locales/ga-IE.yml +1 -0
  82. data/config/locales/gl.yml +0 -1
  83. data/config/locales/hr-HR.yml +1 -0
  84. data/config/locales/hr.yml +1 -0
  85. data/config/locales/hu.yml +25 -1
  86. data/config/locales/id-ID.yml +0 -1
  87. data/config/locales/is-IS.yml +185 -0
  88. data/config/locales/is.yml +185 -0
  89. data/config/locales/it.yml +82 -54
  90. data/config/locales/ja-JP.yml +367 -0
  91. data/config/locales/ja.yml +367 -0
  92. data/config/locales/ko-KR.yml +1 -0
  93. data/config/locales/ko.yml +1 -0
  94. data/config/locales/lt-LT.yml +1 -0
  95. data/config/locales/lt.yml +1 -0
  96. data/config/locales/lv.yml +383 -0
  97. data/config/locales/mt-MT.yml +1 -0
  98. data/config/locales/mt.yml +1 -0
  99. data/config/locales/nl.yml +29 -1
  100. data/config/locales/no.yml +312 -1
  101. data/config/locales/om-ET.yml +1 -0
  102. data/config/locales/pl.yml +183 -102
  103. data/config/locales/pt-BR.yml +1 -2
  104. data/config/locales/pt.yml +156 -75
  105. data/config/locales/ro-RO.yml +338 -0
  106. data/config/locales/ru.yml +0 -1
  107. data/config/locales/sk-SK.yml +394 -0
  108. data/config/locales/sk.yml +393 -0
  109. data/config/locales/sl.yml +9 -0
  110. data/config/locales/so-SO.yml +1 -0
  111. data/config/locales/sr-CS.yml +1 -0
  112. data/config/locales/sv.yml +60 -11
  113. data/config/locales/ti-ER.yml +1 -0
  114. data/config/locales/tr-TR.yml +0 -1
  115. data/config/locales/uk.yml +0 -1
  116. data/config/locales/vi-VN.yml +1 -0
  117. data/config/locales/vi.yml +1 -0
  118. data/config/locales/zh-CN.yml +367 -0
  119. data/config/locales/zh-TW.yml +1 -0
  120. data/db/migrate/20190708114204_create_decidim_consultations_response_groups.rb +16 -0
  121. data/db/migrate/20190708120345_add_response_groups_count_to_decidim_consultations_questions.rb +7 -0
  122. data/db/migrate/20190708121643_add_response_groups_to_decidim_consultations_responses.rb +10 -0
  123. data/db/migrate/20200320105916_index_foreign_keys_in_decidim_consultations_votes.rb +7 -0
  124. data/db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb +9 -0
  125. data/db/seeds/city.jpeg +0 -0
  126. data/db/seeds/city2.jpeg +0 -0
  127. data/lib/decidim/consultations/admin_engine.rb +2 -0
  128. data/lib/decidim/consultations/participatory_space.rb +23 -17
  129. data/lib/decidim/consultations/test/factories.rb +6 -0
  130. data/lib/decidim/consultations/version.rb +1 -1
  131. metadata +67 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e545d964f19b6346252bf1daa1fa7ee713c9ac43668c85fa8f2536ea4b17b619
4
- data.tar.gz: fdf8ccf5ba93997db71195d78e7e120293503acdd2dcf999e3ba94e83b2ad967
3
+ metadata.gz: ac6cbb884a436f3a7dae1afc0ecaf4ad669d8017d7e828ff906055d9fe569eb7
4
+ data.tar.gz: e2dd3b3cd944c643306ae53cd65e9bddc504e7165203c03c2db565c7b78635cc
5
5
  SHA512:
6
- metadata.gz: e127db0074ad1c5d8fc8bef2e982f3d87eba236269afab8fb3e7e99634fda00a10d056db166aa9c2f9dcc7186182932e189eb105e7ed638da3d2bc42b5cd5589
7
- data.tar.gz: a866cd5cfadd3f766947185d3464ec1605d2b08cd2d99211abe64993844cd794bf82dd31483e02fd8475cd9fa68b99caee6029153ad44c5d39af72077830ff10
6
+ metadata.gz: 62a07bd3bf9559e042f343ac8a8ba5ca851d37eb78844f2ef69b9c832fede0ead52773b083eacbe121ee229634c177c7cf29164a2289a6fae2e3f51561df64e7
7
+ data.tar.gz: 0121a8c152378ae724b8ca813717f7f83db1f061e364fd45ae3b58a6f677cb89ba88da2dbe7fe467459cb306f7d05316524dcab412ddb1163b21a787b9b22c40
@@ -1,3 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34">
2
- <path d="M17 1.889C8.654 1.889 1.889 8.654 1.889 17S8.654 32.111 17 32.111 32.111 25.346 32.111 17 25.346 1.889 17 1.889zM17 0c9.389 0 17 7.611 17 17s-7.611 17-17 17S0 26.389 0 17 7.611 0 17 0zm-2.327 14.005c.026-1.153.867-2.08 2.024-2.099h.137c1.901.032 2.584 2.347 1.065 3.915-.12.123-.951.935-1.16 1.17-.688.776-.982 1.563-.982 2.793a.944.944 0 1 0 1.89 0c0-.772.126-1.113.505-1.54.155-.174.942-.942 1.104-1.11 2.59-2.672 1.298-7.055-2.406-7.116h-.168c-2.232.036-3.85 1.817-3.898 3.945a.944.944 0 1 0 1.889.042zm2.029 10.327a1.168 1.168 0 1 0 0-2.336 1.168 1.168 0 0 0 0 2.336zm0-.945a.224.224 0 1 1 0-.447.224.224 0 0 1 0 .447z"/>
3
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34"><path d="M17 1.889C8.654 1.889 1.889 8.654 1.889 17S8.654 32.111 17 32.111 32.111 25.346 32.111 17 25.346 1.889 17 1.889zM17 0c9.389 0 17 7.611 17 17s-7.611 17-17 17S0 26.389 0 17 7.611 0 17 0zm-2.327 14.005c.026-1.153.867-2.08 2.024-2.099h.137c1.901.032 2.584 2.347 1.065 3.915-.12.123-.951.935-1.16 1.17-.688.776-.982 1.563-.982 2.793a.944.944 0 1 0 1.89 0c0-.772.126-1.113.505-1.54.155-.174.942-.942 1.104-1.11 2.59-2.672 1.298-7.055-2.406-7.116h-.168c-2.232.036-3.85 1.817-3.898 3.945a.944.944 0 1 0 1.889.042zm2.029 10.327a1.168 1.168 0 1 0 0-2.336 1.168 1.168 0 0 0 0 2.336zm0-.945a.224.224 0 1 1 0-.447.224.224 0 0 1 0 .447z"/></svg>
@@ -1,88 +1 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
- version="1.1"
11
- id="svg2"
12
- viewBox="0 0 121.08785 121.08785"
13
- height="34.173683mm"
14
- width="34.173683mm"
15
- inkscape:version="0.91 r13725"
16
- sodipodi:docname="icon-consultation-plain.svg">
17
- <sodipodi:namedview
18
- pagecolor="#ffffff"
19
- bordercolor="#666666"
20
- borderopacity="1"
21
- objecttolerance="10"
22
- gridtolerance="10"
23
- guidetolerance="10"
24
- inkscape:pageopacity="0"
25
- inkscape:pageshadow="2"
26
- inkscape:window-width="1869"
27
- inkscape:window-height="1050"
28
- id="namedview4147"
29
- showgrid="false"
30
- inkscape:zoom="5.0512694"
31
- inkscape:cx="69.560452"
32
- inkscape:cy="50.889577"
33
- inkscape:window-x="51"
34
- inkscape:window-y="30"
35
- inkscape:window-maximized="1"
36
- inkscape:current-layer="text4154" />
37
- <defs
38
- id="defs4" />
39
- <metadata
40
- id="metadata7">
41
- <rdf:RDF>
42
- <cc:Work
43
- rdf:about="">
44
- <dc:format>image/svg+xml</dc:format>
45
- <dc:type
46
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47
- <dc:title />
48
- </cc:Work>
49
- </rdf:RDF>
50
- </metadata>
51
- <g
52
- transform="translate(-31.864728,-35.267277)"
53
- id="layer1">
54
- <path
55
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.9000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
56
- d="m 92.408203,35.267578 c -33.420312,0 -60.542969,27.122657 -60.542969,60.542969 -1e-6,33.420313 27.122657,60.544923 60.542969,60.544923 33.420317,0 60.544927,-27.12461 60.544917,-60.544923 0,-33.420313 -27.1246,-60.54297 -60.544917,-60.542969 z m 0,2.900391 c 31.853037,-10e-7 57.644527,25.789542 57.644527,57.642578 1e-5,31.853033 -25.79149,57.644533 -57.644527,57.644533 -31.853036,0 -57.642579,-25.7915 -57.642578,-57.644533 0,-31.853036 25.789543,-57.642578 57.642578,-57.642578 z"
57
- id="path4136"
58
- inkscape:connector-curvature="0" />
59
- <path
60
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.63098097;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
61
- d="m 58.978516,67.554688 0,1.816406 0,24.173828 25.990234,0 0,-25.990234 -25.990234,0 z m 3.630859,3.630859 18.726563,0 0,18.728515 -18.726563,0 0,-18.728515 z"
62
- id="rect4138"
63
- inkscape:connector-curvature="0" />
64
- <path
65
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.63100004;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
66
- d="m 58.978516,100.10938 0,1.81445 0,24.17383 25.990234,0 0,-25.98828 -25.990234,0 z m 3.630859,3.63085 18.726563,0 0,18.72657 -18.726563,0 0,-18.72657 z"
67
- id="rect4140"
68
- inkscape:connector-curvature="0" />
69
- <path
70
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
71
- d="m 94.357422,76.933594 0,5 35.392578,0 0,-5 -35.392578,0 z"
72
- id="path4142"
73
- inkscape:connector-curvature="0" />
74
- <path
75
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
76
- d="m 94.357422,110.93359 0,5 35.392578,0 0,-5 -35.392578,0 z"
77
- id="path4150"
78
- inkscape:connector-curvature="0" />
79
- <g
80
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:41.11339951px;line-height:125%;font-family:OpenSymbol;-inkscape-font-specification:OpenSymbol;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
81
- id="text4154">
82
- <path
83
- d="m 89.716183,63.201072 0.702622,1.02382 q -4.838051,3.673707 -9.957151,10.318499 -4.737677,6.22322 -7.608388,12.225616 -2.228314,1.465468 -3.974831,2.870711 -2.710112,-8.873107 -6.303519,-10.3185 2.027565,-2.308614 3.994905,-2.308614 1.686292,0 4.075205,5.641048 7.668613,-12.948312 19.071157,-19.45258 z"
84
- style=""
85
- id="path4153" />
86
- </g>
87
- </g>
88
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" id="svg2" width="129.16" height="129.16" version="1.1" viewBox="0 0 121.088 121.088"><metadata id="metadata7"/><g id="layer1" transform="translate(-31.864728,-35.267277)"><path id="path4136" fill="#000" fill-opacity="1" fill-rule="nonzero" stroke="none" stroke-dasharray="none" stroke-dashoffset="0" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="2.9" d="m 92.408203,35.267578 c -33.420312,0 -60.542969,27.122657 -60.542969,60.542969 -1e-6,33.420313 27.122657,60.544923 60.542969,60.544923 33.420317,0 60.544927,-27.12461 60.544917,-60.544923 0,-33.420313 -27.1246,-60.54297 -60.544917,-60.542969 z m 0,2.900391 c 31.853037,-10e-7 57.644527,25.789542 57.644527,57.642578 1e-5,31.853033 -25.79149,57.644533 -57.644527,57.644533 -31.853036,0 -57.642579,-25.7915 -57.642578,-57.644533 0,-31.853036 25.789543,-57.642578 57.642578,-57.642578 z" baseline-shift="baseline" clip-rule="nonzero" color="#000" color-interpolation="sRGB" color-interpolation-filters="linearRGB" color-rendering="auto" direction="ltr" display="inline" enable-background="accumulate" font-family="sans-serif" font-size="medium" font-stretch="normal" font-style="normal" font-variant="normal" font-weight="normal" image-rendering="auto" letter-spacing="normal" opacity="1" overflow="visible" shape-rendering="auto" text-anchor="start" text-decoration="none" text-rendering="auto" visibility="visible" word-spacing="normal" writing-mode="lr-tb" style="line-height:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;block-progression:tb;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"/><path id="rect4138" fill="#000" fill-opacity="1" fill-rule="nonzero" stroke="none" stroke-dasharray="none" stroke-dashoffset="0" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="3.631" d="m 58.978516,67.554688 0,1.816406 0,24.173828 25.990234,0 0,-25.990234 -25.990234,0 z m 3.630859,3.630859 18.726563,0 0,18.728515 -18.726563,0 0,-18.728515 z" baseline-shift="baseline" clip-rule="nonzero" color="#000" color-interpolation="sRGB" color-interpolation-filters="linearRGB" color-rendering="auto" direction="ltr" display="inline" enable-background="accumulate" font-family="sans-serif" font-size="medium" font-stretch="normal" font-style="normal" font-variant="normal" font-weight="normal" image-rendering="auto" letter-spacing="normal" opacity="1" overflow="visible" shape-rendering="auto" text-anchor="start" text-decoration="none" text-rendering="auto" visibility="visible" word-spacing="normal" writing-mode="lr-tb" style="line-height:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;block-progression:tb;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"/><path id="rect4140" fill="#000" fill-opacity="1" fill-rule="nonzero" stroke="none" stroke-dasharray="none" stroke-dashoffset="0" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="3.631" d="m 58.978516,100.10938 0,1.81445 0,24.17383 25.990234,0 0,-25.98828 -25.990234,0 z m 3.630859,3.63085 18.726563,0 0,18.72657 -18.726563,0 0,-18.72657 z" baseline-shift="baseline" clip-rule="nonzero" color="#000" color-interpolation="sRGB" color-interpolation-filters="linearRGB" color-rendering="auto" direction="ltr" display="inline" enable-background="accumulate" font-family="sans-serif" font-size="medium" font-stretch="normal" font-style="normal" font-variant="normal" font-weight="normal" image-rendering="auto" letter-spacing="normal" opacity="1" overflow="visible" shape-rendering="auto" text-anchor="start" text-decoration="none" text-rendering="auto" visibility="visible" word-spacing="normal" writing-mode="lr-tb" style="line-height:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;block-progression:tb;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"/><path id="path4142" fill="#000" fill-opacity="1" fill-rule="evenodd" stroke="none" stroke-dasharray="none" stroke-dashoffset="0" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="5" d="m 94.357422,76.933594 0,5 35.392578,0 0,-5 -35.392578,0 z" baseline-shift="baseline" clip-rule="nonzero" color="#000" color-interpolation="sRGB" color-interpolation-filters="linearRGB" color-rendering="auto" direction="ltr" display="inline" enable-background="accumulate" font-family="sans-serif" font-size="medium" font-stretch="normal" font-style="normal" font-variant="normal" font-weight="normal" image-rendering="auto" letter-spacing="normal" opacity="1" overflow="visible" shape-rendering="auto" text-anchor="start" text-decoration="none" text-rendering="auto" visibility="visible" word-spacing="normal" writing-mode="lr-tb" style="line-height:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;block-progression:tb;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"/><path id="path4150" fill="#000" fill-opacity="1" fill-rule="evenodd" stroke="none" stroke-dasharray="none" stroke-dashoffset="0" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="5" d="m 94.357422,110.93359 0,5 35.392578,0 0,-5 -35.392578,0 z" baseline-shift="baseline" clip-rule="nonzero" color="#000" color-interpolation="sRGB" color-interpolation-filters="linearRGB" color-rendering="auto" direction="ltr" display="inline" enable-background="accumulate" font-family="sans-serif" font-size="medium" font-stretch="normal" font-style="normal" font-variant="normal" font-weight="normal" image-rendering="auto" letter-spacing="normal" opacity="1" overflow="visible" shape-rendering="auto" text-anchor="start" text-decoration="none" text-rendering="auto" visibility="visible" word-spacing="normal" writing-mode="lr-tb" style="line-height:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;block-progression:tb;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"/><g id="text4154" fill="#000" fill-opacity="1" stroke="none" stroke-linecap="butt" stroke-linejoin="miter" stroke-opacity="1" stroke-width="1" font-family="OpenSymbol" font-size="41.113" font-stretch="normal" font-style="normal" font-variant="normal" font-weight="normal" letter-spacing="0" word-spacing="0" style="line-height:125%;-inkscape-font-specification:OpenSymbol"><path id="path4153" d="m 89.716183,63.201072 0.702622,1.02382 q -4.838051,3.673707 -9.957151,10.318499 -4.737677,6.22322 -7.608388,12.225616 -2.228314,1.465468 -3.974831,2.870711 -2.710112,-8.873107 -6.303519,-10.3185 2.027565,-2.308614 3.994905,-2.308614 1.686292,0 4.075205,5.641048 7.668613,-12.948312 19.071157,-19.45258 z"/></g></g></svg>
@@ -11,7 +11,7 @@ $(document).ready(function () {
11
11
  max += 1;
12
12
  }
13
13
  if (max < 0) {
14
- $(this).attr("checked", false);
14
+ $(this).prop("checked", false);
15
15
  event.preventDefault();
16
16
  }
17
17
  else {
@@ -1,7 +1,3 @@
1
- .question-group-heading{
2
- text-transform: uppercase;
3
- }
4
-
5
1
  .question-header{
6
2
  margin-top: 3em;
7
3
  margin-bottom: 1.5em;
@@ -24,7 +20,6 @@
24
20
  font-size: 1.2em;
25
21
 
26
22
  .question-eader-data-group-title{
27
- text-transform: uppercase;
28
23
  color: #857d84;
29
24
  }
30
25
  }
@@ -42,7 +37,6 @@
42
37
 
43
38
  .vote-button-caption{
44
39
  font-size: 1.5em;
45
- text-transform: uppercase;
46
40
  font-weight: bold;
47
41
  color: white;
48
42
  }
@@ -0,0 +1,22 @@
1
+ .question-masonry-group{
2
+ $masonry-css-column-gap: $global-margin;
3
+
4
+ column-count: 1;
5
+ column-gap: $masonry-css-column-gap;
6
+
7
+ @include breakpoint(map-get($breakpoints, medium)){
8
+ column-count: 2;
9
+ }
10
+
11
+ @include breakpoint(map-get($breakpoints, large)){
12
+ column-count: 3;
13
+ }
14
+
15
+ .column{
16
+ // override float styles from foundation
17
+ float: none !important;
18
+ width: auto !important;
19
+ break-inside: avoid;
20
+ margin-bottom: $masonry-css-column-gap;
21
+ }
22
+ }
@@ -1,4 +1,5 @@
1
1
  @import "question";
2
+ @import "question_multiple_votes";
2
3
  @import "video_wrapper";
3
4
  @import "stats";
4
5
  @import "consultations/*";
@@ -107,7 +107,6 @@
107
107
  }
108
108
 
109
109
  line-height: 1;
110
- text-transform: uppercase;
111
110
  }
112
111
 
113
112
  .consultations-header__extra-date{
@@ -1,7 +1,7 @@
1
1
  <div class="card__icondata">
2
2
  <ul class="card-data">
3
3
  <li class="card-data__item">
4
- <%= icon "datetime", class: "icon--big" %>
4
+ <%= icon "datetime", class: "icon--big", role: "img", aria_label: t("decidim.consultations.consultations.show.dates") %>
5
5
  </li>
6
6
  <li class="card-data__item">
7
7
  <div class="card-data__item--centerblock">
@@ -1,5 +1,5 @@
1
1
  <div class="card__footer card__footer--spaces">
2
2
  <div class="card__support">
3
- <%= link_to t(footer_button_text, scope: "decidim.consultations.show.footer_button_text"), resource_path, class: "card__button button--sc light button small secondary" %>
3
+ <%= link_to t(footer_button_text, scope: "decidim.consultations.show.footer_button_text"), resource_path, class: "card__button button--sc light button small" %>
4
4
  </div>
5
5
  </div>
@@ -6,18 +6,18 @@
6
6
  large-up-4 card-grid">
7
7
  <% highlighted_consultations.each do |consultation| %>
8
8
  <div class="column">
9
- <article class="card card--consultation card--mini">
9
+ <div class="card card--consultation card--mini">
10
10
  <%= link_to decidim_consultations.consultation_path(consultation), class: "card__link" do %>
11
11
  <div class="card__image-top"
12
12
  style="background-image:url(<%= consultation.banner_image.url %>)"></div>
13
13
  <% end %>
14
14
  <div class="card__content">
15
15
  <%= link_to decidim_consultations.consultation_path(consultation), class: "card__link" do %>
16
- <h4 class="card__title"><%= translated_attribute consultation.title %></h4>
16
+ <span class="card__title"><%= translated_attribute consultation.title %></span>
17
17
  <% end %>
18
18
  <span class="card--process__small"><%= voting_ends_text_for(consultation) %></span>
19
19
  </div>
20
- </article>
20
+ </div>
21
21
  </div>
22
22
  <% end %>
23
23
  </div>
@@ -31,7 +31,8 @@ module Decidim
31
31
  def create_response
32
32
  Response.create(
33
33
  question: form.context.current_question,
34
- title: form.title
34
+ title: form.title,
35
+ response_group: form.response_group
35
36
  )
36
37
  end
37
38
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Consultations
5
+ module Admin
6
+ # A command with all the business logic when creating a new response group
7
+ class CreateResponseGroup < Rectify::Command
8
+ # Public: Initializes the command.
9
+ #
10
+ # form - A form object with the params.
11
+ def initialize(form)
12
+ @form = form
13
+ end
14
+
15
+ # Executes the command. Broadcasts these events:
16
+ #
17
+ # - :ok when everything is valid.
18
+ # - :invalid if the form wasn't valid and we couldn't proceed.
19
+ #
20
+ # Returns nothing.
21
+ def call
22
+ return broadcast(:invalid) if form.invalid?
23
+
24
+ broadcast(:ok, create_response_group)
25
+ end
26
+
27
+ private
28
+
29
+ attr_reader :form
30
+
31
+ def create_response_group
32
+ ResponseGroup.create(
33
+ question: form.context.current_question,
34
+ title: form.title
35
+ )
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Consultations
5
+ module Admin
6
+ # A command with all the business logic to destroy a response group in the
7
+ # system.
8
+ class DestroyResponseGroup < Rectify::Command
9
+ # Public: Initializes the command.
10
+ #
11
+ # response_group - A ResponseGroup that will be destroyed
12
+ def initialize(response_group)
13
+ @response_group = response_group
14
+ end
15
+
16
+ # Executes the command. Broadcasts these events:
17
+ #
18
+ # - :ok when everything is valid.
19
+ # - :invalid if the data wasn't valid and we couldn't proceed.
20
+ #
21
+ # Returns nothing.
22
+ def call
23
+ return broadcast(:invalid) if response_group.nil? || response_group.responses.any?
24
+
25
+ destroy_response_group
26
+ broadcast(:ok)
27
+ end
28
+
29
+ private
30
+
31
+ attr_reader :response_group
32
+
33
+ def destroy_response_group
34
+ response_group.destroy!
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -50,15 +50,20 @@ module Decidim
50
50
  subtitle: form.subtitle,
51
51
  description: form.description,
52
52
  slug: form.slug,
53
- banner_image: form.banner_image,
54
- remove_banner_image: form.remove_banner_image,
55
53
  highlighted_scope: form.highlighted_scope,
56
54
  introductory_video_url: form.introductory_video_url,
57
55
  start_voting_date: form.start_voting_date,
58
- end_voting_date: form.end_voting_date,
56
+ end_voting_date: form.end_voting_date
57
+ }.merge(uploader_attributes)
58
+ end
59
+
60
+ def uploader_attributes
61
+ {
62
+ banner_image: form.banner_image,
63
+ remove_banner_image: form.remove_banner_image,
59
64
  introductory_image: form.introductory_image,
60
65
  remove_introductory_image: form.remove_introductory_image
61
- }
66
+ }.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) }
62
67
  end
63
68
  end
64
69
  end
@@ -33,12 +33,13 @@ module Decidim
33
33
 
34
34
  def update_response
35
35
  response.assign_attributes(attributes)
36
- response.save
36
+ response.save!
37
37
  end
38
38
 
39
39
  def attributes
40
40
  {
41
- title: form.title
41
+ title: form.title,
42
+ response_group: form.response_group
42
43
  }
43
44
  end
44
45
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Consultations
5
+ module Admin
6
+ # A command with all the business logic when updating a new response group
7
+ class UpdateResponseGroup < Rectify::Command
8
+ # Public: Initializes the command.
9
+ #
10
+ # response_group - the response group to update
11
+ # form - A form object with the params.
12
+ def initialize(response_group, form)
13
+ @response_group = response_group
14
+ @form = form
15
+ end
16
+
17
+ # Executes the command. Broadcasts these events:
18
+ #
19
+ # - :ok when everything is valid.
20
+ # - :invalid if the form wasn't valid and we couldn't proceed.
21
+ #
22
+ # Returns nothing.
23
+ def call
24
+ return broadcast(:invalid) if form.invalid?
25
+
26
+ broadcast(:ok, update_response_group)
27
+ end
28
+
29
+ private
30
+
31
+ attr_reader :form, :response_group
32
+
33
+ def update_response_group
34
+ response_group.assign_attributes(attributes)
35
+ response_group.save!
36
+ end
37
+
38
+ def attributes
39
+ {
40
+ title: form.title
41
+ }
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/concern"
4
+
5
+ module Decidim
6
+ module Consultations
7
+ module Admin
8
+ module Filterable
9
+ extend ActiveSupport::Concern
10
+
11
+ included do
12
+ include Decidim::Admin::Filterable
13
+
14
+ private
15
+
16
+ def base_query
17
+ collection
18
+ end
19
+
20
+ def filters
21
+ [:published_at_null]
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -5,12 +5,13 @@ module Decidim
5
5
  module Admin
6
6
  # Controller in charge of managing consultation related requests
7
7
  class ConsultationsController < Decidim::Consultations::Admin::ApplicationController
8
+ include Decidim::Consultations::Admin::Filterable
8
9
  helper_method :current_consultation, :current_participatory_space
9
10
 
10
11
  # GET /admin/consultations
11
12
  def index
12
13
  enforce_permission_to :read, :consultation
13
- @consultations = collection
14
+ @consultations = filtered_collection
14
15
  end
15
16
 
16
17
  # GET /admin/consultations/new