decidim-initiatives 0.27.10 → 0.28.0.rc4
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/README.md +7 -3
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +17 -18
- data/app/cells/decidim/initiatives/initiative_cell.rb +6 -1
- data/app/cells/decidim/initiatives/initiative_dropdown_metadata_cell.rb +19 -0
- data/app/cells/decidim/initiatives/initiative_g_cell.rb +31 -0
- data/app/cells/decidim/initiatives/initiative_metadata_g_cell.rb +62 -0
- data/app/cells/decidim/initiatives/initiative_s_cell.rb +15 -0
- data/app/cells/decidim/initiatives_votes/vote/show.erb +25 -19
- data/app/cells/decidim/initiatives_votes/vote_cell.rb +3 -1
- data/app/commands/decidim/initiatives/admin/accept_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +1 -1
- data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +1 -1
- data/app/commands/decidim/initiatives/admin/discard_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/publish_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/reject_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/send_initiative_to_technical_validation.rb +2 -2
- data/app/commands/decidim/initiatives/admin/unpublish_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_type_scope.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiatives_settings.rb +1 -1
- data/app/commands/decidim/initiatives/attachment_methods.rb +2 -24
- data/app/commands/decidim/initiatives/create_initiative.rb +19 -14
- data/app/commands/decidim/initiatives/send_initiative_to_technical_validation.rb +2 -2
- data/app/commands/decidim/initiatives/spawn_committee_request.rb +1 -1
- data/app/commands/decidim/initiatives/unvote_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/update_initiative.rb +9 -2
- data/app/commands/decidim/initiatives/validate_mobile_phone.rb +2 -2
- data/app/commands/decidim/initiatives/vote_initiative.rb +5 -5
- data/app/constraints/decidim/initiatives/current_initiative.rb +1 -1
- data/app/controllers/concerns/decidim/initiatives/admin/filterable.rb +2 -2
- data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/answers_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/components_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/initiative_attachments_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +17 -6
- data/app/controllers/decidim/initiatives/admin/initiatives_permissions_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +30 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +14 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_types_permissions_controller.rb +21 -0
- data/app/controllers/decidim/initiatives/admin/moderations/reports_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/admin/moderations_controller.rb +4 -2
- data/app/controllers/decidim/initiatives/application_controller.rb +0 -1
- data/app/controllers/decidim/initiatives/authorization_create_modals_controller.rb +25 -0
- data/app/controllers/decidim/initiatives/authorization_sign_modals_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +0 -2
- data/app/controllers/decidim/initiatives/create_initiative_controller.rb +62 -115
- data/app/controllers/decidim/initiatives/initiative_signatures_controller.rb +113 -81
- data/app/controllers/decidim/initiatives/initiative_types_controller.rb +7 -0
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +37 -17
- data/app/controllers/decidim/initiatives/versions_controller.rb +0 -1
- data/app/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event.rb +2 -2
- data/app/events/decidim/initiatives/admin/support_threshold_reached_event.rb +1 -1
- data/app/events/decidim/initiatives/approve_membership_request_event.rb +16 -13
- data/app/events/decidim/initiatives/create_initiative_event.rb +10 -7
- data/app/events/decidim/initiatives/endorse_initiative_event.rb +1 -1
- data/app/events/decidim/initiatives/extend_initiative_event.rb +1 -1
- data/app/events/decidim/initiatives/initiative_sent_to_technical_validation_event.rb +2 -2
- data/app/events/decidim/initiatives/milestone_completed_event.rb +1 -1
- data/app/events/decidim/initiatives/revoke_membership_request_event.rb +16 -13
- data/app/events/decidim/initiatives/spawn_committee_request_event.rb +16 -13
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +1 -1
- data/app/forms/decidim/initiatives/initiative_form.rb +22 -31
- data/app/forms/decidim/initiatives/previous_form.rb +4 -0
- data/app/forms/decidim/initiatives/vote_form.rb +11 -11
- data/app/helpers/decidim/initiatives/admin/initiatives_helper.rb +1 -1
- data/app/helpers/decidim/initiatives/application_helper.rb +5 -62
- data/app/helpers/decidim/initiatives/initiative_helper.rb +48 -5
- data/app/helpers/decidim/initiatives/initiatives_helper.rb +33 -12
- data/app/jobs/decidim/initiatives/export_initiatives_job.rb +1 -1
- data/app/models/decidim/initiative.rb +16 -14
- data/app/models/decidim/initiatives_vote.rb +1 -1
- data/app/packs/entrypoints/decidim_initiatives.js +3 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_initiatives.svg +42 -1
- data/app/packs/src/decidim/initiatives/application.js +0 -1
- data/app/packs/src/decidim/initiatives/scoped_type.js +1 -1
- data/app/packs/stylesheets/decidim/initiatives/initiatives-votes.scss +21 -21
- data/app/packs/stylesheets/decidim/initiatives/print-initiative.scss +47 -35
- data/app/packs/stylesheets/initiatives.scss +171 -0
- data/app/permissions/decidim/initiatives/permissions.rb +3 -13
- data/app/presenters/decidim/initiatives/admin_log/initiative_presenter.rb +2 -2
- data/app/presenters/decidim/initiatives/admin_log/initiatives_settings_presenter.rb +2 -2
- data/app/presenters/decidim/initiatives/admin_log/initiatives_type_presenter.rb +2 -2
- data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +1 -1
- data/app/queries/decidim/initiatives/similar_initiatives.rb +2 -2
- data/app/queries/decidim/initiatives/support_period_finished_initiatives.rb +1 -1
- data/app/queries/decidim/initiatives/user_authorizations.rb +1 -1
- data/app/services/decidim/initiatives/pdf_signature_example.rb +44 -52
- data/app/views/decidim/initiatives/_modal.html.erb +15 -0
- data/app/views/decidim/initiatives/admin/answers/_info_initiative.html.erb +21 -19
- data/app/views/decidim/initiatives/admin/answers/edit.html.erb +41 -27
- data/app/views/decidim/initiatives/admin/committee_requests/index.html.erb +41 -48
- data/app/views/decidim/initiatives/admin/exports/_dropdown.html.erb +8 -7
- data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +111 -95
- data/app/views/decidim/initiatives/admin/initiatives/_initiative_attachments.erb +7 -7
- data/app/views/decidim/initiatives/admin/initiatives/_signatures.html.erb +87 -0
- data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +72 -60
- data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.html.erb +8 -0
- data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb +5 -78
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +76 -75
- data/app/views/decidim/initiatives/admin/initiatives_settings/_form.html.erb +7 -8
- data/app/views/decidim/initiatives/admin/initiatives_settings/edit.html.erb +17 -5
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/_form.html.erb +11 -6
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +16 -22
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +17 -15
- data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +93 -76
- data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +35 -33
- data/app/views/decidim/initiatives/admin/initiatives_types/edit.html.erb +16 -12
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +39 -48
- data/app/views/decidim/initiatives/admin/initiatives_types/new.html.erb +16 -9
- data/app/views/decidim/initiatives/committee_requests/new.html.erb +21 -19
- data/app/views/decidim/initiatives/create_initiative/_share_committee_link.html.erb +15 -20
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +62 -100
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +24 -28
- data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +15 -17
- data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +32 -46
- data/app/views/decidim/initiatives/initiative_signatures/_wizard_steps.html.erb +15 -19
- data/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb +25 -36
- data/app/views/decidim/initiatives/initiative_signatures/finish.html.erb +5 -16
- data/app/views/decidim/initiatives/initiative_signatures/sms_code.html.erb +8 -19
- data/app/views/decidim/initiatives/initiative_signatures/sms_phone_number.html.erb +8 -20
- data/app/views/decidim/initiatives/initiatives/_committee_members.html.erb +48 -66
- data/app/views/decidim/initiatives/initiatives/_form.html.erb +49 -95
- data/app/views/decidim/initiatives/initiatives/_initiative_badge.html.erb +3 -5
- data/app/views/decidim/initiatives/initiatives/_initiative_hero.html.erb +13 -0
- data/app/views/decidim/initiatives/initiatives/_initiatives.html.erb +6 -15
- data/app/views/decidim/initiatives/initiatives/_interactions.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb +28 -0
- data/app/views/decidim/initiatives/initiatives/_progress_bar.html.erb +2 -6
- data/app/views/decidim/initiatives/initiatives/_result.html.erb +15 -21
- data/app/views/decidim/initiatives/initiatives/_send_to_technical_validation.html.erb +3 -3
- data/app/views/decidim/initiatives/initiatives/_tags_type.html.erb +1 -0
- data/app/views/decidim/initiatives/initiatives/_vote_button.html.erb +9 -9
- data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +7 -7
- data/app/views/decidim/initiatives/initiatives/edit.html.erb +63 -68
- data/app/views/decidim/initiatives/initiatives/index.html.erb +17 -18
- data/app/views/decidim/initiatives/initiatives/index.js.erb +0 -5
- data/app/views/decidim/initiatives/initiatives/print.html.erb +123 -120
- data/app/views/decidim/initiatives/initiatives/show.html.erb +188 -72
- data/app/views/decidim/initiatives/initiatives_mailer/notify_creation.html.erb +2 -2
- data/app/views/decidim/initiatives/initiatives_type_scopes/search.html.erb +2 -1
- data/app/views/decidim/initiatives/versions/show.html.erb +15 -6
- data/app/views/layouts/decidim/_initiative_creation_header.html.erb +17 -28
- data/app/views/layouts/decidim/_initiative_header.html.erb +3 -23
- data/app/views/layouts/decidim/_initiative_header_steps.html.erb +4 -12
- data/app/views/layouts/decidim/_initiative_signature_creation_header.html.erb +5 -26
- data/app/views/layouts/decidim/admin/initiative.html.erb +12 -13
- data/app/views/layouts/decidim/admin/initiatives.html.erb +40 -11
- data/app/views/layouts/decidim/initiative.html.erb +16 -11
- data/app/views/layouts/decidim/initiative_creation.html.erb +7 -18
- data/app/views/layouts/decidim/initiative_head.html.erb +15 -0
- data/app/views/layouts/decidim/initiative_signature_creation.html.erb +3 -11
- data/config/assets.rb +0 -1
- data/config/initializers/wicked_pdf.rb +1 -1
- data/config/locales/ar.yml +1 -96
- data/config/locales/bg.yml +0 -642
- data/config/locales/ca.yml +76 -115
- data/config/locales/cs.yml +70 -109
- data/config/locales/de.yml +78 -117
- data/config/locales/el.yml +1 -98
- data/config/locales/en.yml +69 -108
- data/config/locales/es-MX.yml +65 -104
- data/config/locales/es-PY.yml +65 -104
- data/config/locales/es.yml +73 -112
- data/config/locales/eu.yml +66 -105
- data/config/locales/fi-plain.yml +67 -106
- data/config/locales/fi.yml +68 -107
- data/config/locales/fr-CA.yml +69 -108
- data/config/locales/fr.yml +67 -106
- data/config/locales/ga-IE.yml +0 -35
- data/config/locales/gl.yml +1 -89
- data/config/locales/hu.yml +25 -114
- data/config/locales/id-ID.yml +1 -89
- data/config/locales/is-IS.yml +1 -60
- data/config/locales/it.yml +6 -111
- data/config/locales/ja.yml +65 -111
- data/config/locales/lb.yml +6 -88
- data/config/locales/lt.yml +52 -103
- data/config/locales/lv.yml +1 -99
- data/config/locales/nl.yml +6 -104
- data/config/locales/no.yml +6 -114
- data/config/locales/pl.yml +6 -158
- data/config/locales/pt-BR.yml +23 -146
- data/config/locales/pt.yml +6 -111
- data/config/locales/ro-RO.yml +13 -108
- data/config/locales/ru.yml +1 -68
- data/config/locales/sk.yml +1 -85
- data/config/locales/sl.yml +3 -5
- data/config/locales/sv.yml +25 -120
- data/config/locales/tr-TR.yml +9 -110
- data/config/locales/uk.yml +1 -68
- data/config/locales/zh-CN.yml +6 -102
- data/config/locales/zh-TW.yml +31 -95
- data/db/migrate/20171017091734_add_scopes_for_all_initiative_types.rb +1 -1
- data/db/migrate/20171017095143_update_initiative_scoped_type.rb +1 -1
- data/db/migrate/20191002082220_move_signature_type_to_initative_type.rb +1 -1
- data/lib/decidim/api/initiative_committee_member_type.rb +2 -2
- data/lib/decidim/initiatives/admin_engine.rb +13 -93
- data/lib/decidim/initiatives/content_blocks/registry_manager.rb +22 -0
- data/lib/decidim/initiatives/engine.rb +45 -23
- data/lib/decidim/initiatives/menu.rb +150 -0
- data/lib/decidim/initiatives/participatory_space.rb +6 -91
- data/lib/decidim/initiatives/query_extensions.rb +5 -5
- data/lib/decidim/initiatives/seeds.rb +95 -0
- data/lib/decidim/initiatives/test/factories.rb +43 -48
- data/lib/decidim/initiatives/version.rb +1 -1
- data/lib/decidim/initiatives.rb +1 -1
- data/lib/tasks/decidim_initiatives.rake +2 -2
- data/lib/tasks/initiatives/upgrade/decidim_initiatives_upgrade_tasks.rake +1 -1
- metadata +51 -81
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +0 -28
- data/app/cells/decidim/initiatives/initiative_m/author.erb +0 -10
- data/app/cells/decidim/initiatives/initiative_m/footer.erb +0 -28
- data/app/cells/decidim/initiatives/initiative_m/tags.erb +0 -9
- data/app/cells/decidim/initiatives/initiative_m_cell.rb +0 -77
- data/app/controllers/decidim/initiatives/widgets_controller.rb +0 -44
- data/app/packs/stylesheets/decidim/initiatives/admin.scss +0 -33
- data/app/packs/stylesheets/decidim/initiatives/initiatives.scss +0 -64
- data/app/packs/stylesheets/decidim/initiatives/popularity_item.scss +0 -76
- data/app/packs/stylesheets/decidim/initiatives/statistics.scss +0 -15
- data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +0 -2
- data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +0 -40
- data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +0 -23
- data/app/views/decidim/initiatives/initiatives/_author.html.erb +0 -35
- data/app/views/decidim/initiatives/initiatives/_count.html.erb +0 -1
- data/app/views/decidim/initiatives/initiatives/_filters.html.erb +0 -33
- data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/initiatives/initiatives/_index_header.html.erb +0 -44
- data/app/views/decidim/initiatives/initiatives/_tags.html.erb +0 -7
- data/app/views/decidim/initiatives/versions/index.html.erb +0 -8
- data/config/locales/he-IL.yml +0 -1
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/decidim-initiatives.gemspec +0 -38
- data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +0 -56
- data/lib/gem_overrides/origami/date.rb +0 -47
data/config/locales/zh-TW.yml
CHANGED
@@ -97,8 +97,8 @@ zh-TW:
|
|
97
97
|
title_or_description_or_id_string_or_author_name_or_author_nickname_cont: 透過標題、描述、ID 或作者姓名搜尋 %{collection}
|
98
98
|
initiatives_settings:
|
99
99
|
update:
|
100
|
-
error:
|
101
|
-
success:
|
100
|
+
error: 發生一個錯誤.
|
101
|
+
success: 倡議設定已成功更新.
|
102
102
|
menu:
|
103
103
|
attachments: 附件
|
104
104
|
committee_members: 委員會成員
|
@@ -216,8 +216,8 @@ zh-TW:
|
|
216
216
|
index:
|
217
217
|
approve: 核准
|
218
218
|
confirm_revoke: 您確定嗎?
|
219
|
-
invite_to_committee_help:
|
220
|
-
no_members_yet:
|
219
|
+
invite_to_committee_help: 透過分享此連結,邀請其他參與者加入推廣委員會。
|
220
|
+
no_members_yet: 推廣委員會中沒有成員.
|
221
221
|
revoke: 撤銷
|
222
222
|
title: 委員會成員
|
223
223
|
content_blocks:
|
@@ -242,7 +242,6 @@ zh-TW:
|
|
242
242
|
success: 這個倡議已經送至技術驗證。
|
243
243
|
update: 更新
|
244
244
|
form:
|
245
|
-
attachments: 附件
|
246
245
|
settings: 設定
|
247
246
|
title: 一般資訊
|
248
247
|
index:
|
@@ -255,8 +254,8 @@ zh-TW:
|
|
255
254
|
new: 新的
|
256
255
|
photos: 圖片
|
257
256
|
update:
|
258
|
-
error:
|
259
|
-
success:
|
257
|
+
error: 出現了一個錯誤.
|
258
|
+
success: 倡議已成功更新.
|
260
259
|
initiatives_settings:
|
261
260
|
edit:
|
262
261
|
update: 更新
|
@@ -269,45 +268,38 @@ zh-TW:
|
|
269
268
|
title: 倡議設定
|
270
269
|
initiatives_type_scopes:
|
271
270
|
create:
|
272
|
-
error:
|
273
|
-
success:
|
271
|
+
error: 出現了一個錯誤.
|
272
|
+
success: 已為給定的倡議類型建立新範圍.
|
274
273
|
destroy:
|
275
|
-
success:
|
274
|
+
success: 範圍已成功刪除.
|
276
275
|
edit:
|
277
|
-
back: 返回
|
278
|
-
confirm_destroy: 您確定嗎?
|
279
|
-
destroy: 刪除
|
280
276
|
title: 編輯倡議類型範圍
|
281
277
|
update: 更新
|
282
278
|
new:
|
283
|
-
back: 返回
|
284
279
|
create: 建立
|
285
280
|
title: 建立倡議類型範圍
|
286
281
|
update:
|
287
|
-
error:
|
288
|
-
success:
|
282
|
+
error: 出現了一個錯誤.
|
283
|
+
success: 範圍已成功更新.
|
289
284
|
initiatives_types:
|
290
285
|
create:
|
291
|
-
error:
|
292
|
-
success:
|
286
|
+
error: 出現了一個錯誤.
|
287
|
+
success: 一個新的倡議類型已成功更新.
|
293
288
|
destroy:
|
294
|
-
success:
|
289
|
+
success: 該倡議類型已成功刪除.
|
295
290
|
edit:
|
296
|
-
confirm_destroy: 您確定嗎?
|
297
|
-
destroy: 刪除
|
298
291
|
update: 更新
|
299
292
|
form:
|
300
293
|
authorizations: 權限設置
|
301
294
|
options: 選項
|
302
|
-
title: 一般資訊
|
303
295
|
initiative_type_scopes:
|
304
296
|
title: 倡議類型範圍
|
305
297
|
new:
|
306
298
|
create: 建立
|
307
299
|
title: 新的倡議類型
|
308
300
|
update:
|
309
|
-
error:
|
310
|
-
success:
|
301
|
+
error: 出現了一個錯誤.
|
302
|
+
success: 該倡議類型已成功更新.
|
311
303
|
admin_log:
|
312
304
|
initiative:
|
313
305
|
publish: "%{user_name} 發佈了 %{resource_name} 倡議"
|
@@ -328,10 +320,6 @@ zh-TW:
|
|
328
320
|
rejected: 不足夠的簽署數
|
329
321
|
validating: 技術驗證
|
330
322
|
application_helper:
|
331
|
-
filter_area_values:
|
332
|
-
all: 全部
|
333
|
-
filter_scope_values:
|
334
|
-
all: 全部
|
335
323
|
filter_state_values:
|
336
324
|
accepted: 足夠的簽署數
|
337
325
|
all: 全部
|
@@ -358,7 +346,6 @@ zh-TW:
|
|
358
346
|
fill_data:
|
359
347
|
back: 返回
|
360
348
|
continue: 繼續
|
361
|
-
decidim_user_group_id_help: 此計畫創建後,無法更改發起人身份。
|
362
349
|
fill_data_help: "<ul> <li>檢閱您倡議的內容。標題是否易於理解?倡議的目標是否清晰明確?</li> <li>您需要選擇簽名的類型。是現場簽名、線上簽名還是兩者的組合?</li> <li>倡議的地理範圍是什麼?</li> </ul>"
|
363
350
|
more_information: "(更多資訊)"
|
364
351
|
select_area: 選擇一個地區
|
@@ -373,31 +360,22 @@ zh-TW:
|
|
373
360
|
more_information: "(更多資訊)"
|
374
361
|
send_my_initiative: 將我的倡議送交技術審核
|
375
362
|
finish_help:
|
376
|
-
access_reminder: 您可以透過「倡議」頁面上的 %{link} 過濾器來訪問您的倡議。
|
377
363
|
publish_helper_text: 請記住,要使您的倡議能夠被發佈,您必須填寫必要的資訊並將其<strong>送交技術審核</strong>以供管理員審查。
|
378
364
|
previous_form:
|
379
365
|
back: 返回
|
380
366
|
continue: 繼續
|
381
|
-
help: 倡議的內容是什麼?請記下標題和描述。我們建議使用簡短明瞭的標題和以提出解決方案為重點的描述。
|
382
|
-
more_information: "(更多資訊)"
|
383
367
|
promotal_committee:
|
384
|
-
back: 返回
|
385
368
|
individual_help_text: 這種倡議需要至少 %{committee_size} 人(證明者)組成推廣委員會。您必須與參與該倡議的其他人分享以下鏈接。當您的聯繫人收到此鏈接後,他們將需要按照指示進行相應步驟。
|
386
369
|
more_information: "(更多資訊)"
|
387
370
|
select_initiative_type:
|
388
371
|
back: 返回
|
389
372
|
choose_html: 我想要創建一個<strong>%{title}</strong>
|
390
|
-
more_information:
|
373
|
+
more_information: (更多資訊)
|
391
374
|
select: 我想推動這個倡議
|
392
375
|
select_initiative_type_help: 倡議是參與者可以通過其來干預,以便組織可以為捍衛公共利益而采取行動的手段。您希望發起哪個倡議?
|
376
|
+
verification_required: 驗證您的帳戶以推動這個倡議
|
393
377
|
share_committee_link:
|
394
|
-
continue: 繼續
|
395
378
|
invite_to_committee_help: 邀請成為推動委員會成員的人的連結
|
396
|
-
show_similar_initiatives:
|
397
|
-
back: 返回
|
398
|
-
compare_help: 如果以下任何一個倡議與您的倡議相似,我們鼓勵您簽署它。這樣,您的提案將更有可能被實現。
|
399
|
-
continue: 我的倡議與這些不同
|
400
|
-
more_information: "(更多資訊)"
|
401
379
|
edit:
|
402
380
|
accept: 接受倡議
|
403
381
|
back: 返回
|
@@ -435,19 +413,12 @@ zh-TW:
|
|
435
413
|
email_subject: "%{applicant_nickname} 想加入你的倡議"
|
436
414
|
notification_title: <a href="%{applicant_profile_url}">%{applicant_nickname}</a> 申請加入你的倡議 <a href="%{resource_url}">%{resource_title}</a> 的推動委員會。點擊<a href="%{resource_url}/edit">這裡</a>接受或拒絕申請。
|
437
415
|
form:
|
438
|
-
add_attachments: 文件
|
439
416
|
attachment_legend: "(可選) 新增附件"
|
440
|
-
delete_attachment: 刪除
|
441
417
|
index:
|
442
|
-
|
443
|
-
uninitialized: 目前尚未有管理員配置方案
|
418
|
+
uninitialized: 尚未由管理員設置倡議。
|
444
419
|
initiative_signatures:
|
445
420
|
fill_personal_data:
|
446
421
|
continue: 繼續
|
447
|
-
date_select:
|
448
|
-
day: 日
|
449
|
-
month: 月
|
450
|
-
year: 年
|
451
422
|
help: 以下請填寫您的個人資料以簽署此倡議。
|
452
423
|
finish:
|
453
424
|
back_to_initiative: 回到倡議
|
@@ -456,11 +427,11 @@ zh-TW:
|
|
456
427
|
help: 請檢查您手機收到的SMS簡訊
|
457
428
|
sms_phone_number:
|
458
429
|
continue: 發送簡訊給我
|
459
|
-
help:
|
430
|
+
help: 請填寫您驗證過的手機號碼以申請驗證碼.
|
460
431
|
initiative_votes:
|
461
432
|
create:
|
462
433
|
error: 發起倡議的簽署遇到問題。
|
463
|
-
invalid:
|
434
|
+
invalid: 提供的資料以簽署此倡議為無效.
|
464
435
|
success_html: 恭喜!<strong> %{title} </strong> 倡議已成功簽署。
|
465
436
|
personal_data:
|
466
437
|
invalid: 個人資料與授權提供的資料不一致。
|
@@ -469,17 +440,13 @@ zh-TW:
|
|
469
440
|
sms_phone:
|
470
441
|
invalid: 電話號碼無效或正在等待授權。請檢查您的授權。
|
471
442
|
initiatives:
|
472
|
-
author:
|
473
|
-
deleted: 刪除
|
474
443
|
author_list:
|
475
444
|
hidden_authors_count:
|
476
445
|
other: "one\n以及其他 %{count} 個人\n\nOther\n以及其他 %{count} 個人"
|
477
446
|
committee_members:
|
478
447
|
approve: 核准
|
479
|
-
confirm_revoke: 您確定嗎?
|
480
448
|
invite_to_committee_help: 透過分享此連結,邀請其他參與者加入推廣委員會。
|
481
|
-
no_members_yet:
|
482
|
-
revoke: 撤銷
|
449
|
+
no_members_yet: 推廣委員會中沒有成員.
|
483
450
|
title: 委員會成員
|
484
451
|
count:
|
485
452
|
title:
|
@@ -490,21 +457,10 @@ zh-TW:
|
|
490
457
|
author: 作者
|
491
458
|
myself: 我的倡議
|
492
459
|
scope: 範圍
|
493
|
-
search: 搜尋
|
494
460
|
state: 狀態
|
495
461
|
type: 類別
|
496
|
-
filters_small_view:
|
497
|
-
close_modal: 關閉視窗
|
498
|
-
filter: 篩選
|
499
|
-
filter_by: 篩選條件
|
500
|
-
unfold: 展開
|
501
462
|
index_header:
|
502
463
|
new_initiative: 新的倡議
|
503
|
-
not_authorized:
|
504
|
-
authorizations_page: 查看授權
|
505
|
-
close: 關閉
|
506
|
-
explanation: 你需要先通過驗證才能創建新的倡議。
|
507
|
-
title: 需要授權
|
508
464
|
initiatives:
|
509
465
|
closed_initiatives_warning: 目前沒有開放中的倡議,但您可以在這裡找到所有已結束的倡議清單。
|
510
466
|
no_initiatives_warning: 沒有符合您的搜尋條件的倡議。
|
@@ -545,12 +501,8 @@ zh-TW:
|
|
545
501
|
answer_title: 這個倡議已經有回應了。
|
546
502
|
initiative_rejected_reason: 此倡議因缺乏簽名而被拒絕。
|
547
503
|
show:
|
548
|
-
any_vote_method: 此倡議收集線上和現場簽名。
|
549
504
|
confirm: 您即將發送倡議給管理員進行審核和發佈。一旦發佈,您將無法編輯它。您確定要繼續嗎?"
|
550
505
|
edit: 編輯
|
551
|
-
follow_description: 當這個倡議有新的消息時,您將收到通知。
|
552
|
-
offline_method: 這個倡議只收集現場簽名。
|
553
|
-
print: 列印倡議書
|
554
506
|
send_to_technical_validation: 送交技術審核
|
555
507
|
signatures_count:
|
556
508
|
other: " 簽名"
|
@@ -563,8 +515,6 @@ zh-TW:
|
|
563
515
|
votes_count:
|
564
516
|
count:
|
565
517
|
other: 簽名
|
566
|
-
most_popular_initiative: 最受歡迎的倡議
|
567
|
-
need_more_votes: 需要更多簽署支持
|
568
518
|
initiatives_mailer:
|
569
519
|
creation_subject: 您的倡議「%{title}」已被創建
|
570
520
|
initiative_link:
|
@@ -577,7 +527,12 @@ zh-TW:
|
|
577
527
|
status_change_body_for: '倡議「%{title}」的狀態已更改為:%{state}'
|
578
528
|
status_change_for: 倡議「%{title}」的狀態已更改。
|
579
529
|
last_activity:
|
580
|
-
new_initiative:
|
530
|
+
new_initiative: '新的倡議:'
|
531
|
+
modal:
|
532
|
+
not_authorized:
|
533
|
+
authorizations_page: 查看授權
|
534
|
+
explanation: 你需要先通過驗證才能創建新的倡議。
|
535
|
+
title: 需要授權
|
581
536
|
show:
|
582
537
|
badge_name:
|
583
538
|
accepted: 足夠的簽署數
|
@@ -586,18 +541,13 @@ zh-TW:
|
|
586
541
|
published: 已發佈
|
587
542
|
rejected: 簽署數不足
|
588
543
|
validating: 技術驗證
|
589
|
-
signature_interval:
|
590
|
-
title: 簽名收集期限
|
591
544
|
states:
|
592
545
|
accepted: 已接受
|
593
546
|
expired: 已過期
|
594
547
|
unavailable_scope: 不可用的範圍
|
595
548
|
update:
|
596
|
-
error:
|
597
|
-
success:
|
598
|
-
versions:
|
599
|
-
shared:
|
600
|
-
back_to_resource: 回到倡議
|
549
|
+
error: 出現了一個錯誤.
|
550
|
+
success: 倡議已成功更新.
|
601
551
|
menu:
|
602
552
|
initiatives: 倡議
|
603
553
|
resources:
|
@@ -606,36 +556,22 @@ zh-TW:
|
|
606
556
|
comment: 評論
|
607
557
|
initiatives_type:
|
608
558
|
actions:
|
559
|
+
create: 建立
|
609
560
|
title: 操作
|
610
561
|
vote: 簽署
|
611
562
|
layouts:
|
612
563
|
decidim:
|
613
564
|
initiative_creation_header:
|
614
|
-
back: 返回
|
615
565
|
fill_data: 建立
|
616
566
|
finish: 完成
|
617
|
-
previous_form: 開始
|
618
567
|
promotal_committee: 推動委員會
|
619
568
|
select_initiative_type: 選擇
|
620
|
-
show_similar_initiatives: 比較
|
621
|
-
step: 第 %{current} 步,共 %{total} 步
|
622
|
-
title: 創建新倡議
|
623
|
-
initiative_header:
|
624
|
-
initiative_menu_item: 倡議
|
625
569
|
initiative_signature_creation_header:
|
626
|
-
back: 返回
|
627
570
|
fill_personal_data: 填寫您的資料
|
628
571
|
finish: 完成
|
629
|
-
finished: 倡議簽名已創建
|
630
|
-
see_steps: 看步驟
|
631
|
-
select_identity: 選擇身份
|
632
572
|
sms_code: SMS短訊代碼驗證碼
|
633
573
|
sms_phone_number: 行動電話號碼
|
634
|
-
step: 第 %{current} 步,共 %{total} 步
|
635
574
|
title: 簽名 %{initiative_title}
|
636
575
|
initiatives:
|
637
|
-
initiative:
|
638
|
-
check: 查看
|
639
|
-
check_and_support: 查看並簽署
|
640
576
|
no_initiatives_yet:
|
641
577
|
no_initiatives_yet: 尚無倡議!
|
@@ -28,7 +28,7 @@ class AddScopesForAllInitiativeTypes < ActiveRecord::Migration[5.1]
|
|
28
28
|
# environment consistent with the underlying data model. It is
|
29
29
|
# not relevant for production environments.
|
30
30
|
Organization.find_each do |organization|
|
31
|
-
InitiativesType.where(organization:
|
31
|
+
InitiativesType.where(organization:).find_each do |type|
|
32
32
|
organization.scopes.each do |scope|
|
33
33
|
InitiativesTypeScope.create(
|
34
34
|
decidim_initiatives_types_id: type.id,
|
@@ -52,6 +52,6 @@ class UpdateInitiativeScopedType < ActiveRecord::Migration[5.1]
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def down
|
55
|
-
raise ActiveRecord::IrreversibleMigration, "
|
55
|
+
raise ActiveRecord::IrreversibleMigration, "Cannot undo initialization of mandatory attribute"
|
56
56
|
end
|
57
57
|
end
|
@@ -7,7 +7,7 @@ class MoveSignatureTypeToInitativeType < ActiveRecord::Migration[5.2]
|
|
7
7
|
|
8
8
|
def change
|
9
9
|
if !ActiveRecord::Base.connection.table_exists?("decidim_initiatives_types")
|
10
|
-
Rails.logger.info "Skipping migration since there
|
10
|
+
Rails.logger.info "Skipping migration since there is no InitiativesType table"
|
11
11
|
return
|
12
12
|
elsif InitiativesType.count.positive?
|
13
13
|
raise "You need to edit this migration to continue"
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Initiatives
|
5
|
-
# This type represents
|
5
|
+
# This type represents an initiative committee member.
|
6
6
|
class InitiativeCommitteeMemberType < Decidim::Api::Types::BaseObject
|
7
7
|
graphql_name "InitiativeCommitteeMemberType"
|
8
|
-
description "
|
8
|
+
description "An initiative committee member"
|
9
9
|
|
10
10
|
field :id, GraphQL::Types::ID, "Internal ID for this member of the committee", null: false
|
11
11
|
field :user, Decidim::Core::UserType, "The decidim user for this initiative committee member", null: true
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require "rails"
|
4
4
|
require "active_support/all"
|
5
5
|
require "decidim/core"
|
6
|
+
require "decidim/initiatives/menu"
|
6
7
|
|
7
8
|
module Decidim
|
8
9
|
module Initiatives
|
@@ -37,7 +38,7 @@ module Decidim
|
|
37
38
|
get :export
|
38
39
|
end
|
39
40
|
|
40
|
-
resources :attachments, controller: "initiative_attachments"
|
41
|
+
resources :attachments, controller: "initiative_attachments", except: [:show]
|
41
42
|
|
42
43
|
resources :committee_requests, only: [:index] do
|
43
44
|
member do
|
@@ -83,105 +84,24 @@ module Decidim
|
|
83
84
|
end
|
84
85
|
end
|
85
86
|
|
86
|
-
initializer "
|
87
|
-
Decidim.
|
88
|
-
menu.add_item :initiatives,
|
89
|
-
I18n.t("menu.initiatives", scope: "decidim.admin"),
|
90
|
-
decidim_admin_initiatives.initiatives_path,
|
91
|
-
icon_name: "chat",
|
92
|
-
position: 2.4,
|
93
|
-
active: is_active_link?(decidim_admin_initiatives.initiatives_path) ||
|
94
|
-
is_active_link?(decidim_admin_initiatives.initiatives_types_path) ||
|
95
|
-
is_active_link?(
|
96
|
-
decidim_admin_initiatives.edit_initiatives_setting_path(
|
97
|
-
Decidim::InitiativesSettings.find_or_create_by!(organization: current_organization)
|
98
|
-
)
|
99
|
-
),
|
100
|
-
if: allowed_to?(:enter, :space_area, space_name: :initiatives)
|
101
|
-
end
|
87
|
+
initializer "decidim_initiatives_admin.menu" do
|
88
|
+
Decidim::Initiatives::Menu.register_admin_menu_modules!
|
102
89
|
end
|
103
90
|
|
104
|
-
initializer "
|
105
|
-
Decidim.
|
106
|
-
|
107
|
-
caption = decidim_escape_translated(component.name)
|
108
|
-
if component.primary_stat.present?
|
109
|
-
caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter")
|
110
|
-
end
|
91
|
+
initializer "decidim_initiatives_admin.components_menu" do
|
92
|
+
Decidim::Initiatives::Menu.register_admin_initiatives_components_menu!
|
93
|
+
end
|
111
94
|
|
112
|
-
|
113
|
-
|
114
|
-
manage_component_path(component),
|
115
|
-
active: is_active_link?(manage_component_path(component)),
|
116
|
-
if: component.manifest.admin_engine # && user_role_config.component_is_accessible?(component.manifest_name)
|
117
|
-
end
|
118
|
-
end
|
95
|
+
initializer "decidim_initiatives_admin.initiative_menu" do
|
96
|
+
Decidim::Initiatives::Menu.register_admin_initiative_menu!
|
119
97
|
end
|
120
98
|
|
121
|
-
initializer "
|
122
|
-
Decidim.
|
123
|
-
menu.add_item :edit_initiative,
|
124
|
-
I18n.t("menu.information", scope: "decidim.admin"),
|
125
|
-
decidim_admin_initiatives.edit_initiative_path(current_participatory_space),
|
126
|
-
active: is_active_link?(decidim_admin_initiatives.edit_initiative_path(current_participatory_space)),
|
127
|
-
if: allowed_to?(:edit, :initiative, initiative: current_participatory_space)
|
128
|
-
|
129
|
-
menu.add_item :initiative_committee_requests,
|
130
|
-
I18n.t("menu.committee_members", scope: "decidim.admin"),
|
131
|
-
decidim_admin_initiatives.initiative_committee_requests_path(current_participatory_space),
|
132
|
-
active: is_active_link?(decidim_admin_initiatives.initiative_committee_requests_path(current_participatory_space)),
|
133
|
-
if: current_participatory_space.promoting_committee_enabled? && allowed_to?(:manage_membership, :initiative, initiative: current_participatory_space)
|
134
|
-
|
135
|
-
menu.add_item :components,
|
136
|
-
I18n.t("menu.components", scope: "decidim.admin"),
|
137
|
-
decidim_admin_initiatives.components_path(current_participatory_space),
|
138
|
-
active: is_active_link?(decidim_admin_initiatives.components_path(current_participatory_space)),
|
139
|
-
if: allowed_to?(:read, :component, initiative: current_participatory_space),
|
140
|
-
submenu: { target_menu: :admin_initiatives_components_menu, options: { container_options: { id: "components-list" } } }
|
141
|
-
|
142
|
-
menu.add_item :initiative_attachments,
|
143
|
-
I18n.t("menu.attachments", scope: "decidim.admin"),
|
144
|
-
decidim_admin_initiatives.initiative_attachments_path(current_participatory_space),
|
145
|
-
active: is_active_link?(decidim_admin_initiatives.initiative_attachments_path(current_participatory_space)),
|
146
|
-
if: allowed_to?(:read, :attachment, initiative: current_participatory_space)
|
147
|
-
|
148
|
-
menu.add_item :moderations,
|
149
|
-
I18n.t("menu.moderations", scope: "decidim.admin"),
|
150
|
-
decidim_admin_initiatives.moderations_path(current_participatory_space),
|
151
|
-
active: is_active_link?(decidim_admin_initiatives.moderations_path(current_participatory_space)),
|
152
|
-
if: allowed_to?(:read, :moderation)
|
153
|
-
end
|
99
|
+
initializer "decidim_initiatives_admin.initiative_actions_menu" do
|
100
|
+
Decidim::Initiatives::Menu.register_admin_initiative_actions_menu!
|
154
101
|
end
|
155
102
|
|
156
|
-
initializer "
|
157
|
-
Decidim.
|
158
|
-
menu.add_item :initiatives,
|
159
|
-
I18n.t("menu.initiatives", scope: "decidim.admin"),
|
160
|
-
decidim_admin_initiatives.initiatives_path,
|
161
|
-
position: 1.0,
|
162
|
-
active: is_active_link?(decidim_admin_initiatives.initiatives_path),
|
163
|
-
if: allowed_to?(:index, :initiative)
|
164
|
-
|
165
|
-
menu.add_item :initiatives_types,
|
166
|
-
I18n.t("menu.initiatives_types", scope: "decidim.admin"),
|
167
|
-
decidim_admin_initiatives.initiatives_types_path,
|
168
|
-
active: is_active_link?(decidim_admin_initiatives.initiatives_types_path),
|
169
|
-
if: allowed_to?(:manage, :initiative_type)
|
170
|
-
|
171
|
-
menu.add_item :initiatives_settings,
|
172
|
-
I18n.t("menu.initiatives_settings", scope: "decidim.admin"),
|
173
|
-
decidim_admin_initiatives.edit_initiatives_setting_path(
|
174
|
-
Decidim::InitiativesSettings.find_or_create_by!(
|
175
|
-
organization: current_organization
|
176
|
-
)
|
177
|
-
),
|
178
|
-
active: is_active_link?(
|
179
|
-
decidim_admin_initiatives.edit_initiatives_setting_path(
|
180
|
-
Decidim::InitiativesSettings.find_or_create_by!(organization: current_organization)
|
181
|
-
)
|
182
|
-
),
|
183
|
-
if: allowed_to?(:update, :initiatives_settings)
|
184
|
-
end
|
103
|
+
initializer "decidim_initiatives_admin.initiatives_menu" do
|
104
|
+
Decidim::Initiatives::Menu.register_admin_initiatives_menu!
|
185
105
|
end
|
186
106
|
end
|
187
107
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Initiatives
|
5
|
+
module ContentBlocks
|
6
|
+
class RegistryManager
|
7
|
+
def self.register!
|
8
|
+
Decidim.content_blocks.register(:homepage, :highlighted_initiatives) do |content_block|
|
9
|
+
content_block.cell = "decidim/initiatives/content_blocks/highlighted_initiatives"
|
10
|
+
content_block.public_name_key = "decidim.initiatives.content_blocks.highlighted_initiatives.name"
|
11
|
+
content_block.settings_form_cell = "decidim/initiatives/content_blocks/highlighted_initiatives_settings_form"
|
12
|
+
|
13
|
+
content_block.settings do |settings|
|
14
|
+
settings.attribute :max_results, type: :integer, default: 4
|
15
|
+
settings.attribute :order, type: :string, default: "default"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -3,9 +3,10 @@
|
|
3
3
|
require "rails"
|
4
4
|
require "active_support/all"
|
5
5
|
require "decidim/core"
|
6
|
+
require "decidim/initiatives/content_blocks/registry_manager"
|
6
7
|
require "decidim/initiatives/current_locale"
|
7
|
-
require "decidim/initiatives/initiatives_filter_form_builder"
|
8
8
|
require "decidim/initiatives/initiative_slug"
|
9
|
+
require "decidim/initiatives/menu"
|
9
10
|
require "decidim/initiatives/query_extensions"
|
10
11
|
|
11
12
|
module Decidim
|
@@ -19,7 +20,16 @@ module Decidim
|
|
19
20
|
get "/initiative_type_scopes/search", to: "initiatives_type_scopes#search", as: :initiative_type_scopes_search
|
20
21
|
get "/initiative_type_signature_types/search", to: "initiatives_type_signature_types#search", as: :initiative_type_signature_types_search
|
21
22
|
|
22
|
-
resources :create_initiative
|
23
|
+
resources :create_initiative do
|
24
|
+
collection do
|
25
|
+
get :select_initiative_type
|
26
|
+
put :select_initiative_type, to: "create_initiative#store_initiative_type"
|
27
|
+
get :fill_data
|
28
|
+
put :fill_data, to: "create_initiative#store_data"
|
29
|
+
get :promotal_committee
|
30
|
+
get :finish
|
31
|
+
end
|
32
|
+
end
|
23
33
|
|
24
34
|
get "initiatives/:initiative_id", to: redirect { |params, _request|
|
25
35
|
initiative = Decidim::Initiative.find(params[:initiative_id])
|
@@ -32,16 +42,27 @@ module Decidim
|
|
32
42
|
}, constraints: { initiative_id: /[0-9]+/ }
|
33
43
|
|
34
44
|
resources :initiatives, param: :slug, only: [:index, :show, :edit, :update], path: "initiatives" do
|
35
|
-
resources :initiative_signatures
|
45
|
+
resources :signatures, controller: "initiative_signatures" do
|
46
|
+
collection do
|
47
|
+
get :fill_personal_data
|
48
|
+
put :fill_personal_data, to: "initiative_signatures#store_personal_data"
|
49
|
+
get :sms_phone_number
|
50
|
+
put :sms_phone_number, to: "initiative_signatures#store_sms_phone_number"
|
51
|
+
get :sms_code
|
52
|
+
put :sms_code, to: "initiative_signatures#store_sms_code"
|
53
|
+
get :finish
|
54
|
+
put :finish, to: "initiative_signatures#store_finish"
|
55
|
+
end
|
56
|
+
end
|
36
57
|
|
37
58
|
member do
|
38
59
|
get :authorization_sign_modal, to: "authorization_sign_modals#show"
|
60
|
+
get :authorization_create_modal, to: "authorization_create_modals#show"
|
39
61
|
get :print, to: "initiatives#print", as: "print"
|
40
62
|
get :send_to_technical_validation, to: "initiatives#send_to_technical_validation"
|
41
63
|
end
|
42
64
|
|
43
65
|
resource :initiative_vote, only: [:create, :destroy]
|
44
|
-
resource :widget, only: :show, path: "embed"
|
45
66
|
resources :committee_requests, only: [:new] do
|
46
67
|
collection do
|
47
68
|
get :spawn
|
@@ -51,7 +72,7 @@ module Decidim
|
|
51
72
|
delete :revoke
|
52
73
|
end
|
53
74
|
end
|
54
|
-
resources :versions, only: [:show
|
75
|
+
resources :versions, only: [:show]
|
55
76
|
end
|
56
77
|
|
57
78
|
scope "/initiatives/:initiative_slug/f/:component_id" do
|
@@ -65,17 +86,15 @@ module Decidim
|
|
65
86
|
end
|
66
87
|
end
|
67
88
|
|
89
|
+
initializer "decidim_initiatives.register_icons" do
|
90
|
+
Decidim.icons.register(name: "Decidim::Initiative", icon: "lightbulb-flash-line", description: "Initiative", category: "activity", engine: :initiatives)
|
91
|
+
Decidim.icons.register(name: "apps-line", icon: "apps-line", category: "system", description: "", engine: :initiatives)
|
92
|
+
Decidim.icons.register(name: "printer-line", icon: "printer-line", category: "system", description: "", engine: :initiatives)
|
93
|
+
Decidim.icons.register(name: "forbid-line", icon: "forbid-line", category: "system", description: "", engine: :initiatives)
|
94
|
+
end
|
95
|
+
|
68
96
|
initializer "decidim_initiatives.content_blocks" do
|
69
|
-
Decidim.
|
70
|
-
content_block.cell = "decidim/initiatives/content_blocks/highlighted_initiatives"
|
71
|
-
content_block.public_name_key = "decidim.initiatives.content_blocks.highlighted_initiatives.name"
|
72
|
-
content_block.settings_form_cell = "decidim/initiatives/content_blocks/highlighted_initiatives_settings_form"
|
73
|
-
|
74
|
-
content_block.settings do |settings|
|
75
|
-
settings.attribute :max_results, type: :integer, default: 4
|
76
|
-
settings.attribute :order, type: :string, default: "default"
|
77
|
-
end
|
78
|
-
end
|
97
|
+
Decidim::Initiatives::ContentBlocks::RegistryManager.register!
|
79
98
|
end
|
80
99
|
|
81
100
|
initializer "decidim_initiatives.add_cells_view_paths" do
|
@@ -84,14 +103,8 @@ module Decidim
|
|
84
103
|
end
|
85
104
|
|
86
105
|
initializer "decidim_initiatives.menu" do
|
87
|
-
Decidim.
|
88
|
-
|
89
|
-
I18n.t("menu.initiatives", scope: "decidim"),
|
90
|
-
decidim_initiatives.initiatives_path,
|
91
|
-
position: 2.4,
|
92
|
-
active: %r{^/(initiatives|create_initiative)},
|
93
|
-
if: !Decidim::InitiativesType.joins(:scopes).where(organization: current_organization).all.empty?
|
94
|
-
end
|
106
|
+
Decidim::Initiatives::Menu.register_menu!
|
107
|
+
Decidim::Initiatives::Menu.register_home_content_block_menu!
|
95
108
|
end
|
96
109
|
|
97
110
|
initializer "decidim_initiatives.badges" do
|
@@ -137,6 +150,15 @@ module Decidim
|
|
137
150
|
end
|
138
151
|
end
|
139
152
|
end
|
153
|
+
|
154
|
+
initializer "decidim_initiatives.authorization_transfer" do
|
155
|
+
config.to_prepare do
|
156
|
+
Decidim::AuthorizationTransfer.register(:initiatives) do |transfer|
|
157
|
+
transfer.move_records(Decidim::Initiative, :decidim_author_id)
|
158
|
+
transfer.move_records(Decidim::InitiativesVote, :decidim_author_id)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
140
162
|
end
|
141
163
|
end
|
142
164
|
end
|