decidim-consultations 0.20.1 → 0.23.1
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/stylesheets/decidim/consultations/_question.scss +0 -6
- 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/update_consultation.rb +9 -4
- data/app/controllers/concerns/decidim/consultations/admin/filterable.rb +27 -0
- data/app/controllers/decidim/consultations/admin/consultations_controller.rb +2 -1
- data/app/forms/decidim/consultations/admin/consultation_form.rb +5 -6
- data/app/forms/decidim/consultations/admin/question_form.rb +5 -6
- data/app/models/decidim/consultation.rb +14 -0
- data/app/models/decidim/consultations/question.rb +12 -1
- data/app/models/decidim/consultations/response.rb +4 -0
- data/app/models/decidim/consultations/response_group.rb +4 -0
- data/app/permissions/decidim/consultations/permissions.rb +2 -0
- data/app/presenters/decidim/consultations/question_stats_presenter.rb +1 -1
- 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/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/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/consultation.html.erb +1 -0
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +0 -1
- data/config/locales/bg-BG.yml +1 -0
- data/config/locales/bg.yml +1 -0
- data/config/locales/ca.yml +4 -1
- data/config/locales/cs.yml +12 -9
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +82 -1
- data/config/locales/el.yml +377 -0
- data/config/locales/en.yml +4 -1
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +4 -1
- data/config/locales/es-PY.yml +4 -1
- data/config/locales/es.yml +4 -1
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +0 -1
- data/config/locales/fi-plain.yml +4 -1
- data/config/locales/fi.yml +15 -12
- data/config/locales/fr-CA.yml +377 -0
- data/config/locales/fr.yml +5 -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/hr.yml +1 -0
- data/config/locales/hu.yml +0 -1
- data/config/locales/id-ID.yml +0 -1
- data/config/locales/is-IS.yml +0 -1
- data/config/locales/is.yml +185 -0
- data/config/locales/it.yml +58 -55
- data/config/locales/ja-JP.yml +367 -0
- data/config/locales/ja.yml +367 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +383 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +4 -1
- data/config/locales/no.yml +4 -3
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +183 -102
- 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 +9 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +46 -12
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +0 -1
- data/config/locales/uk.yml +0 -1
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +367 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20200320105916_index_foreign_keys_in_decidim_consultations_votes.rb +7 -0
- data/db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb +9 -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 +19 -17
- data/lib/decidim/consultations/test/factories.rb +1 -0
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +52 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05dc947927d24aaa23cca0b8ee0b1f5bbb79655371ade82d8d5e23bec27cacaa
|
4
|
+
data.tar.gz: 7f83ff137448f7db439b935a0feae66314013ea280ff9da5b7e5a8fbc3944001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ce6fc1103e520688a05445a5487193ed83063f9c61c5f319cc3f1f5bdaa16bd6f99aa08107371e9dd74effea3309b96dd546e04a42cecc50a6e8a848c756722
|
7
|
+
data.tar.gz: 25eefee094a3e03c7c1ec56b4c70c7435936c7318239ef3e899d6310dcab8913013d7eccf36006e1af656e218f2e37cf09899cd781490f92983dc924a7cd7bc9
|
@@ -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
|
}
|
@@ -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>
|
@@ -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
|
@@ -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
|
@@ -6,6 +6,7 @@ module Decidim
|
|
6
6
|
# A form object used to create consultations from the admin dashboard.
|
7
7
|
class ConsultationForm < Form
|
8
8
|
include TranslatableAttributes
|
9
|
+
include Decidim::HasUploadValidations
|
9
10
|
|
10
11
|
mimic :consultation
|
11
12
|
|
@@ -29,12 +30,10 @@ module Decidim
|
|
29
30
|
validates :end_voting_date, presence: true, date: { after_or_equal_to: :start_voting_date }
|
30
31
|
validate :slug_uniqueness
|
31
32
|
|
32
|
-
validates :banner_image,
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } },
|
37
|
-
file_content_type: { allow: ["image/jpeg", "image/png"] }
|
33
|
+
validates :banner_image, passthru: { to: Decidim::Consultation }
|
34
|
+
validates :introductory_image, passthru: { to: Decidim::Consultation }
|
35
|
+
|
36
|
+
alias organization current_organization
|
38
37
|
|
39
38
|
def highlighted_scope
|
40
39
|
@highlighted_scope ||= current_organization.scopes.find_by(id: decidim_highlighted_scope_id)
|
@@ -6,6 +6,7 @@ module Decidim
|
|
6
6
|
# A form object used to create questions for a consultation from the admin dashboard.
|
7
7
|
class QuestionForm < Form
|
8
8
|
include TranslatableAttributes
|
9
|
+
include Decidim::HasUploadValidations
|
9
10
|
|
10
11
|
mimic :question
|
11
12
|
|
@@ -32,17 +33,15 @@ module Decidim
|
|
32
33
|
validates :slug, presence: true, format: { with: Decidim::Consultations::Question.slug_format }
|
33
34
|
validates :title, :promoter_group, :participatory_scope, :subtitle, :what_is_decided, translatable_presence: true
|
34
35
|
validates :decidim_scope_id, presence: true
|
35
|
-
validates :hero_image,
|
36
|
-
|
37
|
-
file_content_type: { allow: ["image/jpeg", "image/png"] }
|
38
|
-
validates :banner_image,
|
39
|
-
file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } },
|
40
|
-
file_content_type: { allow: ["image/jpeg", "image/png"] }
|
36
|
+
validates :hero_image, passthru: { to: Decidim::Consultations::Question }
|
37
|
+
validates :banner_image, passthru: { to: Decidim::Consultations::Question }
|
41
38
|
validate :slug_uniqueness
|
42
39
|
validates :origin_scope, :origin_title, translatable_presence: true, if: :has_origin_data?
|
43
40
|
validates :i_frame_url, presence: true, if: :external_voting
|
44
41
|
validates :order, numericality: { only_integer: true, allow_nil: true, allow_blank: true }
|
45
42
|
|
43
|
+
alias organization current_organization
|
44
|
+
|
46
45
|
private
|
47
46
|
|
48
47
|
def slug_uniqueness
|
@@ -12,6 +12,10 @@ module Decidim
|
|
12
12
|
include Decidim::ParticipatorySpaceResourceable
|
13
13
|
include Decidim::Randomable
|
14
14
|
include Decidim::Searchable
|
15
|
+
include Decidim::HasUploadValidations
|
16
|
+
include Decidim::TranslatableResource
|
17
|
+
|
18
|
+
translatable_fields :title, :subtitle, :description
|
15
19
|
|
16
20
|
belongs_to :organization,
|
17
21
|
foreign_key: "decidim_organization_id",
|
@@ -27,10 +31,15 @@ module Decidim
|
|
27
31
|
inverse_of: :consultation,
|
28
32
|
dependent: :destroy
|
29
33
|
|
34
|
+
alias component_ids question_ids
|
35
|
+
|
30
36
|
validates :slug, uniqueness: { scope: :organization }
|
31
37
|
validates :slug, presence: true, format: { with: Decidim::Consultation.slug_format }
|
32
38
|
|
39
|
+
validates_upload :banner_image
|
33
40
|
mount_uploader :banner_image, Decidim::BannerImageUploader
|
41
|
+
|
42
|
+
validates_upload :introductory_image
|
34
43
|
mount_uploader :introductory_image, Decidim::BannerImageUploader
|
35
44
|
|
36
45
|
scope :upcoming, -> { published.where("start_voting_date > ?", Time.now.utc) }
|
@@ -96,5 +105,10 @@ module Decidim
|
|
96
105
|
def closed?
|
97
106
|
!active?
|
98
107
|
end
|
108
|
+
|
109
|
+
# Allow ransacker to search for a key in a hstore column (`title`.`en`)
|
110
|
+
ransacker :title do |parent|
|
111
|
+
Arel::Nodes::InfixOperation.new("->>", parent.table[:title], Arel::Nodes.build_quoted(I18n.locale.to_s))
|
112
|
+
end
|
99
113
|
end
|
100
114
|
end
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
include Decidim::HasResourcePermission
|
8
8
|
include Decidim::Participable
|
9
9
|
include Decidim::Publicable
|
10
|
-
include Decidim::
|
10
|
+
include Decidim::ScopableParticipatorySpace
|
11
11
|
include Decidim::Comments::Commentable
|
12
12
|
include Decidim::Followable
|
13
13
|
include Decidim::HasAttachments
|
@@ -16,6 +16,10 @@ module Decidim
|
|
16
16
|
include Decidim::Loggable
|
17
17
|
include Decidim::ParticipatorySpaceResourceable
|
18
18
|
include Decidim::Randomable
|
19
|
+
include Decidim::HasUploadValidations
|
20
|
+
include Decidim::TranslatableResource
|
21
|
+
|
22
|
+
translatable_fields :title, :subtitle, :what_is_decided, :promoter_group, :participatory_scope, :question_context, :origin_scope, :origin_title, :instructions
|
19
23
|
|
20
24
|
belongs_to :consultation,
|
21
25
|
foreign_key: "decidim_consultation_id",
|
@@ -51,7 +55,10 @@ module Decidim
|
|
51
55
|
dependent: :destroy,
|
52
56
|
as: :participatory_space
|
53
57
|
|
58
|
+
validates_upload :hero_image
|
54
59
|
mount_uploader :hero_image, Decidim::HeroImageUploader
|
60
|
+
|
61
|
+
validates_upload :banner_image
|
55
62
|
mount_uploader :banner_image, Decidim::BannerImageUploader
|
56
63
|
|
57
64
|
default_scope { order(order: :asc) }
|
@@ -193,6 +200,10 @@ module Decidim
|
|
193
200
|
def allow_resource_permissions?
|
194
201
|
true
|
195
202
|
end
|
203
|
+
|
204
|
+
def attachment_context
|
205
|
+
:admin
|
206
|
+
end
|
196
207
|
end
|
197
208
|
end
|
198
209
|
end
|
@@ -3,6 +3,10 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
class Response < ApplicationRecord
|
6
|
+
include Decidim::TranslatableResource
|
7
|
+
|
8
|
+
translatable_fields :title
|
9
|
+
|
6
10
|
belongs_to :question,
|
7
11
|
foreign_key: "decidim_consultations_questions_id",
|
8
12
|
class_name: "Decidim::Consultations::Question",
|
@@ -3,6 +3,10 @@
|
|
3
3
|
module Decidim
|
4
4
|
module Consultations
|
5
5
|
class ResponseGroup < ApplicationRecord
|
6
|
+
include Decidim::TranslatableResource
|
7
|
+
|
8
|
+
translatable_fields :title
|
9
|
+
|
6
10
|
belongs_to :question,
|
7
11
|
foreign_key: "decidim_consultations_questions_id",
|
8
12
|
class_name: "Decidim::Consultations::Question",
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Consultations
|
5
|
+
# This type represents a consultation.
|
6
|
+
ConsultationQuestionType = GraphQL::ObjectType.define do
|
7
|
+
interfaces [
|
8
|
+
-> { Decidim::Core::ScopableInterface },
|
9
|
+
-> { Decidim::Core::AttachableInterface },
|
10
|
+
-> { Decidim::Comments::CommentableInterface }
|
11
|
+
]
|
12
|
+
|
13
|
+
name "ConsultationQuestion"
|
14
|
+
description "A consultation question"
|
15
|
+
|
16
|
+
field :id, !types.ID, "Internal ID of the question"
|
17
|
+
field :title, Decidim::Core::TranslatedFieldType, "Title of the question"
|
18
|
+
field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this question"
|
19
|
+
field :slug, !types.String, "Slug of the question"
|
20
|
+
field :createdAt, !Decidim::Core::DateTimeType, "The time this question was created", property: :created_at
|
21
|
+
field :updatedAt, !Decidim::Core::DateTimeType, "The time this question was updated", property: :updated_at
|
22
|
+
field :publishedAt, !Decidim::Core::DateTimeType, "The time this question was published", property: :published_at
|
23
|
+
|
24
|
+
field :components, types[Decidim::Core::ComponentInterface] do
|
25
|
+
description "Lists the components this space contains."
|
26
|
+
|
27
|
+
resolve ->(participatory_space, _args, _ctx) {
|
28
|
+
Decidim::Component.where(
|
29
|
+
participatory_space: participatory_space
|
30
|
+
).published
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
field :bannerImage, types.String, "The banner image for this question", property: :banner_image
|
35
|
+
field :heroImage, types.String, "The hero image for this question", property: :hero_image
|
36
|
+
|
37
|
+
field :whatIsDecided, Decidim::Core::TranslatedFieldType, "What is decided in this question", property: :what_is_decided
|
38
|
+
field :promoterGroup, Decidim::Core::TranslatedFieldType, "The promoter group of this question", property: :promoter_group
|
39
|
+
field :participatoryScope, Decidim::Core::TranslatedFieldType, "The participatory scope of this question", property: :participatory_scope
|
40
|
+
field :questionContext, Decidim::Core::TranslatedFieldType, "The context for this question", property: :question_context
|
41
|
+
field :reference, types.String, "The reference for this question", property: :reference
|
42
|
+
field :hashtag, types.String, "The hashtag of this question", property: :hashtag
|
43
|
+
field :votesCount, types.Int, "The number of votes in this question", property: :votes_count
|
44
|
+
field :originScope, Decidim::Core::TranslatedFieldType, "The origin scope of this question", property: :origin_scope
|
45
|
+
field :originTitle, Decidim::Core::TranslatedFieldType, "The origin title of this question", property: :origin_title
|
46
|
+
field :originUrl, types.String, "The origin URL for this question", property: :origin_url
|
47
|
+
field :iFrameUrl, types.String, "The iframe URL for this question", property: :i_frame_url
|
48
|
+
field :externalVoting, types.Boolean, "If the question has external voting", property: :external_voting
|
49
|
+
field :responsesCount, types.Int, "The number of responses for this question", property: :responses_count
|
50
|
+
field :order, types.Int, "The order in which the question should be represented", property: :order
|
51
|
+
field :maxVotes, types.Int, "The maximum number of votes in this question", property: :max_votes
|
52
|
+
field :minVotes, types.Int, "The minimum number of votes in this question", property: :min_votes
|
53
|
+
field :responseGroupsCount, types.Int, "The number of group responses for this question", property: :response_groups_count
|
54
|
+
field :instructions, Decidim::Core::TranslatedFieldType, "Instructions for this question", property: :instructions
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|