decidim-consultations 0.19.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/decidim/consultations/icon.svg +1 -3
- data/app/assets/images/decidim/consultations/icon2.svg +1 -88
- data/app/assets/javascripts/decidim/consultations/utils_multiple.js +1 -1
- data/app/assets/stylesheets/decidim/consultations/_question.scss +0 -6
- data/app/assets/stylesheets/decidim/consultations/_question_multiple_votes.scss +22 -0
- data/app/assets/stylesheets/decidim/consultations/consultations.scss +1 -0
- data/app/assets/stylesheets/decidim/consultations/consultations/_consultations-header.scss +0 -1
- data/app/cells/decidim/consultations/consultation_m/data.erb +1 -1
- data/app/cells/decidim/consultations/consultation_m/footer.erb +1 -1
- data/app/cells/decidim/consultations/content_blocks/highlighted_consultations/show.erb +3 -3
- data/app/commands/decidim/consultations/admin/create_response.rb +2 -1
- data/app/commands/decidim/consultations/admin/create_response_group.rb +40 -0
- data/app/commands/decidim/consultations/admin/destroy_response_group.rb +39 -0
- data/app/commands/decidim/consultations/admin/update_response.rb +3 -2
- data/app/commands/decidim/consultations/admin/update_response_group.rb +46 -0
- data/app/controllers/concerns/decidim/consultations/admin/filterable.rb +27 -0
- data/app/controllers/decidim/consultations/admin/consultations_controller.rb +2 -1
- data/app/controllers/decidim/consultations/admin/response_groups_controller.rb +88 -0
- data/app/controllers/decidim/consultations/admin/responses_controller.rb +1 -0
- data/app/controllers/decidim/consultations/consultations_controller.rb +1 -1
- data/app/forms/decidim/consultations/admin/response_form.rb +5 -0
- data/app/forms/decidim/consultations/admin/response_group_form.rb +18 -0
- data/app/helpers/decidim/consultations/admin/questions_helper.rb +11 -0
- data/app/models/decidim/consultation.rb +16 -0
- data/app/models/decidim/consultations/question.rb +22 -0
- data/app/models/decidim/consultations/response.rb +7 -0
- data/app/models/decidim/consultations/response_group.rb +19 -0
- data/app/permissions/decidim/consultations/admin/permissions.rb +16 -0
- data/app/permissions/decidim/consultations/permissions.rb +2 -0
- data/app/types/decidim/consultations/consultation_question_type.rb +57 -0
- data/app/types/decidim/consultations/consultation_type.rb +32 -0
- data/app/views/decidim/consultations/admin/consultations/index.html.erb +3 -2
- data/app/views/decidim/consultations/admin/response_groups/_form.html.erb +11 -0
- data/app/views/decidim/consultations/admin/response_groups/edit.html.erb +18 -0
- data/app/views/decidim/consultations/admin/response_groups/index.html.erb +56 -0
- data/app/views/decidim/consultations/admin/response_groups/new.html.erb +13 -0
- data/app/views/decidim/consultations/admin/responses/_form.html.erb +3 -0
- data/app/views/decidim/consultations/admin/responses/index.html.erb +12 -1
- data/app/views/decidim/consultations/consultations/_consultation_card.html.erb +3 -3
- data/app/views/decidim/consultations/consultations/_consultation_details.html.erb +2 -2
- data/app/views/decidim/consultations/consultations/_filters.html.erb +9 -4
- data/app/views/decidim/consultations/consultations/_question.html.erb +2 -2
- data/app/views/decidim/consultations/consultations/index.html.erb +3 -3
- data/app/views/decidim/consultations/question_multiple_votes/_form.html.erb +14 -10
- data/app/views/decidim/consultations/question_multiple_votes/show.html.erb +8 -2
- data/app/views/decidim/consultations/questions/_vote_button.html.erb +70 -67
- data/app/views/decidim/consultations/questions/_vote_modal.html.erb +1 -1
- data/app/views/decidim/consultations/questions/_vote_modal_confirm.html.erb +1 -1
- data/app/views/decidim/consultations/questions/show.html.erb +4 -4
- data/app/views/layouts/decidim/_question_components.html.erb +3 -3
- data/app/views/layouts/decidim/_question_header.html.erb +1 -1
- data/app/views/layouts/decidim/admin/question.html.erb +1 -1
- data/config/locales/ar.yml +45 -1
- data/config/locales/bg-BG.yml +1 -0
- data/config/locales/ca.yml +29 -1
- data/config/locales/cs.yml +35 -7
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/de.yml +82 -1
- data/config/locales/el-GR.yml +1 -0
- data/config/locales/el.yml +377 -0
- data/config/locales/en.yml +29 -1
- data/config/locales/es-MX.yml +67 -1
- data/config/locales/es-PY.yml +67 -1
- data/config/locales/es.yml +29 -1
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/eu.yml +0 -1
- data/config/locales/fi-plain.yml +29 -1
- data/config/locales/fi.yml +38 -10
- data/config/locales/fr-CA.yml +377 -0
- data/config/locales/fr.yml +31 -2
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +0 -1
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hu.yml +31 -7
- data/config/locales/id-ID.yml +0 -1
- data/config/locales/is-IS.yml +185 -0
- data/config/locales/it.yml +115 -51
- data/config/locales/ja-JP.yml +367 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lv-LV.yml +383 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/nl.yml +29 -1
- data/config/locales/no.yml +366 -0
- data/config/locales/pl.yml +177 -96
- data/config/locales/pt-BR.yml +1 -2
- data/config/locales/pt.yml +156 -75
- data/config/locales/ro-RO.yml +338 -0
- data/config/locales/ru.yml +0 -1
- data/config/locales/sk-SK.yml +394 -0
- data/config/locales/sk.yml +393 -0
- data/config/locales/sl.yml +5 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +78 -8
- data/config/locales/tr-TR.yml +0 -1
- data/config/locales/uk.yml +0 -1
- data/db/migrate/20190708114204_create_decidim_consultations_response_groups.rb +16 -0
- data/db/migrate/20190708120345_add_response_groups_count_to_decidim_consultations_questions.rb +7 -0
- data/db/migrate/20190708121643_add_response_groups_to_decidim_consultations_responses.rb +10 -0
- data/db/migrate/20200320105916_index_foreign_keys_in_decidim_consultations_votes.rb +7 -0
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/lib/decidim/consultations/admin_engine.rb +1 -0
- data/lib/decidim/consultations/participatory_space.rb +6 -0
- data/lib/decidim/consultations/test/factories.rb +5 -0
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +47 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88bf024aaab20c665fcead026483e730e44d01f7a5d46b715c2607334e77820d
|
4
|
+
data.tar.gz: 8dcb157b10148f0d5db8a54c4b2b45f1d1e9efc9dc43e4a8f73b6d7da148d6c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e83652c0745e4022dca4e961035ddec03b2594bb3b0d6cd387fb62e5eeae097c654bed67741737ee0eca513858a5646fa27b4871a2244e3fecabfa470a11264
|
7
|
+
data.tar.gz: c816dc01c88b3094f4af1f42996aa896749c389eca66f4299a3bff2ca39b32fdd3de528d58a9f72235259c5008b6acf0f94ed58fa392232ccaf8880df57964ed
|
@@ -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
|
-
|
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>
|
@@ -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,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
|
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
|
-
<
|
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
|
-
<
|
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
|
-
</
|
20
|
+
</div>
|
21
21
|
</div>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
@@ -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
|
@@ -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 =
|
14
|
+
@consultations = filtered_collection
|
14
15
|
end
|
15
16
|
|
16
17
|
# GET /admin/consultations/new
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Consultations
|
5
|
+
module Admin
|
6
|
+
# Controller that manages responses for a question
|
7
|
+
class ResponseGroupsController < Decidim::Consultations::Admin::ApplicationController
|
8
|
+
include QuestionAdmin
|
9
|
+
|
10
|
+
helper_method :current_response_group
|
11
|
+
|
12
|
+
def index
|
13
|
+
enforce_permission_to :read, :response_group, question: current_question
|
14
|
+
end
|
15
|
+
|
16
|
+
def new
|
17
|
+
enforce_permission_to :create, :response_group, question: current_question
|
18
|
+
@form = response_group_form.instance
|
19
|
+
end
|
20
|
+
|
21
|
+
def create
|
22
|
+
enforce_permission_to :create, :response_group, question: current_question
|
23
|
+
@form = response_group_form.from_params(params, current_question: current_question)
|
24
|
+
|
25
|
+
CreateResponseGroup.call(@form) do
|
26
|
+
on(:ok) do
|
27
|
+
flash[:notice] = I18n.t("response_groups.create.success", scope: "decidim.admin")
|
28
|
+
redirect_to response_groups_path(current_question)
|
29
|
+
end
|
30
|
+
|
31
|
+
on(:invalid) do
|
32
|
+
flash.now[:alert] = I18n.t("response_groups.create.error", scope: "decidim.admin")
|
33
|
+
render :new
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def edit
|
39
|
+
enforce_permission_to :update, :response_group, response_group: current_response_group
|
40
|
+
@form = response_group_form.from_model(current_response_group)
|
41
|
+
end
|
42
|
+
|
43
|
+
def update
|
44
|
+
enforce_permission_to :update, :response_group, response_group: current_response_group
|
45
|
+
|
46
|
+
@form = response_group_form.from_params(params)
|
47
|
+
UpdateResponseGroup.call(current_response_group, @form) do
|
48
|
+
on(:ok) do
|
49
|
+
flash[:notice] = I18n.t("response_groups.update.success", scope: "decidim.admin")
|
50
|
+
redirect_to response_groups_path(current_question)
|
51
|
+
end
|
52
|
+
|
53
|
+
on(:invalid) do
|
54
|
+
flash.now[:alert] = I18n.t("response_groups.update.error", scope: "decidim.admin")
|
55
|
+
render :edit
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def destroy
|
61
|
+
enforce_permission_to :destroy, :response_group, response_group: current_response_group
|
62
|
+
|
63
|
+
DestroyResponseGroup.call(current_response_group) do
|
64
|
+
on(:ok) do
|
65
|
+
flash[:notice] = I18n.t("response_groups.destroy.success", scope: "decidim.admin")
|
66
|
+
end
|
67
|
+
|
68
|
+
on(:invalid) do
|
69
|
+
flash[:alert] = I18n.t("response_groups.destroy.error", scope: "decidim.admin")
|
70
|
+
end
|
71
|
+
|
72
|
+
redirect_to response_groups_path(current_question)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
private
|
77
|
+
|
78
|
+
def current_response_group
|
79
|
+
@current_response_group ||= ResponseGroup.find_by(id: params[:id])
|
80
|
+
end
|
81
|
+
|
82
|
+
def response_group_form
|
83
|
+
form(ResponseGroupForm)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|