decidim-consultations 0.13.1 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/consultations/consultation_cell.rb +1 -1
- data/app/controllers/concerns/decidim/consultations/needs_question.rb +1 -3
- data/app/controllers/decidim/consultations/admin/question_attachments_controller.rb +0 -4
- data/app/controllers/decidim/consultations/consultations_controller.rb +1 -0
- data/app/controllers/decidim/consultations/questions_controller.rb +1 -0
- data/app/views/decidim/consultations/consultations/index.html.erb +7 -0
- data/app/views/decidim/consultations/consultations/show.html.erb +9 -0
- data/app/views/decidim/consultations/questions/_vote_button.html.erb +16 -21
- data/app/views/layouts/decidim/_question_header.html.erb +1 -1
- data/app/views/layouts/decidim/admin/consultations.html.erb +0 -11
- data/config/locales/fi.yml +112 -112
- data/config/locales/hu.yml +273 -0
- data/config/locales/pt-BR.yml +6 -6
- data/config/locales/ru.yml +2 -2
- data/config/locales/uk.yml +3 -3
- data/db/migrate/20180712111146_remove_unused_search_indexs.rb +12 -0
- data/lib/decidim/consultations/admin_engine.rb +1 -0
- data/lib/decidim/consultations/test/factories.rb +8 -8
- data/lib/decidim/consultations/version.rb +1 -1
- metadata +13 -12
- data/app/controllers/concerns/decidim/consultations/action_authorization.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21e9abe4439a58b2030ce759d0aa50bdab36d38c7b31de283221109a538647d
|
4
|
+
data.tar.gz: 1b5f5bda15c668203dd873e224703dc171aa25c2a8270eb7c84e98a434b4232f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b42db63b722534a9b82343a0191877374b887ffd92ae8c92cf28696d5a73c9d658542046d66942deb9a0e6617440bd5000a4737951b51910b95d9a7d392d9bea
|
7
|
+
data.tar.gz: 9b302b0c5a5bd4a471a3050a4f345182712b9da11b09018d521e0ac5d2d30765fb958ba5a28a4c2c57420276cb642f239535a9ce9b1e4f0de15debf8aa2daaa4
|
@@ -11,19 +11,17 @@ module Decidim
|
|
11
11
|
:sorted_results
|
12
12
|
|
13
13
|
helper Decidim::WidgetUrlsHelper
|
14
|
-
helper Decidim::ActionAuthorizationHelper
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
18
17
|
def self.extended(base)
|
19
18
|
base.extend Decidim::NeedsOrganization, InstanceMethods
|
20
|
-
base.include Decidim::Consultations::ActionAuthorization
|
21
19
|
|
22
20
|
enhance_controller(base)
|
23
21
|
end
|
24
22
|
|
25
23
|
def self.included(base)
|
26
|
-
base.include Decidim::NeedsOrganization, InstanceMethods
|
24
|
+
base.include Decidim::NeedsOrganization, InstanceMethods
|
27
25
|
|
28
26
|
enhance_controller(base)
|
29
27
|
end
|
@@ -14,6 +14,7 @@ module Decidim
|
|
14
14
|
helper Decidim::Comments::CommentsHelper
|
15
15
|
helper Decidim::AttachmentsHelper
|
16
16
|
helper Decidim::ResourceReferenceHelper
|
17
|
+
helper Decidim::ActionAuthorizationHelper
|
17
18
|
|
18
19
|
def show
|
19
20
|
enforce_permission_to :read, :question, question: current_question
|
@@ -1,3 +1,12 @@
|
|
1
|
+
<%
|
2
|
+
edit_link(
|
3
|
+
resource_locator(current_consultation).edit,
|
4
|
+
:update,
|
5
|
+
:consultation,
|
6
|
+
consultation: current_consultation
|
7
|
+
)
|
8
|
+
%>
|
9
|
+
|
1
10
|
<%= render partial: "consultation_details", locals: { consultation: current_consultation } %>
|
2
11
|
<%= render partial: "highlighted_questions", locals: { consultation: current_consultation } %>
|
3
12
|
<%= render partial: "regular_questions", locals: { consultation: current_consultation } %>
|
@@ -10,28 +10,24 @@
|
|
10
10
|
</div>
|
11
11
|
</div>
|
12
12
|
<% elsif question.consultation.finished? && signed_in? && question.voted_by?(current_user) %>
|
13
|
-
<%=
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
id: "unvote_button" do %>
|
13
|
+
<%= button_to decidim_consultations.question_question_votes_path(question),
|
14
|
+
method: :delete,
|
15
|
+
remote: true,
|
16
|
+
data: { disable: true },
|
17
|
+
class: "card__button button expanded success disabled",
|
18
|
+
id: "unvote_button" do %>
|
20
19
|
<div class="vote-button-caption">
|
21
20
|
<%= t("questions.vote_button.already_voted", scope: "decidim") %>
|
22
21
|
</div>
|
23
22
|
<% end %>
|
24
23
|
<% elsif signed_in? && question.consultation.active? %>
|
25
24
|
<% if allowed_to? :unvote, :question, question: question %>
|
26
|
-
<%=
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
},
|
33
|
-
class: "card__button button expanded success",
|
34
|
-
id: "unvote_button" do %>
|
25
|
+
<%= button_to decidim_consultations.question_question_votes_path(question),
|
26
|
+
method: :delete,
|
27
|
+
remote: true,
|
28
|
+
data: { disable: true },
|
29
|
+
class: "card__button button expanded success",
|
30
|
+
id: "unvote_button" do %>
|
35
31
|
<div class="vote-button-caption"
|
36
32
|
data-original="<%= t("questions.vote_button.already_voted", scope: "decidim") %>"
|
37
33
|
data-replace="<%= t("questions.vote_button.already_voted_hover", scope: "decidim") %>">
|
@@ -44,11 +40,10 @@
|
|
44
40
|
<% end %>
|
45
41
|
<% end %>
|
46
42
|
<% elsif question.consultation.active? %>
|
47
|
-
<%=
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
id: "vote_button" do %>
|
43
|
+
<%= logged_button_to decidim_consultations.question_question_votes_path(question),
|
44
|
+
class: "card__button button expanded",
|
45
|
+
data: { disable: true },
|
46
|
+
id: "vote_button" do %>
|
52
47
|
<div class="vote-button-caption">
|
53
48
|
<%= t("questions.vote_button.vote", scope: "decidim") %>
|
54
49
|
</div>
|
@@ -1,14 +1,3 @@
|
|
1
|
-
<% content_for :secondary_nav do %>
|
2
|
-
<div class="secondary-nav">
|
3
|
-
<div class="secondary-nav__title">
|
4
|
-
<%= t "decidim.admin.titles.consultations" %>
|
5
|
-
</div>
|
6
|
-
<div class="secondary-nav__actions">
|
7
|
-
<%= link_to t("actions.new", scope: "decidim.admin", name: t("models.consultation.name", scope: "decidim.admin")), ["new", "consultation"], class: "button expanded small" if allowed_to? :create, :consultation %>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
<% end %>
|
11
|
-
|
12
1
|
<%= render "layouts/decidim/admin/application" do %>
|
13
2
|
<div class="process-title">
|
14
3
|
<div class="process-title-content">
|
data/config/locales/fi.yml
CHANGED
@@ -3,33 +3,33 @@ fi:
|
|
3
3
|
attributes:
|
4
4
|
consultation:
|
5
5
|
banner_image: Bannerikuva
|
6
|
-
decidim_highlighted_scope_id: Korostettu
|
6
|
+
decidim_highlighted_scope_id: Korostettu teema
|
7
7
|
description: Kuvaus
|
8
8
|
end_voting_date: Äänestys päättyy
|
9
|
-
introductory_image:
|
10
|
-
introductory_video_url:
|
11
|
-
questions:
|
12
|
-
slug: URL-
|
9
|
+
introductory_image: Esittelykuva
|
10
|
+
introductory_video_url: Esittelyvideon URL-osoite
|
11
|
+
questions: Kysymykset
|
12
|
+
slug: URL-tunniste
|
13
13
|
start_voting_date: Äänestys alkaa
|
14
|
-
subtitle:
|
15
|
-
title:
|
14
|
+
subtitle: Alaotsikko
|
15
|
+
title: Otsikko
|
16
16
|
question:
|
17
17
|
banner_image: Bannerikuva
|
18
18
|
decidim_scope_id: Kunnan alue
|
19
19
|
hashtag: Hashtag
|
20
|
-
hero_image:
|
20
|
+
hero_image: Etusivun kuva
|
21
21
|
i_frame_url: Ulkopuolisen äänestysjärjestelmän URL-osoite
|
22
|
-
origin_scope:
|
23
|
-
origin_title:
|
24
|
-
origin_url:
|
25
|
-
participatory_scope:
|
26
|
-
promoter_group:
|
27
|
-
question_context:
|
22
|
+
origin_scope: Teema
|
23
|
+
origin_title: Alkuperä
|
24
|
+
origin_url: Alkuperän URL-osoite
|
25
|
+
participatory_scope: Osallistumisen teema
|
26
|
+
promoter_group: Suositteluryhmä
|
27
|
+
question_context: Konteksti
|
28
28
|
reference: Viite
|
29
29
|
scope: Kunnan alue
|
30
|
-
slug: URL-
|
31
|
-
subtitle:
|
32
|
-
title:
|
30
|
+
slug: URL-tunniste
|
31
|
+
subtitle: Alaotsikko
|
32
|
+
title: Otsikko
|
33
33
|
vote: Ulkoinen äänestysjärjestelmä
|
34
34
|
what_is_decided: Mitä päätetään
|
35
35
|
errors:
|
@@ -39,235 +39,235 @@ fi:
|
|
39
39
|
activerecord:
|
40
40
|
models:
|
41
41
|
decidim/consultations:
|
42
|
-
one:
|
43
|
-
other:
|
42
|
+
one: Kuuleminen
|
43
|
+
other: Kuulemiset
|
44
44
|
decidim/consultations/question:
|
45
|
-
one:
|
46
|
-
other:
|
45
|
+
one: Kysymys
|
46
|
+
other: Kysymykset
|
47
47
|
decidim/consultations/response:
|
48
48
|
one: Vastaus
|
49
49
|
other: Vastaukset
|
50
50
|
decidim/consultations/vote:
|
51
|
-
one:
|
52
|
-
other:
|
51
|
+
one: Ääni
|
52
|
+
other: Äänet
|
53
53
|
decidim:
|
54
54
|
admin:
|
55
55
|
actions:
|
56
56
|
new_consultation: Uusi kuuleminen
|
57
57
|
new_question: Uusi kysymys
|
58
58
|
new_response: Uusi vastaus
|
59
|
-
publish_results: Julkaise
|
60
|
-
unpublish_results:
|
59
|
+
publish_results: Julkaise tulokset
|
60
|
+
unpublish_results: Peru tulosten julkistus
|
61
61
|
consultation_publications:
|
62
62
|
create:
|
63
|
-
error:
|
64
|
-
success: Kuuleminen
|
63
|
+
error: Tämän kuulemisen julkaisussa tapahtui virhe.
|
64
|
+
success: Kuuleminen julkaistu onnistuneesti.
|
65
65
|
destroy:
|
66
|
-
error:
|
67
|
-
success:
|
66
|
+
error: Tämän kuulemisen julkaisun perumisessa tapahtui virhe.
|
67
|
+
success: Kuulemisen julkaisu peruttu onnistuneesti.
|
68
68
|
consultation_results_publications:
|
69
69
|
create:
|
70
|
-
error: Virhe
|
71
|
-
success:
|
70
|
+
error: Virhe julkaistasessa tämän kuulemisen tuloksia.
|
71
|
+
success: Kuulemisen tulokset julkaistiin onnistuneesti.
|
72
72
|
destroy:
|
73
|
-
error: Virhe
|
74
|
-
success:
|
73
|
+
error: Virhe tämän kuulemisen tulosten julkaisun perumisessa.
|
74
|
+
success: Kuulemisen tulosten julkaisu peruttu onnistuneesti.
|
75
75
|
consultations:
|
76
76
|
create:
|
77
|
-
error: Virhe
|
78
|
-
success: Kuuleminen
|
77
|
+
error: Virhe uuden kuulemisen luonnissa.
|
78
|
+
success: Kuuleminen luotu onnistuneesti.
|
79
79
|
destroy:
|
80
|
-
success: Kuuleminen
|
80
|
+
success: Kuuleminen poistettu onnistuneesti.
|
81
81
|
edit:
|
82
|
-
update:
|
82
|
+
update: Päivitä
|
83
83
|
form:
|
84
|
-
slug_help: 'URL-
|
84
|
+
slug_help: 'URL-tunnisteita käytetään luomaan URL-osoitteita, jotka viittaavat tähän kuulemiseen. Hyväksyy vain kirjaimet, numerot ja viivat. Kirjaimen on oltava ensimmäinen merkki tunnisteessa. Esimerkki: %{url}'
|
85
85
|
title: Yleistä tietoa
|
86
86
|
index:
|
87
87
|
not_published: Ei julkaistu
|
88
88
|
published: Julkaistu
|
89
89
|
new:
|
90
|
-
create:
|
90
|
+
create: Luo
|
91
91
|
title: Uusi kuuleminen
|
92
92
|
update:
|
93
93
|
error: Virhe päivitettäessä tätä kuulemista.
|
94
|
-
success: Kuuleminen
|
94
|
+
success: Kuuleminen päivitetty onnistuneesti.
|
95
95
|
menu:
|
96
|
-
consultations:
|
96
|
+
consultations: Kuulemiset
|
97
97
|
consultations_submenu:
|
98
98
|
info: Tiedot
|
99
|
-
questions:
|
99
|
+
questions: Kysymykset
|
100
100
|
questions_submenu:
|
101
|
-
components:
|
102
|
-
consultation:
|
101
|
+
components: Komponentit
|
102
|
+
consultation: Kuuleminen
|
103
103
|
info: Tiedot
|
104
104
|
responses: Vastaukset
|
105
105
|
models:
|
106
106
|
consultation:
|
107
107
|
fields:
|
108
|
-
created_at:
|
108
|
+
created_at: Luontiaika
|
109
109
|
published: Julkaistu
|
110
|
-
title:
|
110
|
+
title: Otsikko
|
111
111
|
name:
|
112
|
-
one:
|
113
|
-
other:
|
112
|
+
one: Kuuleminen
|
113
|
+
other: Kuulemiset
|
114
114
|
question:
|
115
115
|
fields:
|
116
|
-
created_at:
|
116
|
+
created_at: Luontiaika
|
117
117
|
published: Julkaistu
|
118
|
-
title:
|
118
|
+
title: Otsikko
|
119
119
|
name:
|
120
|
-
one:
|
121
|
-
other:
|
120
|
+
one: Kysymys
|
121
|
+
other: Kysymykset
|
122
122
|
response:
|
123
123
|
fields:
|
124
|
-
created_at:
|
125
|
-
title:
|
124
|
+
created_at: Luontiaika
|
125
|
+
title: Otsikko
|
126
126
|
name:
|
127
127
|
one: Vastaus
|
128
128
|
other: Vastaukset
|
129
129
|
question_publications:
|
130
130
|
create:
|
131
|
-
error: Virhe
|
132
|
-
success: Kysymys
|
131
|
+
error: Virhe julkaistaessa tätä kysymystä.
|
132
|
+
success: Kysymys julkaistu onnistuneesti.
|
133
133
|
destroy:
|
134
|
-
error: Virhe
|
135
|
-
success:
|
134
|
+
error: Virhe tämän kysymyksen julkaisun perumisessa.
|
135
|
+
success: Kysymyksen julkaisu peruutettu onnistuneesti.
|
136
136
|
questions:
|
137
137
|
create:
|
138
138
|
error: Uuden kysymyksen luomisessa tapahtui virhe.
|
139
|
-
success:
|
139
|
+
success: Kysymys luotu onnistuneesti.
|
140
140
|
destroy:
|
141
|
-
success: Kysely
|
141
|
+
success: Kysely poistettu onnistuneesti.
|
142
142
|
edit:
|
143
|
-
update:
|
143
|
+
update: Päivitä
|
144
144
|
form:
|
145
145
|
title: Yleistä tietoa
|
146
146
|
index:
|
147
147
|
not_published: Ei julkaistu
|
148
148
|
published: Julkaistu
|
149
149
|
new:
|
150
|
-
create:
|
150
|
+
create: Luo
|
151
151
|
title: Uusi kysymys
|
152
152
|
update:
|
153
|
-
error:
|
154
|
-
success: Kysymys
|
153
|
+
error: Tämän kysymyksen päivityksessä tapahtui virhe.
|
154
|
+
success: Kysymys päivitetty onnistuneesti.
|
155
155
|
responses:
|
156
156
|
create:
|
157
|
-
error:
|
158
|
-
success: Vastaus onnistuneesti
|
157
|
+
error: Uuden vastauksen luonnissa tapahtui virhe.
|
158
|
+
success: Vastaus luotu onnistuneesti.
|
159
159
|
destroy:
|
160
|
-
error:
|
161
|
-
success: Vastaus
|
160
|
+
error: Poistettaessa vastausta tapahtui virhe.
|
161
|
+
success: Vastaus poistettu onnistuneesti.
|
162
162
|
edit:
|
163
|
-
update:
|
163
|
+
update: Päivitä
|
164
164
|
form:
|
165
165
|
title: Yleistä tietoa
|
166
166
|
new:
|
167
|
-
create:
|
167
|
+
create: Luo
|
168
168
|
title: Uusi vastaus
|
169
169
|
update:
|
170
170
|
error: Tämän vastauksen päivittämisessä tapahtui virhe.
|
171
|
-
success: Vastaus
|
171
|
+
success: Vastaus päivitetty onnistuneesti.
|
172
172
|
titles:
|
173
|
-
consultations:
|
174
|
-
questions:
|
173
|
+
consultations: Kuulemiset
|
174
|
+
questions: Kysymykset
|
175
175
|
responses: Vastaukset
|
176
176
|
consultations:
|
177
177
|
consultation:
|
178
|
-
start_voting_date:
|
178
|
+
start_voting_date: Äänestyksen alkamisajankohta
|
179
179
|
view_results: Näytä tulokset
|
180
180
|
consultation_card:
|
181
181
|
view_results: Näytä tulokset
|
182
182
|
consultations:
|
183
183
|
orders:
|
184
|
-
label: 'Lajittele
|
185
|
-
random:
|
186
|
-
recent: Viimeisin
|
184
|
+
label: 'Lajittele kuulemiset:'
|
185
|
+
random: Sattumanvarainen järjestys
|
186
|
+
recent: Viimeisin ensin
|
187
187
|
count:
|
188
188
|
title:
|
189
189
|
one: "%{count} kuuleminen"
|
190
|
-
other: "%{count}
|
190
|
+
other: "%{count} kuulemista"
|
191
191
|
filters:
|
192
|
-
active:
|
192
|
+
active: Aktiiviset
|
193
193
|
all: Kaikki
|
194
194
|
finished: Valmiit
|
195
195
|
search: Hae
|
196
|
-
state:
|
197
|
-
upcoming:
|
196
|
+
state: Tila
|
197
|
+
upcoming: Tulevat
|
198
198
|
filters_small_view:
|
199
199
|
close_modal: Sulje ikkuna
|
200
|
-
filter:
|
200
|
+
filter: Suodata
|
201
201
|
filter_by: Suodata
|
202
|
-
unfold:
|
202
|
+
unfold: Avaa
|
203
203
|
highlighted_questions:
|
204
|
-
title: Kysymykset %{scope_name}
|
204
|
+
title: Kysymykset teemasta %{scope_name}
|
205
205
|
index:
|
206
|
-
title:
|
206
|
+
title: Kuulemiset
|
207
207
|
question:
|
208
|
-
take_part:
|
208
|
+
take_part: Osallistu
|
209
209
|
view_results: Näytä tulokset
|
210
210
|
votes_out_of:
|
211
|
-
one: ääni
|
212
|
-
other:
|
211
|
+
one: ääni yhteismäärästä
|
212
|
+
other: ääntä yhteismäärästä
|
213
213
|
question_votes:
|
214
214
|
create:
|
215
|
-
error: Kysymystä äänestäessä
|
215
|
+
error: Kysymystä äänestäessä tapahtui virheitä
|
216
216
|
regular_questions:
|
217
|
-
title:
|
217
|
+
title: Tätä kuulemista koskevat kysymykset
|
218
218
|
show:
|
219
219
|
badge_name:
|
220
220
|
finished: Valmiit
|
221
|
-
open:
|
222
|
-
open_votes:
|
221
|
+
open: Avoimet
|
222
|
+
open_votes: Äänestys avoinna
|
223
223
|
published_results: Tulokset julkaistu
|
224
224
|
footer_button_text:
|
225
225
|
debate: Keskustelu
|
226
|
-
view:
|
226
|
+
view: Näytä
|
227
227
|
view_results: Näytä tulokset
|
228
|
-
vote:
|
228
|
+
vote: Äänestä
|
229
229
|
unspecified: Ei määritelty
|
230
230
|
menu:
|
231
|
-
consultations:
|
231
|
+
consultations: Kuulemiset
|
232
232
|
pages:
|
233
233
|
home:
|
234
234
|
statistics:
|
235
|
-
consultations_count:
|
235
|
+
consultations_count: Kuulemiset
|
236
236
|
questions:
|
237
237
|
results:
|
238
|
-
title:
|
238
|
+
title: Tulokset
|
239
239
|
show:
|
240
240
|
read_more: Lue lisää
|
241
241
|
statistics:
|
242
|
-
assistants_count_title:
|
242
|
+
assistants_count_title: Avustajat
|
243
243
|
comments_count_title: Kommentit
|
244
|
-
meetings_count_title:
|
245
|
-
supports_count_title:
|
244
|
+
meetings_count_title: Tapaamiset
|
245
|
+
supports_count_title: Kannatukset
|
246
246
|
technical_info:
|
247
247
|
technical_data: Tekniset tiedot
|
248
248
|
vote_button:
|
249
|
-
already_voted:
|
250
|
-
already_voted_hover: Peruuta
|
251
|
-
starting_from:
|
252
|
-
vote:
|
249
|
+
already_voted: Äänestetty aikaisemmin
|
250
|
+
already_voted_hover: Peruuta kannatus
|
251
|
+
starting_from: Alkaa %{date}
|
252
|
+
vote: Äänestä
|
253
253
|
vote_modal:
|
254
|
-
contextual_help:
|
255
|
-
title: 'Kuuleminen:
|
254
|
+
contextual_help: Valitse vaihtoehto.
|
255
|
+
title: 'Kuuleminen: kysymyksen kannatus'
|
256
256
|
vote_modal_confirm:
|
257
|
-
change:
|
258
|
-
confirm:
|
257
|
+
change: Muuta
|
258
|
+
confirm: Vahvista
|
259
259
|
contextual_help: Vahvista valittu vaihtoehto.
|
260
|
-
title: 'Kuuleminen: vahvista
|
260
|
+
title: 'Kuuleminen: vahvista kannatus'
|
261
261
|
layouts:
|
262
262
|
decidim:
|
263
263
|
admin:
|
264
264
|
question:
|
265
265
|
attachments: Liitteet
|
266
|
-
categories:
|
266
|
+
categories: Ryhmät
|
267
267
|
consultation_voting_data:
|
268
268
|
start_voting_date: Äänestys alkaa
|
269
269
|
question_components:
|
270
270
|
question_menu_item: Kysymys
|
271
|
-
unfold:
|
271
|
+
unfold: Avaa
|
272
272
|
question_header:
|
273
|
-
back_to_consultation:
|
273
|
+
back_to_consultation: Näytä kaikki kuulemiset
|
@@ -0,0 +1,273 @@
|
|
1
|
+
hu:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
consultation:
|
5
|
+
banner_image: Banner kép
|
6
|
+
decidim_highlighted_scope_id: Kiemelt hatáskör
|
7
|
+
description: Leírás
|
8
|
+
end_voting_date: Szavazás vége
|
9
|
+
introductory_image: Bevezető kép
|
10
|
+
introductory_video_url: Bevezető videó URL
|
11
|
+
questions: Kérdések
|
12
|
+
slug: URL slug
|
13
|
+
start_voting_date: Szavazás kezdése
|
14
|
+
subtitle: Felirat
|
15
|
+
title: Cím
|
16
|
+
question:
|
17
|
+
banner_image: Banner kép
|
18
|
+
decidim_scope_id: Helyhatósági terület
|
19
|
+
hashtag: Kettőskereszt
|
20
|
+
hero_image: Kezdő kép
|
21
|
+
i_frame_url: Külső szavazási rendszer URL
|
22
|
+
origin_scope: Hatáskör
|
23
|
+
origin_title: Kiindulópont
|
24
|
+
origin_url: Kiindulópont URL
|
25
|
+
participatory_scope: Részvétel hatásköre
|
26
|
+
promoter_group: Promóciós csoport
|
27
|
+
question_context: Kontextus
|
28
|
+
reference: Hivatkozás
|
29
|
+
scope: Helyhatósági terület
|
30
|
+
slug: URL slug
|
31
|
+
subtitle: Felirat
|
32
|
+
title: Cím
|
33
|
+
vote: Külső szavazási rendszer
|
34
|
+
what_is_decided: Mi a döntés
|
35
|
+
errors:
|
36
|
+
vote:
|
37
|
+
decidim_consultations_response_id:
|
38
|
+
not_found: Válasz nem található.
|
39
|
+
activerecord:
|
40
|
+
models:
|
41
|
+
decidim/consultations:
|
42
|
+
one: Konzultáció
|
43
|
+
other: Konzultációk
|
44
|
+
decidim/consultations/question:
|
45
|
+
one: Kérdés
|
46
|
+
other: Kérdések
|
47
|
+
decidim/consultations/response:
|
48
|
+
one: Válasz
|
49
|
+
other: Válaszok
|
50
|
+
decidim/consultations/vote:
|
51
|
+
one: Szavazat
|
52
|
+
other: Szavazatok
|
53
|
+
decidim:
|
54
|
+
admin:
|
55
|
+
actions:
|
56
|
+
new_consultation: Új konzultáció
|
57
|
+
new_question: Új kérdés
|
58
|
+
new_response: Új válasz
|
59
|
+
publish_results: Eredmények közzététele
|
60
|
+
unpublish_results: Eredmények visszavonása
|
61
|
+
consultation_publications:
|
62
|
+
create:
|
63
|
+
error: Hiba történt a konzultáció közzététele során.
|
64
|
+
success: Konzultáció sikeresen közzétéve.
|
65
|
+
destroy:
|
66
|
+
error: Hiba történt a konzultáció közzétételének visszavonásakor.
|
67
|
+
success: Konzultáció közzététele sikeresen visszavonva.
|
68
|
+
consultation_results_publications:
|
69
|
+
create:
|
70
|
+
error: Hiba történt a konzultáció eredményeinek közzététele során.
|
71
|
+
success: Konzultáció eredményei sikeresen közzétéve.
|
72
|
+
destroy:
|
73
|
+
error: Hiba történt a konzultáció eredményeinek közzététele során.
|
74
|
+
success: Konzultáció eredményeinek közzététele visszavonva.
|
75
|
+
consultations:
|
76
|
+
create:
|
77
|
+
error: Hiba történt az új konzultáció létrehozása során.
|
78
|
+
success: Konzultáció létrehozása sikeres.
|
79
|
+
destroy:
|
80
|
+
success: Konzultáció törlése sikeres.
|
81
|
+
edit:
|
82
|
+
update: Frissítés
|
83
|
+
form:
|
84
|
+
slug_help: 'Az URL slugok a konzultáció linkjének generáláshoz szükségesek. Csak betűket, számokat és kötőjeleket használhatsz. Betűvel kell kezdődnie. Példa: %{url}'
|
85
|
+
title: Általános információk
|
86
|
+
index:
|
87
|
+
not_published: Nincs közzétéve
|
88
|
+
published: Közzétéve
|
89
|
+
new:
|
90
|
+
create: Létrehozás
|
91
|
+
title: Új konzultáció
|
92
|
+
update:
|
93
|
+
error: Hiba történt a konzultáció frissítése során.
|
94
|
+
success: A konzultáció frissítése sikeres.
|
95
|
+
menu:
|
96
|
+
consultations: Konzultációk
|
97
|
+
consultations_submenu:
|
98
|
+
info: Információ
|
99
|
+
questions: Kérdések
|
100
|
+
questions_submenu:
|
101
|
+
components: Elemek
|
102
|
+
consultation: Konzultáció
|
103
|
+
info: Információ
|
104
|
+
responses: Válaszok
|
105
|
+
models:
|
106
|
+
consultation:
|
107
|
+
fields:
|
108
|
+
created_at: 'Létrehozva:'
|
109
|
+
published: Közzétéve
|
110
|
+
title: Cím
|
111
|
+
name:
|
112
|
+
one: Konzultáció
|
113
|
+
other: Konzultációk
|
114
|
+
question:
|
115
|
+
fields:
|
116
|
+
created_at: 'Létrehozva:'
|
117
|
+
published: Közzétéve
|
118
|
+
title: Cím
|
119
|
+
name:
|
120
|
+
one: Kérdés
|
121
|
+
other: Kérdések
|
122
|
+
response:
|
123
|
+
fields:
|
124
|
+
created_at: 'Létrehozva:'
|
125
|
+
title: Cím
|
126
|
+
name:
|
127
|
+
one: Válasz
|
128
|
+
other: Válaszok
|
129
|
+
question_publications:
|
130
|
+
create:
|
131
|
+
error: Hiba történt a kérdés közzététele során.
|
132
|
+
success: Kérdés sikeresen közzétéve.
|
133
|
+
destroy:
|
134
|
+
error: Hiba történt a kérdés közzétételének visszavonásakor.
|
135
|
+
success: Kérdés közzététele visszavonva.
|
136
|
+
questions:
|
137
|
+
create:
|
138
|
+
error: Hiba történt az új kérdés létrehozása során.
|
139
|
+
success: Kérdés létrehozása sikeres.
|
140
|
+
destroy:
|
141
|
+
success: Kérdés törlése sikeres.
|
142
|
+
edit:
|
143
|
+
update: Frissítés
|
144
|
+
form:
|
145
|
+
title: Általános információk
|
146
|
+
index:
|
147
|
+
not_published: Nincs közzétéve
|
148
|
+
published: Közzétéve
|
149
|
+
new:
|
150
|
+
create: Létrehozás
|
151
|
+
title: Új kérdés
|
152
|
+
update:
|
153
|
+
error: Hiba történt a kérdés frissítése során.
|
154
|
+
success: Kérdés frissítése sikeres.
|
155
|
+
responses:
|
156
|
+
create:
|
157
|
+
error: Hiba történt az új válasz létrehozása során.
|
158
|
+
success: Válasz létrehozása sikeres.
|
159
|
+
destroy:
|
160
|
+
error: Hiba történt a válasz eltávolítása során.
|
161
|
+
success: Válasz törlése sikeres.
|
162
|
+
edit:
|
163
|
+
update: Frissítés
|
164
|
+
form:
|
165
|
+
title: Általános információk
|
166
|
+
new:
|
167
|
+
create: Létrehozás
|
168
|
+
title: Új válasz
|
169
|
+
update:
|
170
|
+
error: Hiba történt a válasz frissítése során.
|
171
|
+
success: Válasz frissítése sikeres.
|
172
|
+
titles:
|
173
|
+
consultations: Konzultációk
|
174
|
+
questions: Kérdések
|
175
|
+
responses: Válaszok
|
176
|
+
consultations:
|
177
|
+
consultation:
|
178
|
+
start_voting_date: Szavazás kezdése
|
179
|
+
view_results: Eredmények megtekintése
|
180
|
+
consultation_card:
|
181
|
+
view_results: Eredmények megtekintése
|
182
|
+
consultations:
|
183
|
+
orders:
|
184
|
+
label: 'Konzultációk rendezése:'
|
185
|
+
random: Véletlenszerű
|
186
|
+
recent: Legutóbbi
|
187
|
+
count:
|
188
|
+
title:
|
189
|
+
one: "%{count} konzultáció"
|
190
|
+
other: "%{count} konzultáció"
|
191
|
+
filters:
|
192
|
+
active: Aktív
|
193
|
+
all: Összes
|
194
|
+
finished: Befejezett
|
195
|
+
search: Keresés
|
196
|
+
state: Állapot
|
197
|
+
upcoming: Közelgő
|
198
|
+
filters_small_view:
|
199
|
+
close_modal: Ablak bezárása
|
200
|
+
filter: Szűrés
|
201
|
+
filter_by: 'Szűrés ez alapján:'
|
202
|
+
unfold: Kibont
|
203
|
+
highlighted_questions:
|
204
|
+
title: '%{scope_name} kérdések'
|
205
|
+
index:
|
206
|
+
title: Konzultációk
|
207
|
+
question:
|
208
|
+
take_part: Vegyél részt
|
209
|
+
view_results: Eredmények megtekintése
|
210
|
+
votes_out_of:
|
211
|
+
one: 'szavazat ennyiből:'
|
212
|
+
other: szavazatok
|
213
|
+
question_votes:
|
214
|
+
create:
|
215
|
+
error: Hiba történt a kérdésre való szavazás során
|
216
|
+
regular_questions:
|
217
|
+
title: Konzultációra vonatkozó kérdések
|
218
|
+
show:
|
219
|
+
badge_name:
|
220
|
+
finished: Befejezett
|
221
|
+
open: Megnyitás
|
222
|
+
open_votes: Nyílt szavazatok
|
223
|
+
published_results: Közzétett eredmények
|
224
|
+
footer_button_text:
|
225
|
+
debate: Vita
|
226
|
+
view: Nézet
|
227
|
+
view_results: Eredmények megtekintése
|
228
|
+
vote: Szavazás
|
229
|
+
unspecified: Nem meghatározott
|
230
|
+
menu:
|
231
|
+
consultations: Konzultációk
|
232
|
+
pages:
|
233
|
+
home:
|
234
|
+
statistics:
|
235
|
+
consultations_count: Konzultációk
|
236
|
+
questions:
|
237
|
+
results:
|
238
|
+
title: Eredmények
|
239
|
+
show:
|
240
|
+
read_more: Bővebben
|
241
|
+
statistics:
|
242
|
+
assistants_count_title: Segítség
|
243
|
+
comments_count_title: Hozzászólások
|
244
|
+
meetings_count_title: Találkozók
|
245
|
+
supports_count_title: Támogatások
|
246
|
+
technical_info:
|
247
|
+
technical_data: Technikai részletek
|
248
|
+
vote_button:
|
249
|
+
already_voted: Már szavaztál
|
250
|
+
already_voted_hover: Támogatás visszavonása
|
251
|
+
starting_from: '%{date} óta'
|
252
|
+
vote: Szavazás
|
253
|
+
vote_modal:
|
254
|
+
contextual_help: Válassz az opciók közül.
|
255
|
+
title: 'Konzultáció: kérdés-támogatás'
|
256
|
+
vote_modal_confirm:
|
257
|
+
change: Módosítás
|
258
|
+
confirm: Megerősítés
|
259
|
+
contextual_help: Erősítsd meg a kiválasztott opciót.
|
260
|
+
title: 'Konzultáció: erősítsd meg a támogatást'
|
261
|
+
layouts:
|
262
|
+
decidim:
|
263
|
+
admin:
|
264
|
+
question:
|
265
|
+
attachments: Mellékletek
|
266
|
+
categories: Kategóriák
|
267
|
+
consultation_voting_data:
|
268
|
+
start_voting_date: Szavazás kezdése
|
269
|
+
question_components:
|
270
|
+
question_menu_item: A kérdés
|
271
|
+
unfold: Kibontás
|
272
|
+
question_header:
|
273
|
+
back_to_consultation: Összes konzultáció megtekintése
|
data/config/locales/pt-BR.yml
CHANGED
@@ -3,7 +3,7 @@ pt-BR:
|
|
3
3
|
attributes:
|
4
4
|
consultation:
|
5
5
|
banner_image: Imagem de banner
|
6
|
-
decidim_highlighted_scope_id:
|
6
|
+
decidim_highlighted_scope_id: Âmbito em destaque
|
7
7
|
description: Descrição
|
8
8
|
end_voting_date: Votação termina
|
9
9
|
introductory_image: Imagem introdutória
|
@@ -19,10 +19,10 @@ pt-BR:
|
|
19
19
|
hashtag: Hashtag
|
20
20
|
hero_image: Imagem inicial
|
21
21
|
i_frame_url: URL do sistema de votação externa
|
22
|
-
origin_scope:
|
22
|
+
origin_scope: Âmbito
|
23
23
|
origin_title: Origem
|
24
24
|
origin_url: URL de origem
|
25
|
-
participatory_scope:
|
25
|
+
participatory_scope: Âmbito participativo
|
26
26
|
promoter_group: Grupo promotor
|
27
27
|
question_context: Contexto
|
28
28
|
reference: Referência
|
@@ -182,7 +182,7 @@ pt-BR:
|
|
182
182
|
consultations:
|
183
183
|
orders:
|
184
184
|
label: 'Ordenar consultas por:'
|
185
|
-
random:
|
185
|
+
random: Aleatório
|
186
186
|
recent: Mais recente
|
187
187
|
count:
|
188
188
|
title:
|
@@ -237,11 +237,11 @@ pt-BR:
|
|
237
237
|
results:
|
238
238
|
title: Resultados
|
239
239
|
show:
|
240
|
-
read_more:
|
240
|
+
read_more: Ver mais
|
241
241
|
statistics:
|
242
242
|
assistants_count_title: Assistentes
|
243
243
|
comments_count_title: Comentários
|
244
|
-
meetings_count_title:
|
244
|
+
meetings_count_title: Encontros
|
245
245
|
supports_count_title: Suporta
|
246
246
|
technical_info:
|
247
247
|
technical_data: Dados técnicos
|
data/config/locales/ru.yml
CHANGED
@@ -22,7 +22,7 @@ ru:
|
|
22
22
|
origin_scope: Охват
|
23
23
|
origin_title: Источник
|
24
24
|
origin_url: Веб-адрес источника
|
25
|
-
participatory_scope:
|
25
|
+
participatory_scope: Что решается
|
26
26
|
promoter_group: Рабочая группа по продвижению
|
27
27
|
question_context: Контекст
|
28
28
|
reference: Ссылка на источник
|
@@ -281,7 +281,7 @@ ru:
|
|
281
281
|
admin:
|
282
282
|
question:
|
283
283
|
attachments: Прикрепленные файлы
|
284
|
-
categories:
|
284
|
+
categories: Категории
|
285
285
|
consultation_voting_data:
|
286
286
|
start_voting_date: Голосование начинается
|
287
287
|
question_components:
|
data/config/locales/uk.yml
CHANGED
@@ -2,7 +2,7 @@ uk:
|
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
4
|
consultation:
|
5
|
-
banner_image:
|
5
|
+
banner_image: Банерне зображення
|
6
6
|
decidim_highlighted_scope_id: Виcвітлений обсяг
|
7
7
|
description: Опис
|
8
8
|
end_voting_date: Голосування закінчується
|
@@ -22,7 +22,7 @@ uk:
|
|
22
22
|
origin_scope: Обсяг
|
23
23
|
origin_title: Джерело
|
24
24
|
origin_url: Веб-адреса джерела
|
25
|
-
participatory_scope:
|
25
|
+
participatory_scope: Що вирішується
|
26
26
|
promoter_group: Робочий гурт з просування
|
27
27
|
question_context: Контекст
|
28
28
|
reference: Посилання на джерело
|
@@ -281,7 +281,7 @@ uk:
|
|
281
281
|
admin:
|
282
282
|
question:
|
283
283
|
attachments: Вкладені файли
|
284
|
-
categories:
|
284
|
+
categories: Категорії
|
285
285
|
consultation_voting_data:
|
286
286
|
start_voting_date: Голосування починається
|
287
287
|
question_components:
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class RemoveUnusedSearchIndexs < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
remove_index :decidim_consultations_questions, name: "consultation_questions_title_search"
|
6
|
+
remove_index :decidim_consultations_questions, name: "consultation_questions_subtitle_search"
|
7
|
+
remove_index :decidim_consultations_questions, name: "consultation_questions_what_is_decided_search"
|
8
|
+
remove_index :decidim_consultations_questions, name: "consultation_question_promoter_group_search"
|
9
|
+
remove_index :decidim_consultations_questions, name: "consultation_question_participatory_scope_search"
|
10
|
+
remove_index :decidim_consultations_questions, name: "consultation_question_context_search"
|
11
|
+
end
|
12
|
+
end
|
@@ -22,12 +22,12 @@ FactoryBot.define do
|
|
22
22
|
published_at { Time.current }
|
23
23
|
start_voting_date { Time.zone.today }
|
24
24
|
end_voting_date { Time.zone.today + 1.month }
|
25
|
-
introductory_video_url "https://www.youtube.com/embed/zhMMW0TENNA"
|
25
|
+
introductory_video_url { "https://www.youtube.com/embed/zhMMW0TENNA" }
|
26
26
|
decidim_highlighted_scope_id { create(:scope, organization: organization).id }
|
27
|
-
results_published_at nil
|
27
|
+
results_published_at { nil }
|
28
28
|
|
29
29
|
trait :unpublished do
|
30
|
-
published_at nil
|
30
|
+
published_at { nil }
|
31
31
|
end
|
32
32
|
|
33
33
|
trait :published do
|
@@ -35,7 +35,7 @@ FactoryBot.define do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
trait :unpublished_results do
|
38
|
-
results_published_at nil
|
38
|
+
results_published_at { nil }
|
39
39
|
end
|
40
40
|
|
41
41
|
trait :published_results do
|
@@ -72,13 +72,13 @@ FactoryBot.define do
|
|
72
72
|
published_at { Time.current }
|
73
73
|
hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
74
74
|
banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") }
|
75
|
-
external_voting false
|
75
|
+
external_voting { false }
|
76
76
|
sequence :order do |n|
|
77
77
|
n
|
78
78
|
end
|
79
79
|
|
80
80
|
trait :unpublished do
|
81
|
-
published_at nil
|
81
|
+
published_at { nil }
|
82
82
|
end
|
83
83
|
|
84
84
|
trait :published do
|
@@ -86,8 +86,8 @@ FactoryBot.define do
|
|
86
86
|
end
|
87
87
|
|
88
88
|
trait :external_voting do
|
89
|
-
external_voting true
|
90
|
-
i_frame_url "http://example.org"
|
89
|
+
external_voting { true }
|
90
|
+
i_frame_url { "http://example.org" }
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-consultations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Salvador Perez Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.14.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.14.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-comments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.14.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.14.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.14.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.14.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim-dev
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.14.1
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.14.1
|
69
69
|
description: Extends Decidim adding a first level public consultation component
|
70
70
|
email:
|
71
71
|
- jsperezg@gmail.com
|
@@ -119,7 +119,6 @@ files:
|
|
119
119
|
- app/commands/decidim/consultations/vote_question.rb
|
120
120
|
- app/constraints/decidim/consultations/current_component.rb
|
121
121
|
- app/constraints/decidim/consultations/current_question.rb
|
122
|
-
- app/controllers/concerns/decidim/consultations/action_authorization.rb
|
123
122
|
- app/controllers/concerns/decidim/consultations/admin/consultation_admin.rb
|
124
123
|
- app/controllers/concerns/decidim/consultations/admin/question_admin.rb
|
125
124
|
- app/controllers/concerns/decidim/consultations/needs_consultation.rb
|
@@ -218,6 +217,7 @@ files:
|
|
218
217
|
- config/locales/fi.yml
|
219
218
|
- config/locales/fr.yml
|
220
219
|
- config/locales/gl.yml
|
220
|
+
- config/locales/hu.yml
|
221
221
|
- config/locales/it.yml
|
222
222
|
- config/locales/nl.yml
|
223
223
|
- config/locales/pl.yml
|
@@ -252,6 +252,7 @@ files:
|
|
252
252
|
- db/migrate/20180212100503_remove_enable_highlighted_banner_flag.rb
|
253
253
|
- db/migrate/20180219092120_add_order_to_decidim_consultations_questions.rb
|
254
254
|
- db/migrate/20180320100658_add_introductory_image_to_decidim_consultations.rb
|
255
|
+
- db/migrate/20180712111146_remove_unused_search_indexs.rb
|
255
256
|
- db/seeds/Exampledocument.pdf
|
256
257
|
- db/seeds/city.jpeg
|
257
258
|
- db/seeds/city2.jpeg
|
@@ -283,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
284
|
version: '0'
|
284
285
|
requirements: []
|
285
286
|
rubyforge_project:
|
286
|
-
rubygems_version: 2.7.
|
287
|
+
rubygems_version: 2.7.7
|
287
288
|
signing_key:
|
288
289
|
specification_version: 4
|
289
290
|
summary: Decidim consultations module
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/concern"
|
4
|
-
|
5
|
-
module Decidim
|
6
|
-
module Consultations
|
7
|
-
module ActionAuthorization
|
8
|
-
extend ActiveSupport::Concern
|
9
|
-
|
10
|
-
included do
|
11
|
-
helper_method :action_authorization
|
12
|
-
end
|
13
|
-
|
14
|
-
# Public: Returns the authorization object for an authorization.
|
15
|
-
#
|
16
|
-
# action_name - The action to authorize against.
|
17
|
-
#
|
18
|
-
# Returns an AuthorizationStatus
|
19
|
-
def action_authorization(action_name, question = current_question)
|
20
|
-
return AuthorizationStatus.new(:ok) if allowed_to?(action_name.to_sym, :question, question: question)
|
21
|
-
|
22
|
-
AuthorizationStatus.new(:denied)
|
23
|
-
end
|
24
|
-
|
25
|
-
class AuthorizationStatus
|
26
|
-
attr_reader :code
|
27
|
-
|
28
|
-
def initialize(code)
|
29
|
-
@code = code.to_sym
|
30
|
-
end
|
31
|
-
|
32
|
-
def ok?
|
33
|
-
@code == :ok
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|