decidim-plans 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE-AGPLv3.txt +661 -0
- data/README.md +157 -0
- data/Rakefile +48 -0
- data/app/assets/config/admin/decidim_plans_manifest.js +3 -0
- data/app/assets/config/decidim_plans_manifest.css +4 -0
- data/app/assets/config/decidim_plans_manifest.js +2 -0
- data/app/assets/images/decidim/plans/icon.svg +3 -0
- data/app/assets/javascripts/decidim/plans/admin/plans.js.es6 +3 -0
- data/app/assets/javascripts/decidim/plans/admin/sections.js.es6 +78 -0
- data/app/assets/javascripts/decidim/plans/multifield/component.js.es6 +101 -0
- data/app/assets/javascripts/decidim/plans/multifield.js.es6 +5 -0
- data/app/assets/javascripts/decidim/plans/plans_form.js.es6 +9 -0
- data/app/assets/javascripts/decidim/plans/proposal_picker.js.es6 +41 -0
- data/app/assets/javascripts/decidim/plans/remaining_characters.es6 +42 -0
- data/app/assets/javascripts/decidim/plans/social_share.js +2 -0
- data/app/assets/javascripts/decidim/plans/tab_focus.es6 +20 -0
- data/app/assets/stylesheets/decidim/plans/plans_form.scss +26 -0
- data/app/assets/stylesheets/decidim/plans/proposal_picker.scss +3 -0
- data/app/assets/stylesheets/decidim/plans/social_share.css.scss +22 -0
- data/app/cells/decidim/plans/author/flag.erb +5 -0
- data/app/cells/decidim/plans/author/withdraw.erb +6 -0
- data/app/cells/decidim/plans/author_cell.rb +9 -0
- data/app/cells/decidim/plans/coauthorships_cell.rb +23 -0
- data/app/cells/decidim/plans/collapsible_authors/show.erb +17 -0
- data/app/cells/decidim/plans/collapsible_authors_cell.rb +9 -0
- data/app/cells/decidim/plans/plan_activity_cell.rb +19 -0
- data/app/cells/decidim/plans/plan_cell.rb +59 -0
- data/app/cells/decidim/plans/plan_m/footer.erb +8 -0
- data/app/cells/decidim/plans/plan_m_cell.rb +62 -0
- data/app/commands/decidim/plans/accept_access_to_plan.rb +53 -0
- data/app/commands/decidim/plans/admin/answer_plan.rb +82 -0
- data/app/commands/decidim/plans/admin/create_plan.rb +102 -0
- data/app/commands/decidim/plans/admin/update_plan.rb +98 -0
- data/app/commands/decidim/plans/admin/update_sections.rb +54 -0
- data/app/commands/decidim/plans/attachment_methods.rb +78 -0
- data/app/commands/decidim/plans/create_plan.rb +90 -0
- data/app/commands/decidim/plans/destroy_plan.rb +33 -0
- data/app/commands/decidim/plans/nested_updater.rb +26 -0
- data/app/commands/decidim/plans/publish_plan.rb +79 -0
- data/app/commands/decidim/plans/reject_access_to_plan.rb +46 -0
- data/app/commands/decidim/plans/request_access_to_plan.rb +50 -0
- data/app/commands/decidim/plans/respond_to_access_request.rb +76 -0
- data/app/commands/decidim/plans/update_plan.rb +90 -0
- data/app/commands/decidim/plans/withdraw_plan.rb +50 -0
- data/app/controllers/concerns/decidim/plans/orderable.rb +53 -0
- data/app/controllers/decidim/plans/admin/application_controller.rb +16 -0
- data/app/controllers/decidim/plans/admin/plan_answers_controller.rb +40 -0
- data/app/controllers/decidim/plans/admin/plans_controller.rb +80 -0
- data/app/controllers/decidim/plans/admin/sections_controller.rb +75 -0
- data/app/controllers/decidim/plans/application_controller.rb +30 -0
- data/app/controllers/decidim/plans/plan_collaborator_requests_controller.rb +53 -0
- data/app/controllers/decidim/plans/plan_widgets_controller.rb +19 -0
- data/app/controllers/decidim/plans/plans_controller.rb +192 -0
- data/app/controllers/decidim/plans/versions_controller.rb +51 -0
- data/app/events/decidim/plans/accepted_plan_event.rb +9 -0
- data/app/events/decidim/plans/evaluating_plan_event.rb +8 -0
- data/app/events/decidim/plans/plan_access_accepted_event.rb +8 -0
- data/app/events/decidim/plans/plan_access_rejected_event.rb +8 -0
- data/app/events/decidim/plans/plan_access_request_event.rb +27 -0
- data/app/events/decidim/plans/plan_access_requested_event.rb +8 -0
- data/app/events/decidim/plans/plan_access_requester_accepted_event.rb +8 -0
- data/app/events/decidim/plans/plan_access_requester_rejected_event.rb +8 -0
- data/app/events/decidim/plans/publish_plan_event.rb +25 -0
- data/app/events/decidim/plans/rejected_plan_event.rb +9 -0
- data/app/forms/decidim/plans/accept_access_to_plan_form.rb +10 -0
- data/app/forms/decidim/plans/access_to_plan_form.rb +35 -0
- data/app/forms/decidim/plans/admin/plan_answer_form.rb +19 -0
- data/app/forms/decidim/plans/admin/plan_form.rb +88 -0
- data/app/forms/decidim/plans/admin/plan_sections_form.rb +20 -0
- data/app/forms/decidim/plans/admin/section_form.rb +34 -0
- data/app/forms/decidim/plans/attachment_form.rb +20 -0
- data/app/forms/decidim/plans/content_form.rb +58 -0
- data/app/forms/decidim/plans/plan_form.rb +85 -0
- data/app/forms/decidim/plans/reject_access_to_plan_form.rb +9 -0
- data/app/forms/decidim/plans/request_access_to_plan_form.rb +20 -0
- data/app/helpers/decidim/plans/admin/application_helper.rb +19 -0
- data/app/helpers/decidim/plans/application_helper.rb +78 -0
- data/app/helpers/decidim/plans/attached_proposals_helper.rb +44 -0
- data/app/helpers/decidim/plans/attachments_helper.rb +59 -0
- data/app/helpers/decidim/plans/cells_helper.rb +26 -0
- data/app/helpers/decidim/plans/plan_cells_helper.rb +67 -0
- data/app/helpers/decidim/plans/remaining_characters_helper.rb +32 -0
- data/app/helpers/decidim/plans/traceability_helper.rb +79 -0
- data/app/helpers/decidim/plans/user_group_helper.rb +23 -0
- data/app/models/concerns/decidim/plans/traceable.rb +48 -0
- data/app/models/decidim/plans/application_record.rb +10 -0
- data/app/models/decidim/plans/attached_proposal.rb +12 -0
- data/app/models/decidim/plans/content.rb +21 -0
- data/app/models/decidim/plans/paper_trail/version.rb +26 -0
- data/app/models/decidim/plans/paper_trail/version_association.rb +14 -0
- data/app/models/decidim/plans/plan.rb +206 -0
- data/app/models/decidim/plans/plan_collaborator_request.rb +13 -0
- data/app/models/decidim/plans/section.rb +16 -0
- data/app/permissions/decidim/plans/admin/permissions.rb +44 -0
- data/app/permissions/decidim/plans/permissions.rb +67 -0
- data/app/presenters/decidim/plans/admin_log/plan_presenter.rb +49 -0
- data/app/presenters/decidim/plans/admin_log/value_types/plan_state_presenter.rb +16 -0
- data/app/presenters/decidim/plans/content_presenter.rb +25 -0
- data/app/presenters/decidim/plans/log/resource_presenter.rb +18 -0
- data/app/presenters/decidim/plans/official_author_presenter.rb +38 -0
- data/app/presenters/decidim/plans/plan_presenter.rb +48 -0
- data/app/queries/decidim/plans/filtered_plans.rb +37 -0
- data/app/services/decidim/plans/diff_renderer/base.rb +108 -0
- data/app/services/decidim/plans/diff_renderer/categorization.rb +23 -0
- data/app/services/decidim/plans/diff_renderer/content.rb +33 -0
- data/app/services/decidim/plans/diff_renderer/plan.rb +25 -0
- data/app/services/decidim/plans/loggability.rb +19 -0
- data/app/services/decidim/plans/plan_builder.rb +68 -0
- data/app/services/decidim/plans/plan_search.rb +95 -0
- data/app/services/decidim/plans/tracer.rb +29 -0
- data/app/views/decidim/plans/admin/plan_answers/edit.html.erb +22 -0
- data/app/views/decidim/plans/admin/plans/_bulk-actions.html.erb +9 -0
- data/app/views/decidim/plans/admin/plans/_form.html.erb +62 -0
- data/app/views/decidim/plans/admin/plans/_js-callout.html.erb +6 -0
- data/app/views/decidim/plans/admin/plans/_plan-tr.html.erb +53 -0
- data/app/views/decidim/plans/admin/plans/edit.html.erb +7 -0
- data/app/views/decidim/plans/admin/plans/index.html.erb +64 -0
- data/app/views/decidim/plans/admin/plans/new.html.erb +7 -0
- data/app/views/decidim/plans/admin/sections/_bulk-actions.html.erb +7 -0
- data/app/views/decidim/plans/admin/sections/_form.html.erb +27 -0
- data/app/views/decidim/plans/admin/sections/_section.html.erb +66 -0
- data/app/views/decidim/plans/admin/sections/index.html.erb +7 -0
- data/app/views/decidim/plans/admin/shared/_info_plan.html.erb +17 -0
- data/app/views/decidim/plans/attached_proposals/_proposals.html.erb +12 -0
- data/app/views/decidim/plans/plan_widgets/show.html.erb +3 -0
- data/app/views/decidim/plans/plans/_accept_request_access_form.html.erb +8 -0
- data/app/views/decidim/plans/plans/_attached_proposals.html.erb +10 -0
- data/app/views/decidim/plans/plans/_collaborator_requests.html.erb +20 -0
- data/app/views/decidim/plans/plans/_content.html.erb +6 -0
- data/app/views/decidim/plans/plans/_contents.html.erb +8 -0
- data/app/views/decidim/plans/plans/_count.html.erb +1 -0
- data/app/views/decidim/plans/plans/_filters.html.erb +32 -0
- data/app/views/decidim/plans/plans/_filters_small_view.html.erb +18 -0
- data/app/views/decidim/plans/plans/_form.html.erb +57 -0
- data/app/views/decidim/plans/plans/_new_plan_button.html.erb +11 -0
- data/app/views/decidim/plans/plans/_plan.html.erb +1 -0
- data/app/views/decidim/plans/plans/_plan_preview.html.erb +1 -0
- data/app/views/decidim/plans/plans/_plans.html.erb +14 -0
- data/app/views/decidim/plans/plans/_reject_request_access_form.html.erb +10 -0
- data/app/views/decidim/plans/plans/_request_access_form.html.erb +7 -0
- data/app/views/decidim/plans/plans/edit.html.erb +21 -0
- data/app/views/decidim/plans/plans/index.html.erb +28 -0
- data/app/views/decidim/plans/plans/index.js.erb +10 -0
- data/app/views/decidim/plans/plans/new.html.erb +15 -0
- data/app/views/decidim/plans/plans/preview.html.erb +15 -0
- data/app/views/decidim/plans/plans/show.html.erb +133 -0
- data/app/views/decidim/plans/shared/_attachment_fields.html.erb +45 -0
- data/app/views/decidim/plans/shared/_attachments.html.erb +23 -0
- data/app/views/decidim/plans/shared/_remaining_characters_container.html.erb +12 -0
- data/app/views/decidim/plans/shared/_section_content_field.html.erb +39 -0
- data/app/views/decidim/plans/versions/_version.html.erb +20 -0
- data/app/views/decidim/plans/versions/index.html.erb +34 -0
- data/app/views/decidim/plans/versions/show.html.erb +41 -0
- data/config/locales/en.yml +341 -0
- data/config/locales/fi.yml +341 -0
- data/config/locales/sv.yml +341 -0
- data/db/migrate/20181230110225_enable_pg_trgm_extension_for_plans.rb +18 -0
- data/db/migrate/20181230110848_create_decidim_plans.rb +20 -0
- data/db/migrate/20181230111731_create_decidim_plans_sections.rb +13 -0
- data/db/migrate/20181230111931_create_decidim_plans_plan_contents.rb +14 -0
- data/db/migrate/20181230122035_create_decidim_plans_plan_collaborator_requests.rb +12 -0
- data/db/migrate/20190110125855_create_decidim_plans_attached_proposals.rb +12 -0
- data/db/migrate/20190129140441_add_help_to_decidim_plans_sections.rb +7 -0
- data/db/migrate/20190129143607_add_mandatory_to_decidim_plans_sections.rb +7 -0
- data/db/migrate/20190129172040_add_section_type_to_decidim_plans_sections.rb +12 -0
- data/db/migrate/20190129231439_add_answer_length_to_decidim_plans_sections.rb +11 -0
- data/db/migrate/20190202123044_create_version_associations.rb +25 -0
- data/db/migrate/20190202123045_add_transaction_id_column_to_versions.rb +15 -0
- data/db/migrate/20190202200716_add_update_token_to_decidim_plans.rb +7 -0
- data/lib/decidim/plans/admin.rb +10 -0
- data/lib/decidim/plans/admin_engine.rb +29 -0
- data/lib/decidim/plans/component.rb +163 -0
- data/lib/decidim/plans/engine.rb +43 -0
- data/lib/decidim/plans/locale_aware.rb +32 -0
- data/lib/decidim/plans/optionally_translatable_attributes.rb +85 -0
- data/lib/decidim/plans/paper_trail/record_trail.rb +24 -0
- data/lib/decidim/plans/paper_trail.rb +10 -0
- data/lib/decidim/plans/test/factories.rb +130 -0
- data/lib/decidim/plans/version.rb +8 -0
- data/lib/decidim/plans.rb +24 -0
- metadata +323 -0
@@ -0,0 +1,341 @@
|
|
1
|
+
---
|
2
|
+
sv:
|
3
|
+
activemodel:
|
4
|
+
attributes:
|
5
|
+
plan:
|
6
|
+
proposals: Proposals
|
7
|
+
category_id: Category
|
8
|
+
decidim_category_id: Category
|
9
|
+
decidim_scope_id: Scope
|
10
|
+
state: State
|
11
|
+
title: Title
|
12
|
+
user_group_id: Create as
|
13
|
+
errors:
|
14
|
+
models:
|
15
|
+
attachment:
|
16
|
+
attributes:
|
17
|
+
file:
|
18
|
+
needs_to_be_reattached: Needs to be reattached
|
19
|
+
decidim:
|
20
|
+
assemblies:
|
21
|
+
statistics:
|
22
|
+
plans_count: Plans
|
23
|
+
components:
|
24
|
+
plans:
|
25
|
+
actions:
|
26
|
+
create: Create
|
27
|
+
withdraw: Withdraw
|
28
|
+
name: Plans
|
29
|
+
settings:
|
30
|
+
global:
|
31
|
+
announcement: Announcement
|
32
|
+
attachments_allowed: Attachments allowed
|
33
|
+
comments_enabled: Comments enabled
|
34
|
+
multilingual_answers: Multilingual answers
|
35
|
+
plan_answering_enabled: Answering enabled
|
36
|
+
plan_title_length: Title length
|
37
|
+
step:
|
38
|
+
announcement: Announcement
|
39
|
+
comments_blocked: Comments blocked
|
40
|
+
creation_enabled: Creation enabled
|
41
|
+
plan_answering_enabled: Answering enabled
|
42
|
+
participatory_processes:
|
43
|
+
statistics:
|
44
|
+
plans_count: Plans
|
45
|
+
plans:
|
46
|
+
actions:
|
47
|
+
answer: Answer
|
48
|
+
edit_plan: Edit
|
49
|
+
new: Submit new plan
|
50
|
+
sections: Sections
|
51
|
+
title: Actions
|
52
|
+
admin:
|
53
|
+
actions:
|
54
|
+
preview: Preview
|
55
|
+
plan_answers:
|
56
|
+
edit:
|
57
|
+
accepted: Accepted
|
58
|
+
answer_plan: Answer
|
59
|
+
evaluating: Evaluating
|
60
|
+
rejected: Rejected
|
61
|
+
title: Answer for %{title}
|
62
|
+
plans:
|
63
|
+
answer:
|
64
|
+
invalid: Error occured while answering.
|
65
|
+
success: Answered successfully.
|
66
|
+
edit:
|
67
|
+
title: Edit
|
68
|
+
update: Update
|
69
|
+
form:
|
70
|
+
attachment_legend: "Add an attachment"
|
71
|
+
select_a_category: Select a category
|
72
|
+
index:
|
73
|
+
selected: Selected
|
74
|
+
title: Plans
|
75
|
+
new:
|
76
|
+
create: Create
|
77
|
+
title: Submit new plan
|
78
|
+
sections:
|
79
|
+
form:
|
80
|
+
add_section: Add section
|
81
|
+
index:
|
82
|
+
save: Save
|
83
|
+
title: Sections
|
84
|
+
section:
|
85
|
+
answer_length: Answer length
|
86
|
+
body: Body
|
87
|
+
down: Down
|
88
|
+
help: Help
|
89
|
+
mandatory: Mandatory
|
90
|
+
remove: Remove
|
91
|
+
section: Section
|
92
|
+
up: Up
|
93
|
+
update:
|
94
|
+
invalid: Error updating sections.
|
95
|
+
success: Sections updated successfully.
|
96
|
+
shared:
|
97
|
+
info_plan:
|
98
|
+
body: Body
|
99
|
+
created_at: Creation date
|
100
|
+
plans: Plans
|
101
|
+
admin_log:
|
102
|
+
plan:
|
103
|
+
answer: "%{user_name} answered %{resource_name} on the %{space_name}
|
104
|
+
space."
|
105
|
+
create: "%{user_name} created %{resource_name} on the %{space_name}
|
106
|
+
space."
|
107
|
+
update: "%{user_name} updated %{resource_name} on the %{space_name}
|
108
|
+
space."
|
109
|
+
plan_note:
|
110
|
+
create: "%{user_name} left a private note on %{resource_name} on the
|
111
|
+
%{space_name} space."
|
112
|
+
answers:
|
113
|
+
accepted: Accepted
|
114
|
+
evaluating: Evaluating
|
115
|
+
not_answered: Not answered
|
116
|
+
rejected: Rejected
|
117
|
+
withdrawn: Withdrawn
|
118
|
+
application_helper:
|
119
|
+
filter_state_values:
|
120
|
+
accepted: Accepted
|
121
|
+
all: All
|
122
|
+
evaluating: Evaluating
|
123
|
+
except_rejected: All except rejected
|
124
|
+
rejected: Rejected
|
125
|
+
filter_type_values:
|
126
|
+
all: All
|
127
|
+
amendments: Amendments
|
128
|
+
plans: Plans
|
129
|
+
attached_proposals_helper:
|
130
|
+
attach_proposal: Attach proposal
|
131
|
+
close: Close
|
132
|
+
current_selection: Search proposals by name
|
133
|
+
select: Select
|
134
|
+
create:
|
135
|
+
invalid: Failed to create new content.
|
136
|
+
success: Created successfully.
|
137
|
+
last_activity:
|
138
|
+
new_plan_at_html: "<span>New plan at %{link}</span>"
|
139
|
+
models:
|
140
|
+
plan:
|
141
|
+
fields:
|
142
|
+
authors: Authors
|
143
|
+
category: Category
|
144
|
+
comments: Comments
|
145
|
+
contributions: Contributions
|
146
|
+
id: ID
|
147
|
+
notes: Notes
|
148
|
+
official_plan: Official plan
|
149
|
+
published_at: Published at
|
150
|
+
scope: Scope
|
151
|
+
state: State
|
152
|
+
title: Title
|
153
|
+
plans:
|
154
|
+
attached_proposals:
|
155
|
+
attached_proposals: Attached proposals
|
156
|
+
count:
|
157
|
+
plans_count:
|
158
|
+
one: "%{count} plan"
|
159
|
+
other: "%{count} plans"
|
160
|
+
create:
|
161
|
+
error: Failed to create new content.
|
162
|
+
success: Created successfully.
|
163
|
+
destroy:
|
164
|
+
error: Error deleting the item.
|
165
|
+
success: Deleted successfully.
|
166
|
+
edit:
|
167
|
+
discard: Discard this draft
|
168
|
+
discard_confirmation: Are you sure you want to discard this draft?
|
169
|
+
update: Update
|
170
|
+
preview:
|
171
|
+
modify: Modify
|
172
|
+
publish: Publish
|
173
|
+
filters:
|
174
|
+
accepted: Accepted
|
175
|
+
activity: Activity
|
176
|
+
all: All
|
177
|
+
category: Category
|
178
|
+
category_prompt: Select a category
|
179
|
+
citizens: Citizens
|
180
|
+
evaluating: Evaluating
|
181
|
+
except_rejected: All except rejected
|
182
|
+
official: Official
|
183
|
+
origin: Origin
|
184
|
+
rejected: Rejected
|
185
|
+
related_to: Related to
|
186
|
+
search: Search
|
187
|
+
state: State
|
188
|
+
voted: Voted
|
189
|
+
filters_small_view:
|
190
|
+
close_modal: Close modal
|
191
|
+
filter: Filter
|
192
|
+
filter_by: Filter by
|
193
|
+
unfold: Unfold
|
194
|
+
form:
|
195
|
+
attachment_legend: "Add an attachment"
|
196
|
+
select_a_category: Select a category
|
197
|
+
index:
|
198
|
+
new_plan: New plan
|
199
|
+
see_all_withdrawn: See all withdrawn
|
200
|
+
new:
|
201
|
+
create: Create
|
202
|
+
title: Create plan
|
203
|
+
new_plan_button:
|
204
|
+
new_plan: New plan
|
205
|
+
orders:
|
206
|
+
label: 'Order plans by:'
|
207
|
+
random: Random
|
208
|
+
recent: Recent
|
209
|
+
plan:
|
210
|
+
publish:
|
211
|
+
error: Error publishing new content.
|
212
|
+
success: Published successfully.
|
213
|
+
view_plan: View plan
|
214
|
+
withdraw:
|
215
|
+
error: Error withdrawing.
|
216
|
+
success: Withdrawn successfully.
|
217
|
+
show:
|
218
|
+
back: Back
|
219
|
+
edit: Edit
|
220
|
+
hidden_authors_count:
|
221
|
+
one: and %{count} more person
|
222
|
+
other: and %{count} more people
|
223
|
+
info-message: You can participate either by submitting a comment or by
|
224
|
+
asking for a permission to edit content directly.
|
225
|
+
of_versions: "(of %{number})"
|
226
|
+
plan_accepted_reason: 'This plan has been accepted because:'
|
227
|
+
plan_in_evaluation_reason: This plan is being evaluated
|
228
|
+
plan_rejected_reason: 'This plan has been rejected because:'
|
229
|
+
publish: Publish
|
230
|
+
publish_info: Publish this version of the draft or
|
231
|
+
published_proposal: published plan
|
232
|
+
report: Report
|
233
|
+
request_access: Request editing permissions
|
234
|
+
requested_access: Editing permissions requested
|
235
|
+
see_other_versions: see other versions
|
236
|
+
version: Version %{number}
|
237
|
+
version_history: see version history
|
238
|
+
withdraw: withdraw the draft
|
239
|
+
withdraw_btn: Withdraw
|
240
|
+
withdraw_btn_hint: You can withdraw this item if you change your mind, as long as you have not received any support. The item is not deleted, it will appear in the list of withdrawn items.
|
241
|
+
withdraw_confirmation: Are you sure to withdraw this item?
|
242
|
+
update:
|
243
|
+
error: Error updating content.
|
244
|
+
success: Updated successfully.
|
245
|
+
withdraw:
|
246
|
+
error: Error withdrawing the item.
|
247
|
+
success: Item withdrawn successfully.
|
248
|
+
requests:
|
249
|
+
accept_request: Accept
|
250
|
+
accepted_request:
|
251
|
+
error: Could not be accepted as a collaborator, try again later.
|
252
|
+
success: "@%{user} has been successfully accepted as a collaborator."
|
253
|
+
access_requested:
|
254
|
+
error: Your request could not be completed, try again later.
|
255
|
+
success: Your request to collaborate has been sent successfully
|
256
|
+
reject_request: Reject
|
257
|
+
rejected_request:
|
258
|
+
error: Could not be rejected as a collaborator, try again later.
|
259
|
+
success: "@%{user} has been successfully rejected as a collaborator."
|
260
|
+
title: Collaboration requests
|
261
|
+
sections:
|
262
|
+
actions:
|
263
|
+
new: New section
|
264
|
+
section_types:
|
265
|
+
field_text_multiline: Field - Multiple lines
|
266
|
+
field_text: Field - Single line
|
267
|
+
shared:
|
268
|
+
attachment_fields:
|
269
|
+
attachment_legend: Attachment
|
270
|
+
down: Down
|
271
|
+
remove: Remove
|
272
|
+
up: Up
|
273
|
+
attachments:
|
274
|
+
legend: Attachments
|
275
|
+
add_attachment: Add attachment
|
276
|
+
update:
|
277
|
+
invalid: Error updating content.
|
278
|
+
success: Updated successfully.
|
279
|
+
versions:
|
280
|
+
changes_at_title: Changes at "%{title}"
|
281
|
+
index:
|
282
|
+
title: Versions
|
283
|
+
stats:
|
284
|
+
back_to_plan: Go back
|
285
|
+
number_of_versions: Versions
|
286
|
+
show_all_versions: Show all versions
|
287
|
+
version_author: Version author
|
288
|
+
version_created_at: Version created at
|
289
|
+
version_number: Version number
|
290
|
+
version_number_out_of_total: "%{current_version} out of %{total_count}"
|
291
|
+
version:
|
292
|
+
version_index: Version %{index}
|
293
|
+
scopes:
|
294
|
+
global: Global
|
295
|
+
events:
|
296
|
+
plans:
|
297
|
+
plan_access_accepted:
|
298
|
+
email_intro: '%{requester_name} has been accepted to access as a contributor of <a href="%{resource_path}">%{resource_title}</a>.'
|
299
|
+
email_outro: You have received this notification because you are a collaborator of <a href="%{resource_path}">%{resource_title}</a>.
|
300
|
+
email_subject: "%{requester_name} has been accepted to access as a contributor of %{resource_title}."
|
301
|
+
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> has been <strong>accepted to access as a contributor</strong> of <a href="%{resource_path}">%{resource_title}</a>.
|
302
|
+
plan_access_rejected:
|
303
|
+
email_intro: '%{requester_name} has been rejected to access as a contributor of <a href="%{resource_path}">%{resource_title}</a>.'
|
304
|
+
email_outro: You have received this notification because you are a collaborator of <a href="%{resource_path}">%{resource_title}</a>.
|
305
|
+
email_subject: "%{requester_name} has been rejected to access as a contributor of %{resource_title}."
|
306
|
+
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> has been <strong>rejected to access as a contributor</strong> of <a href="%{resource_path}">%{resource_title}</a>.
|
307
|
+
plan_access_requested:
|
308
|
+
email_intro: '%{requester_name} requested access as a contributor. You can <strong>accept or reject the request</strong> from the <a href="%{resource_path}">%{resource_title}</a> page.'
|
309
|
+
email_outro: You have received this notification because you are a collaborator of <a href="%{resource_path}">%{resource_title}</a>.
|
310
|
+
email_subject: "%{requester_name} requested access to contribute to %{resource_title}."
|
311
|
+
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> requested access to contribute to <a href="%{resource_path}">%{resource_title}</a>. Please <strong>accept or reject the request</strong>.
|
312
|
+
plan_access_requester_accepted:
|
313
|
+
email_intro: You have been accepted to access as a contributor of <a href="%{resource_path}">%{resource_title}</a>.
|
314
|
+
email_outro: You have received this notification because you requested to become a collaborator of <a href="%{resource_path}">%{resource_title}</a>.
|
315
|
+
email_subject: You have been accepted as a contributor of %{resource_title}.
|
316
|
+
notification_title: You have been <strong>accepted to access as a contributor</strong> of <a href="%{resource_path}">%{resource_title}</a>.
|
317
|
+
plan_access_requester_rejected:
|
318
|
+
email_intro: You have been rejected to access as a contributor of <a href="%{resource_path}">%{resource_title}</a>.
|
319
|
+
email_outro: You have received this notification because you requested to become a collaborator of <a href="%{resource_path}">%{resource_title}</a>.
|
320
|
+
email_subject: You have been rejected as a contributor of %{resource_title}.
|
321
|
+
notification_title: You have been <strong>rejected to access as a contributor</strong> of <a href="%{resource_path}">%{resource_title}</a>.
|
322
|
+
plan_accepted:
|
323
|
+
email_intro: 'The plan "%{resource_title}" has been accepted. You can read the answer in this page:'
|
324
|
+
email_outro: You have received this notification because you are following "%{resource_title}". You can unfollow it from the previous link.
|
325
|
+
email_subject: A plan you're following has been accepted
|
326
|
+
notification_title: <a href="%{resource_path}">%{resource_title}</a> has been accepted.
|
327
|
+
plan_evaluating:
|
328
|
+
email_intro: '"%{resource_title}" is currently being evaluated. You can check for an answer in this page:'
|
329
|
+
email_outro: You have received this notification because you are following "%{resource_title}". You can unfollow it from the previous link.
|
330
|
+
email_subject: A plan you're following is being evaluated
|
331
|
+
notification_title: <a href="%{resource_path}">%{resource_title}</a> is being evaluated.
|
332
|
+
plan_published_for_space:
|
333
|
+
email_intro: '"%{resource_title}" has been published. You can see it here:'
|
334
|
+
email_outro: You have received this notification because you are following "%{resource_title}". You can unfollow it from the previous link.
|
335
|
+
email_subject: A plan you're following has been published
|
336
|
+
notification_title: <a href="%{resource_path}">%{resource_title}</a> has been published.
|
337
|
+
plan_rejected:
|
338
|
+
email_intro: '"%{resource_title}" has been rejected. You can read the answer in this page:'
|
339
|
+
email_outro: You have received this notification because you are following "%{resource_title}". You can unfollow it from the previous link.
|
340
|
+
email_subject: A plan you're following has been rejected
|
341
|
+
notification_title: <a href="%{resource_path}">%{resource_title}</a> has been rejected.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class EnablePgTrgmExtensionForPlans < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
return if extension_enabled?("pg_trgm")
|
6
|
+
|
7
|
+
begin
|
8
|
+
# required so that test suite works in ci env
|
9
|
+
enable_extension "pg_trgm"
|
10
|
+
rescue StandardError
|
11
|
+
raise <<-MSG.squish
|
12
|
+
Decidim requires the pg_trgm extension to be enabled in your PostgreSQL.
|
13
|
+
You can do so by running `CREATE EXTENSION IF NOT EXISTS "pg_trgm";` on the current DB as a PostgreSQL
|
14
|
+
super user.
|
15
|
+
MSG
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimPlans < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_plans_plans do |t|
|
6
|
+
t.jsonb :title
|
7
|
+
t.integer :position
|
8
|
+
t.string :state, index: true
|
9
|
+
t.jsonb :answer
|
10
|
+
t.datetime :answered_at, index: true
|
11
|
+
t.integer :coauthorships_count, :integer, null: false, default: 0
|
12
|
+
t.datetime :published_at, index: true
|
13
|
+
t.references :decidim_component, index: true, null: false
|
14
|
+
t.references :decidim_category, index: true
|
15
|
+
t.references :decidim_scope, index: true
|
16
|
+
|
17
|
+
t.timestamps
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimPlansSections < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_plans_sections do |t|
|
6
|
+
t.integer :position, index: true
|
7
|
+
t.jsonb :body
|
8
|
+
t.references :decidim_component, index: true, null: false
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimPlansPlanContents < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_plans_plan_contents do |t|
|
6
|
+
t.jsonb :body, default: []
|
7
|
+
t.references :decidim_user, index: true
|
8
|
+
t.references :decidim_plan, index: true
|
9
|
+
t.references :decidim_section, index: { name: "index_decidim_plans_contents_section_id" }
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimPlansPlanCollaboratorRequests < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_plans_plan_collaborator_requests do |t|
|
6
|
+
t.references :decidim_plan, null: false, index: { name: "index_plan_collab_requests_on_decidim_plans_plan_id" }
|
7
|
+
t.references :decidim_user, null: false, index: { name: "index_plan_collab_requests_on_decidim_user_id" }
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimPlansAttachedProposals < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_plans_attached_proposals do |t|
|
6
|
+
t.references :decidim_plan, index: true
|
7
|
+
t.references :decidim_proposal, index: true
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddSectionTypeToDecidimPlansSections < ActiveRecord::Migration[5.2]
|
4
|
+
def up
|
5
|
+
add_column :decidim_plans_sections, :section_type, :string
|
6
|
+
execute "UPDATE decidim_plans_sections SET section_type = 'field_text_multiline'"
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_column :decidim_plans_sections, :section_type
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddAnswerLengthToDecidimPlansSections < ActiveRecord::Migration[5.2]
|
4
|
+
def up
|
5
|
+
add_column :decidim_plans_sections, :answer_length, :integer, default: 0
|
6
|
+
end
|
7
|
+
|
8
|
+
def down
|
9
|
+
remove_column :decidim_plans_sections, :answer_length
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This migration and AddTransactionIdColumnToVersions provide the necessary
|
4
|
+
# schema for tracking associations.
|
5
|
+
class CreateVersionAssociations < ActiveRecord::Migration[5.2]
|
6
|
+
def self.up
|
7
|
+
create_table :version_associations do |t|
|
8
|
+
t.integer :version_id
|
9
|
+
t.string :foreign_key_name, null: false
|
10
|
+
t.integer :foreign_key_id
|
11
|
+
t.string :foreign_type, null: false
|
12
|
+
end
|
13
|
+
add_index :version_associations, [:version_id]
|
14
|
+
add_index :version_associations,
|
15
|
+
[:foreign_key_name, :foreign_key_id, :foreign_type],
|
16
|
+
name: "index_version_associations_on_foreign_key"
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.down
|
20
|
+
remove_index :version_associations, [:version_id]
|
21
|
+
remove_index :version_associations,
|
22
|
+
name: "index_version_associations_on_foreign_key"
|
23
|
+
drop_table :version_associations
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This migration and CreateVersionAssociations provide the necessary
|
4
|
+
# schema for tracking associations.
|
5
|
+
class AddTransactionIdColumnToVersions < ActiveRecord::Migration[5.2]
|
6
|
+
def self.up
|
7
|
+
add_column :versions, :transaction_id, :integer
|
8
|
+
add_index :versions, [:transaction_id]
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.down
|
12
|
+
remove_index :versions, [:transaction_id]
|
13
|
+
remove_column :versions, :transaction_id
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Plans
|
5
|
+
# This is the engine that runs on the public interface of `decidim-plans`.
|
6
|
+
class AdminEngine < ::Rails::Engine
|
7
|
+
isolate_namespace Decidim::Plans::Admin
|
8
|
+
|
9
|
+
paths["db/migrate"] = nil
|
10
|
+
paths["lib/tasks"] = nil
|
11
|
+
|
12
|
+
routes do
|
13
|
+
resources :plans, only: [:index, :new, :create, :edit, :update] do
|
14
|
+
get :search_proposals
|
15
|
+
resources :plan_answers, only: [:edit, :update]
|
16
|
+
end
|
17
|
+
resources :sections, only: [:index, :new, :create, :edit, :update]
|
18
|
+
|
19
|
+
root to: "plans#index"
|
20
|
+
end
|
21
|
+
|
22
|
+
initializer "decidim_plans.admin_assets" do |app|
|
23
|
+
app.config.assets.precompile += %w(admin/decidim_plans_manifest.js
|
24
|
+
decidim/plans/decidim_plans_manifest.js
|
25
|
+
decidim/plans/proposal_picker.scss)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|