decidim-proposals 0.29.3 → 0.30.0.rc1
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/proposals/highlighted_proposals_for_component/show.erb +13 -1
- data/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb +1 -1
- data/app/cells/decidim/proposals/participatory_text_proposal_cell.rb +1 -1
- data/app/cells/decidim/proposals/proposal_g/show.erb +13 -0
- data/app/cells/decidim/proposals/proposal_g_cell.rb +13 -0
- data/app/cells/decidim/proposals/proposal_history_cell.rb +107 -0
- data/app/cells/decidim/proposals/proposal_l/show.erb +37 -0
- data/app/cells/decidim/proposals/proposal_l_cell.rb +9 -0
- data/app/cells/decidim/proposals/proposal_metadata_cell.rb +2 -2
- data/app/cells/decidim/proposals/proposal_vote/show.erb +75 -0
- data/app/cells/decidim/proposals/proposal_vote_cell.rb +43 -0
- data/app/commands/decidim/proposals/accept_coauthorship.rb +62 -0
- data/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb +14 -0
- data/app/commands/decidim/proposals/admin/create_proposal.rb +6 -14
- data/app/commands/decidim/proposals/admin/create_proposal_note.rb +20 -11
- data/app/commands/decidim/proposals/admin/import_proposals.rb +60 -7
- data/app/commands/decidim/proposals/admin/merge_proposals.rb +2 -2
- data/app/commands/decidim/proposals/admin/proposal_notes_methods.rb +48 -0
- data/app/commands/decidim/proposals/admin/reply_proposal_note.rb +92 -0
- data/app/commands/decidim/proposals/admin/split_proposals.rb +2 -2
- data/app/commands/decidim/proposals/admin/update_proposal.rb +10 -16
- data/app/commands/decidim/proposals/admin/update_proposal_taxonomies.rb +34 -0
- data/app/commands/decidim/proposals/cancel_coauthorship.rb +32 -0
- data/app/commands/decidim/proposals/create_collaborative_draft.rb +1 -2
- data/app/commands/decidim/proposals/create_proposal.rb +1 -2
- data/app/commands/decidim/proposals/invite_coauthor.rb +45 -0
- data/app/commands/decidim/proposals/publish_collaborative_draft.rb +1 -2
- data/app/commands/decidim/proposals/reject_coauthorship.rb +54 -0
- data/app/commands/decidim/proposals/update_collaborative_draft.rb +1 -2
- data/app/commands/decidim/proposals/update_proposal.rb +1 -2
- data/app/controllers/concerns/decidim/proposals/admin/filterable.rb +5 -1
- data/app/controllers/concerns/decidim/proposals/admin/needs_interpolations.rb +40 -0
- data/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +46 -5
- data/app/controllers/decidim/proposals/admin/proposal_notes_controller.rb +18 -0
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +41 -85
- data/app/controllers/decidim/proposals/admin/proposals_imports_controller.rb +2 -2
- data/app/controllers/decidim/proposals/collaborative_drafts_controller.rb +2 -4
- data/app/controllers/decidim/proposals/invite_coauthors_controller.rb +87 -0
- data/app/controllers/decidim/proposals/proposals_controller.rb +7 -32
- data/app/controllers/decidim/proposals/versions_controller.rb +1 -1
- data/app/events/decidim/proposals/accepted_coauthorship_event.rb +8 -0
- data/app/events/decidim/proposals/admin/proposal_assigned_to_valuator_event.rb +27 -0
- data/app/events/decidim/proposals/admin/proposal_note_created_event.rb +5 -0
- data/app/events/decidim/proposals/coauthor_accepted_invite_event.rb +49 -0
- data/app/events/decidim/proposals/coauthor_invited_event.rb +45 -0
- data/app/events/decidim/proposals/coauthor_rejected_invite_event.rb +8 -0
- data/app/events/decidim/proposals/rejected_coauthorship_event.rb +8 -0
- data/app/events/decidim/proposals/update_proposal_taxonomies_event.rb +9 -0
- data/app/forms/decidim/proposals/admin/proposal_answer_form.rb +16 -0
- data/app/forms/decidim/proposals/admin/proposal_base_form.rb +3 -31
- data/app/forms/decidim/proposals/admin/proposal_form.rb +11 -6
- data/app/forms/decidim/proposals/admin/proposals_import_form.rb +0 -5
- data/app/forms/decidim/proposals/collaborative_draft_form.rb +0 -8
- data/app/forms/decidim/proposals/proposal_form.rb +5 -32
- data/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb +25 -0
- data/app/helpers/decidim/proposals/admin/proposals_helper.rb +0 -1
- data/app/helpers/decidim/proposals/application_helper.rb +23 -15
- data/app/helpers/decidim/proposals/collaborative_draft_helper.rb +7 -7
- data/app/helpers/decidim/proposals/map_helper.rb +0 -18
- data/app/helpers/decidim/proposals/proposal_votes_helper.rb +15 -2
- data/app/helpers/decidim/proposals/proposals_helper.rb +3 -1
- data/app/jobs/decidim/proposals/admin/proposal_answer_job.rb +20 -0
- data/app/models/decidim/proposals/collaborative_draft.rb +13 -3
- data/app/models/decidim/proposals/proposal.rb +71 -5
- data/app/models/decidim/proposals/proposal_note.rb +11 -0
- data/app/models/decidim/proposals/proposal_state.rb +1 -1
- data/app/packs/entrypoints/decidim_proposals.js +1 -0
- data/app/packs/entrypoints/decidim_proposals_geocoding.js +2 -0
- data/app/packs/src/decidim/proposals/admin/proposals.js +16 -1
- data/app/packs/src/decidim/proposals/exit_handler.js +73 -0
- data/app/packs/stylesheets/decidim/proposals/proposals.scss +248 -3
- data/app/permissions/decidim/proposals/admin/permissions.rb +2 -5
- data/app/permissions/decidim/proposals/permissions.rb +42 -0
- data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +1 -1
- data/app/presenters/decidim/proposals/proposal_presenter.rb +1 -1
- data/app/queries/decidim/proposals/filtered_proposals.rb +2 -2
- data/app/queries/decidim/proposals/metrics/accepted_proposals_metric_manage.rb +2 -2
- data/app/queries/decidim/proposals/metrics/endorsements_metric_manage.rb +10 -10
- data/app/queries/decidim/proposals/metrics/proposal_followers_metric_measure.rb +4 -4
- data/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb +6 -6
- data/app/queries/decidim/proposals/metrics/proposals_metric_manage.rb +6 -6
- data/app/queries/decidim/proposals/metrics/votes_metric_manage.rb +6 -6
- data/app/services/decidim/proposals/proposal_builder.rb +1 -2
- data/app/views/decidim/proposals/admin/proposal_notes/_form.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposal_notes/_proposal_note.html.erb +28 -0
- data/app/views/decidim/proposals/admin/proposal_notes/_proposal_note_reply.html.erb +9 -0
- data/app/views/decidim/proposals/admin/proposal_notes/_proposal_notes.html.erb +4 -28
- data/app/views/decidim/proposals/admin/proposal_states/_form.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/_actions.html.erb +21 -0
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +3 -2
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +17 -24
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +12 -28
- data/app/views/decidim/proposals/admin/proposals/_proposals-thead.html.erb +45 -0
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_apply_answer_template.html.erb +22 -0
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb +15 -11
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_taxonomy_change.html.erb +23 -0
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +17 -48
- data/app/views/decidim/proposals/admin/proposals/manage_trash.html.erb +18 -0
- data/app/views/decidim/proposals/admin/proposals/publish_answers.js.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/show.html.erb +14 -26
- data/app/views/decidim/proposals/admin/proposals/update_attribute.js.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals_imports/new.html.erb +0 -3
- data/app/views/decidim/proposals/collaborative_drafts/_collaborative_actions.html.erb +9 -0
- data/app/views/decidim/proposals/collaborative_drafts/_collaborative_draft_aside.html.erb +0 -15
- data/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb +4 -6
- data/app/views/decidim/proposals/collaborative_drafts/index.html.erb +6 -2
- data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +27 -11
- data/app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb +29 -9
- data/app/views/decidim/proposals/proposals/_actions.html.erb +4 -7
- data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +17 -22
- data/app/views/decidim/proposals/proposals/_exit_modal.html.erb +17 -0
- data/app/views/decidim/proposals/proposals/_notification_alert_box.html.erb +1 -0
- data/app/views/decidim/proposals/proposals/_proposal_actions.html.erb +19 -0
- data/app/views/decidim/proposals/proposals/_proposal_aside.html.erb +9 -32
- data/app/views/decidim/proposals/proposals/_proposal_voting_rules.html.erb +33 -0
- data/app/views/decidim/proposals/proposals/_proposals.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_remaining_votes_count.html.erb +2 -2
- data/app/views/decidim/proposals/proposals/_remaining_votes_notification.html.erb +12 -0
- data/app/views/decidim/proposals/proposals/_update_proposal_voting_rules.html.erb +6 -0
- data/app/views/decidim/proposals/proposals/_vote_button.html.erb +12 -8
- data/app/views/decidim/proposals/proposals/_votes_count.html.erb +2 -1
- data/app/views/decidim/proposals/proposals/_voting_rules.html.erb +1 -7
- data/app/views/decidim/proposals/proposals/index.html.erb +3 -18
- data/app/views/decidim/proposals/proposals/index.js.erb +1 -1
- data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb +3 -1
- data/app/views/decidim/proposals/proposals/show.html.erb +35 -15
- data/config/locales/ar.yml +15 -73
- data/config/locales/bg.yml +12 -89
- data/config/locales/bs-BA.yml +2 -13
- data/config/locales/ca.yml +209 -84
- data/config/locales/cs.yml +210 -81
- data/config/locales/de.yml +213 -89
- data/config/locales/el.yml +12 -84
- data/config/locales/en.yml +206 -81
- data/config/locales/es-MX.yml +213 -88
- data/config/locales/es-PY.yml +213 -88
- data/config/locales/es.yml +214 -89
- data/config/locales/eu.yml +288 -164
- data/config/locales/fi-plain.yml +213 -87
- data/config/locales/fi.yml +213 -87
- data/config/locales/fr-CA.yml +116 -97
- data/config/locales/fr.yml +116 -97
- data/config/locales/ga-IE.yml +1 -21
- data/config/locales/gl.yml +8 -45
- data/config/locales/hu.yml +12 -68
- data/config/locales/id-ID.yml +9 -43
- data/config/locales/is-IS.yml +0 -19
- data/config/locales/it.yml +11 -77
- data/config/locales/ja.yml +165 -106
- data/config/locales/lt.yml +13 -85
- data/config/locales/lv.yml +10 -52
- data/config/locales/nl.yml +10 -59
- data/config/locales/no.yml +10 -44
- data/config/locales/pl.yml +11 -88
- data/config/locales/pt-BR.yml +9 -74
- data/config/locales/pt.yml +10 -56
- data/config/locales/ro-RO.yml +12 -72
- data/config/locales/ru.yml +0 -23
- data/config/locales/sk.yml +10 -52
- data/config/locales/sr-CS.yml +2 -14
- data/config/locales/sv.yml +127 -86
- data/config/locales/tr-TR.yml +10 -53
- data/config/locales/uk.yml +0 -23
- data/config/locales/zh-CN.yml +10 -53
- data/config/locales/zh-TW.yml +12 -86
- data/db/migrate/20171220084719_add_published_at_to_proposals.rb +1 -1
- data/db/migrate/20181016132225_add_organization_as_author.rb +1 -1
- data/db/migrate/20200120215928_move_proposal_endorsements_to_core_endorsements.rb +1 -1
- data/db/migrate/20200827154156_add_commentable_counter_cache_to_proposals.rb +3 -3
- data/db/migrate/20210310102839_add_followable_counter_cache_to_proposals.rb +1 -1
- data/db/migrate/20240110203504_create_default_proposal_states.rb +1 -1
- data/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb +1 -1
- data/db/migrate/20240617091140_add_email_on_assigned_proposals_to_users.rb +7 -0
- data/db/migrate/20240617170052_add_parent_relation_to_decidim_proposal_notes.rb +7 -0
- data/db/migrate/20240828103755_add_deleted_at_to_decidim_proposals_proposals.rb +8 -0
- data/decidim-proposals.gemspec +1 -1
- data/lib/decidim/api/functions/proposal_finder_helper.rb +12 -0
- data/lib/decidim/api/functions/proposal_list_helper.rb +12 -0
- data/lib/decidim/api/proposal_type.rb +17 -25
- data/lib/decidim/api/proposals_type.rb +4 -19
- data/lib/decidim/proposals/admin_engine.rb +12 -3
- data/lib/decidim/proposals/admin_filter.rb +3 -6
- data/lib/decidim/proposals/component.rb +4 -5
- data/lib/decidim/proposals/download_your_data_proposal_serializer.rb +15 -0
- data/lib/decidim/proposals/engine.rb +5 -0
- data/lib/decidim/proposals/import/proposal_creator.rb +4 -4
- data/lib/decidim/proposals/proposal_serializer.rb +12 -29
- data/lib/decidim/proposals/seeds.rb +21 -17
- data/lib/decidim/proposals/test/factories.rb +2 -1
- data/lib/decidim/proposals/version.rb +1 -1
- data/lib/decidim/proposals.rb +4 -0
- data/lib/tasks/proposals/upgrade/decidim_proposals_upgrade_tasks.rake +0 -22
- metadata +65 -34
- data/app/commands/decidim/proposals/admin/update_proposal_category.rb +0 -70
- data/app/commands/decidim/proposals/admin/update_proposal_scope.rb +0 -75
- data/app/events/decidim/proposals/admin/update_proposal_category_event.rb +0 -11
- data/app/events/decidim/proposals/admin/update_proposal_scope_event.rb +0 -11
- data/app/jobs/decidim/proposals/admin/import_proposals_job.rb +0 -91
- data/app/mailers/decidim/proposals/admin/import_proposals_mailer.rb +0 -30
- data/app/views/decidim/proposals/admin/import_proposals_mailer/notify_failure.html.erb +0 -1
- data/app/views/decidim/proposals/admin/import_proposals_mailer/notify_success.html.erb +0 -2
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_recategorize.html.erb +0 -15
- data/app/views/decidim/proposals/admin/proposals/bulk_actions/_scope-change.html.erb +0 -21
- data/app/views/decidim/proposals/collaborative_drafts/_actions.html.erb +0 -7
- data/config/locales/ca-IT.yml +0 -945
data/config/locales/zh-TW.yml
CHANGED
@@ -5,7 +5,6 @@ zh-TW:
|
|
5
5
|
collaborative_draft:
|
6
6
|
address: 地址
|
7
7
|
body: 內容
|
8
|
-
category_id: 類別
|
9
8
|
decidim_scope_id: 範圍
|
10
9
|
has_address: 有地址
|
11
10
|
scope_id: 範圍
|
@@ -18,7 +17,6 @@ zh-TW:
|
|
18
17
|
answered_at: 回答
|
19
18
|
automatic_hashtags: 已自動添加標籤
|
20
19
|
body: 內容
|
21
|
-
category_id: 類別
|
22
20
|
decidim_scope_id: 範圍
|
23
21
|
has_address: 有地址
|
24
22
|
scope_id: 範圍
|
@@ -67,8 +65,6 @@ zh-TW:
|
|
67
65
|
base:
|
68
66
|
not_official: 非正式
|
69
67
|
models:
|
70
|
-
decidim/proposals/admin/update_proposal_category_event: 提案類別已更改
|
71
|
-
decidim/proposals/admin/update_proposal_scope_event: 提案範圍已更改
|
72
68
|
decidim/proposals/creation_enabled_event: 建立提案已啟用
|
73
69
|
decidim/proposals/endorsing_enabled_event: 提案連署功能已啟用
|
74
70
|
decidim/proposals/proposal_mentioned_event: 提案已被提及
|
@@ -86,15 +82,11 @@ zh-TW:
|
|
86
82
|
admin:
|
87
83
|
filters:
|
88
84
|
proposals:
|
89
|
-
category_id_eq:
|
90
|
-
label: 類別
|
91
85
|
is_emendation_true:
|
92
86
|
label: 類別
|
93
87
|
values:
|
94
88
|
'false': 提案
|
95
89
|
'true': 修正案
|
96
|
-
scope_id_eq:
|
97
|
-
label: 範圍
|
98
90
|
state_eq:
|
99
91
|
label: 狀態
|
100
92
|
values:
|
@@ -113,7 +105,6 @@ zh-TW:
|
|
113
105
|
actions:
|
114
106
|
amend: 修訂
|
115
107
|
comment: 評論
|
116
|
-
create: 建立
|
117
108
|
endorse: 連署
|
118
109
|
vote_comment: 投票評論
|
119
110
|
withdraw: 撤回
|
@@ -136,7 +127,6 @@ zh-TW:
|
|
136
127
|
random: 隨機
|
137
128
|
recent: 最近
|
138
129
|
with_more_authors: 有更多作者
|
139
|
-
geocoding_enabled: 地理編碼已啟用
|
140
130
|
new_proposal_body_template: 新提案正文樣板
|
141
131
|
new_proposal_body_template_help: 您可以定義新提案預先填寫的文字
|
142
132
|
new_proposal_help_text: 新提案幫助文本
|
@@ -144,7 +134,6 @@ zh-TW:
|
|
144
134
|
participatory_texts_enabled: 參與式文字已啟用
|
145
135
|
participatory_texts_enabled_readonly: 如果已經存在提案,則無法與此設置互動。如果您想要啟用此功能,請創建一個新的“提案組件”,或者如果要禁用此功能,請在“參與式文字”選單中放棄所有已匯入的提案。
|
146
136
|
proposal_answering_enabled: 提案回答已啟用
|
147
|
-
proposal_edit_before_minutes: 在幾分鐘後,作者可以編輯提案
|
148
137
|
proposal_edit_time: 編輯提案
|
149
138
|
proposal_edit_time_choices:
|
150
139
|
infinite: 允許無限時間編輯提案
|
@@ -153,8 +142,6 @@ zh-TW:
|
|
153
142
|
proposal_limit: 參與者可提出提案的上限
|
154
143
|
proposal_wizard_step_1_help_text: 提案向導「創建」步驟說明文字
|
155
144
|
resources_permissions_enabled: 每個提案都可以設定行動權限
|
156
|
-
scope_id: 範圍
|
157
|
-
scopes_enabled: 啟用範圍
|
158
145
|
threshold_per_proposal: 每個提案的門檻
|
159
146
|
step:
|
160
147
|
amendment_creation_enabled: 創建修正案已啟用
|
@@ -192,10 +179,8 @@ zh-TW:
|
|
192
179
|
proposals:
|
193
180
|
admin:
|
194
181
|
proposal_note_created:
|
195
|
-
email_intro: 有人在提案「%{resource_title}」上留了一則留言。在<a href="%{admin_proposal_info_url}">管理員面板</a>檢查它。
|
196
182
|
email_outro: 您收到此通知,因為您可以對提案進行評估。
|
197
183
|
email_subject: 有人在提案 %{resource_title} 上留下了一則註記。
|
198
|
-
notification_title: 有人在提案「<a href="%{resource_path}">%{resource_title}</a>」上留了一則留言。請至<a href="%{admin_proposal_info_path}">管理面板</a>查看。
|
199
184
|
collaborative_draft_access_accepted:
|
200
185
|
email_intro: '%{requester_name} 已經被接受成為 <a href="%{resource_url}">%{resource_title}</a> 協作草稿的貢獻者。'
|
201
186
|
email_outro: 您收到此通知,是因為您是 <a href="%{resource_url}">%{resource_title}</a> 的協作者。
|
@@ -252,22 +237,14 @@ zh-TW:
|
|
252
237
|
email_subject: 新增提案「%{resource_title}」至「%{participatory_space_title}」。
|
253
238
|
notification_title: '%{author} 將提案<a href="%{resource_path}">%{resource_title}</a>新增至%{participatory_space_title}.'
|
254
239
|
notification_title_official: 官方提案 <a href="%{resource_path}">%{resource_title}</a> 已經被添加到 %{participatory_space_title}.
|
255
|
-
proposal_update_category:
|
256
|
-
email_intro: '管理員已更新您的提案 "%{resource_title}" 的分類,請前往此頁面查看:'
|
257
|
-
email_subject: '「%{resource_title}」提案的分類已更新'
|
258
|
-
notification_title: <a href="%{resource_path}">%{resource_title}</a> 提案類別已由管理員更新。
|
259
|
-
proposal_update_scope:
|
260
|
-
email_intro: '一位管理員已更新您的提案"%{resource_title}" 的範圍,您可以在此頁面檢查:'
|
261
|
-
email_subject: '%{resource_title} 提案範圍已更新'
|
262
|
-
notification_title: <a href="%{resource_path}">%{resource_title}</a> 提案範圍已由管理員更新。
|
263
240
|
voting_enabled:
|
264
241
|
email_outro: 你收到此通知是因為你正在追蹤 %{participatory_space_title}。你可以透過前面的連結停止接收通知。
|
265
242
|
gamification:
|
266
243
|
badges:
|
267
244
|
accepted_proposals:
|
268
245
|
conditions:
|
269
|
-
|
270
|
-
|
246
|
+
- 選擇您有興趣的參與空間並啟用提交提案功能
|
247
|
+
- 嘗試提出可以實現的提案,這樣它們更有可能被接受。
|
271
248
|
description: 這個徽章是當你積極參與提出新的提案並且這些提案被接受時授予的。
|
272
249
|
description_another: 這個參與者有 %{score} 個被接受的提案。
|
273
250
|
description_own: 您有 %{score} 個提案被接受。
|
@@ -277,12 +254,12 @@ zh-TW:
|
|
277
254
|
unearned_own: 你尚未有任何提案被接受。
|
278
255
|
proposal_votes:
|
279
256
|
conditions:
|
280
|
-
|
281
|
-
|
257
|
+
- 瀏覽並花些時間閱讀其他人的提案
|
258
|
+
-
|
282
259
|
proposals:
|
283
260
|
conditions:
|
284
|
-
|
285
|
-
|
261
|
+
- 選擇您有興趣的參與空間並啟用提交提案功能
|
262
|
+
- 提出新的提案
|
286
263
|
description: 當您積極參與新提案時,將獲得此徽章。
|
287
264
|
description_another: 這個參與者已經創建了 %{score} 個提案。
|
288
265
|
description_own: 您已經建立了 %{score} 個提案。
|
@@ -303,8 +280,6 @@ zh-TW:
|
|
303
280
|
description: 提案總數
|
304
281
|
object: 提案
|
305
282
|
title: 提案
|
306
|
-
votes:
|
307
|
-
title: 投票
|
308
283
|
participatory_spaces:
|
309
284
|
highlighted_proposals:
|
310
285
|
see_all: 檢視所有提案
|
@@ -324,24 +299,6 @@ zh-TW:
|
|
324
299
|
proposal_comments: 評論
|
325
300
|
proposals: 提案
|
326
301
|
imports:
|
327
|
-
help:
|
328
|
-
answers: |
|
329
|
-
匯入文件如果是 CSV 或 Excel 檔案,應包含以下列名,如果是 JSON 檔案,則應包含以下名稱:
|
330
|
-
|
331
|
-
<ul>
|
332
|
-
<li><b>id:</b>要回答的提案的 ID</li>
|
333
|
-
<li><b>state:</b>狀態之一,可以是 "接受"、"評估中" 或 "拒絕"</li>
|
334
|
-
<li><b>answer/en:</b>英文語言的答案。這將取決於您平台的語言設置。</li>
|
335
|
-
</ul>
|
336
|
-
proposals: |
|
337
|
-
在 CSV 或 Excel 文件的情況下,或在 JSON 文件的情況下,文件必須具有以下列名稱:
|
338
|
-
|
339
|
-
<ul>
|
340
|
-
<li><b>title/en:</b>英文標題,這取決於您平台的語言配置。</li>
|
341
|
-
<li><b>body/en:</b>英文正文,這取決於您平台的語言配置。</li>
|
342
|
-
<li><b>scope/id:</b>範圍的 ID。</li>
|
343
|
-
<li><b>category/id:</b>類別的 ID。</li>
|
344
|
-
</ul>
|
345
302
|
label:
|
346
303
|
answers: 從檔案匯入回覆
|
347
304
|
proposals: 從檔案匯入提案
|
@@ -396,30 +353,23 @@ zh-TW:
|
|
396
353
|
form:
|
397
354
|
note: 附註
|
398
355
|
submit: 提交
|
399
|
-
leave_your_note: 留下您的註記
|
400
356
|
title: 私有注解
|
401
357
|
proposals:
|
402
358
|
answer:
|
403
|
-
invalid: 回答這個提案時出現了問題.
|
404
359
|
success: 提案回覆成功.
|
405
360
|
create:
|
406
|
-
invalid: 創建提案時發生問題.
|
407
361
|
success: 提案已成功建立.
|
408
362
|
edit:
|
409
363
|
title: 更新提案
|
410
364
|
update: 更新
|
411
365
|
form:
|
412
|
-
attachment_legend: "(可選) 新增附件"
|
413
366
|
created_in_meeting: 這個提案來自會議
|
414
|
-
delete_attachment: 刪除附件
|
415
|
-
select_a_category: 選擇一個類別
|
416
367
|
select_a_meeting: 選擇一個會議
|
417
368
|
index:
|
418
369
|
actions: 操作
|
419
370
|
assign_to_valuator: 分配給評估人員
|
371
|
+
assign_to_valuator_button: 指派
|
420
372
|
cancel: 取消
|
421
|
-
change_category: 變更類別
|
422
|
-
change_scope: 變更範圍
|
423
373
|
merge: 合併為新提案
|
424
374
|
merge_button: 合併
|
425
375
|
publish: 發布
|
@@ -430,8 +380,8 @@ zh-TW:
|
|
430
380
|
split_button: 拆分
|
431
381
|
title: 提案
|
432
382
|
unassign_from_valuator: 取消分派給評估者
|
383
|
+
unassign_from_valuator_button: 取消分配
|
433
384
|
update: 更新
|
434
|
-
update_scope_button: 更新範圍
|
435
385
|
new:
|
436
386
|
create: 建立
|
437
387
|
title: 建立提案
|
@@ -453,19 +403,10 @@ zh-TW:
|
|
453
403
|
remove_assignment: 移除指派
|
454
404
|
remove_assignment_confirmation: 您確定要將評估者從此提案中移除嗎?
|
455
405
|
valuators: 評估者
|
456
|
-
update_category:
|
457
|
-
invalid: '這些提案已經擁有 %{subject_name} 類別: %{proposals}。'
|
458
|
-
select_a_category: 請選擇一個類別。
|
459
|
-
select_a_proposal: 請選擇一個提案。
|
460
|
-
success: '已成功將以下提案更新至 %{subject_name} 類別: %{proposals}。'
|
461
|
-
update_scope:
|
462
|
-
invalid: '這些提案已經有了 %{subject_name} 的範圍: %{proposals}。'
|
463
|
-
select_a_proposal: 請選擇一個提案。
|
464
|
-
select_a_scope: 請選擇一個範圍。
|
465
|
-
success: '成功將提案更新到 %{subject_name} 的範圍內: %{proposals}。'
|
466
406
|
proposals_imports:
|
467
407
|
create:
|
468
408
|
invalid: 匯入提案時發生問題.
|
409
|
+
success: "%{number} 個提案成功匯入."
|
469
410
|
new:
|
470
411
|
create: 匯入提案
|
471
412
|
no_components: 這個參與空間中沒有其他的提案元件可以匯入提案。
|
@@ -473,18 +414,14 @@ zh-TW:
|
|
473
414
|
select_states: 檢查要匯入的提案狀態。
|
474
415
|
proposals_merges:
|
475
416
|
create:
|
476
|
-
invalid: '由於其中一些提案存在問題,因此無法合併所選提案:'
|
477
417
|
success: 已成功合併提案成為新的提案。
|
478
418
|
proposals_splits:
|
479
419
|
create:
|
480
|
-
invalid: '由於其中一些提案存在問題,因此無法分割所選提案:'
|
481
420
|
success: 成功將提案拆分為新的提案。
|
482
421
|
valuation_assignments:
|
483
422
|
create:
|
484
|
-
invalid: 有一個錯誤在指定提案給評估者。
|
485
423
|
success: 提案已成功分配給評估人員.
|
486
424
|
delete:
|
487
|
-
invalid: 取消指派建議書給評估人員時發生錯誤.
|
488
425
|
success: 評估員已成功取消分配提案.
|
489
426
|
admin_log:
|
490
427
|
proposal:
|
@@ -539,19 +476,15 @@ zh-TW:
|
|
539
476
|
error: 建立協作草稿時發生問題。
|
540
477
|
success: 協作草稿建立成功。
|
541
478
|
edit:
|
542
|
-
attachment_legend: "(可選) 新增附件"
|
543
479
|
back: 返回
|
544
|
-
select_a_category: 請選擇一個類別
|
545
480
|
send: 發送
|
546
481
|
title: 編輯協作草稿
|
547
482
|
filters:
|
548
483
|
all: 全部
|
549
484
|
amendment: 修正案
|
550
|
-
category: 類別
|
551
485
|
open: 開啟
|
552
486
|
published: 已發佈
|
553
487
|
related_to: 相關於
|
554
|
-
scope: 範圍
|
555
488
|
search: 搜尋
|
556
489
|
state: 狀態
|
557
490
|
withdrawn: 已撤回
|
@@ -589,7 +522,6 @@ zh-TW:
|
|
589
522
|
error: 無法拒絕作為合作者,請稍後再試。
|
590
523
|
success: "@%{user} 已被成功拒絕成為協作者。"
|
591
524
|
show:
|
592
|
-
edit: 編輯協作草稿
|
593
525
|
final_proposal: 最終提案
|
594
526
|
final_proposal_help_text: 此草案已完成。請查看最終提案。
|
595
527
|
hidden_authors_count:
|
@@ -624,14 +556,12 @@ zh-TW:
|
|
624
556
|
models:
|
625
557
|
proposal:
|
626
558
|
fields:
|
627
|
-
category: 類別
|
628
559
|
comments: 評論
|
629
560
|
id: ID
|
630
561
|
notes: 備註
|
631
562
|
official_proposal: 正式提案
|
632
563
|
published_answer: 已發布的回答
|
633
564
|
published_at: 發佈於
|
634
|
-
scope: 範圍
|
635
565
|
state: 狀態
|
636
566
|
title: 標題
|
637
567
|
valuator: 評估者
|
@@ -649,11 +579,7 @@ zh-TW:
|
|
649
579
|
description: 當點擊“預覽”按鈕時,座標將會更新,但地址不會更改。
|
650
580
|
instructions: 您可以在地圖上移動點。
|
651
581
|
edit:
|
652
|
-
add_documents: 新增文件
|
653
|
-
attachment_legend: "(可選) 新增附件"
|
654
582
|
back: 返回
|
655
|
-
edit_documents: 編輯文件
|
656
|
-
select_a_category: 請選擇一個類別
|
657
583
|
send: 發送
|
658
584
|
title: 編輯提案
|
659
585
|
edit_draft:
|
@@ -664,7 +590,6 @@ zh-TW:
|
|
664
590
|
activity: 我的活動
|
665
591
|
all: 全部
|
666
592
|
amendment_type: 類別
|
667
|
-
category: 分類
|
668
593
|
my_proposals: 我的提案
|
669
594
|
origin: 起源
|
670
595
|
related_to: 相關於
|
@@ -683,6 +608,7 @@ zh-TW:
|
|
683
608
|
text_banner: 您正在查看由其作者撤回的提案列表。%{go_back_link}。
|
684
609
|
new:
|
685
610
|
send: 繼續
|
611
|
+
title: 創建你的提案
|
686
612
|
orders:
|
687
613
|
label: '依順序排序提案:'
|
688
614
|
most_commented: 最多評論
|
@@ -707,7 +633,6 @@ zh-TW:
|
|
707
633
|
show:
|
708
634
|
answer: 回答
|
709
635
|
changes_at_title: 修正案 "%{title}"
|
710
|
-
edit_proposal: 編輯提案
|
711
636
|
estimated_cost: 預估成本
|
712
637
|
hidden_endorsers_count:
|
713
638
|
other: "one\n以及其他 %{count} 個人\n\nOther\n以及其他 %{count} 個人"
|
@@ -721,12 +646,13 @@ zh-TW:
|
|
721
646
|
proposal_in_evaluation_reason: 這個提案正在被評估中
|
722
647
|
proposal_rejected_reason: '這個提案被拒絕了,因為:'
|
723
648
|
withdraw_confirmation_html: 您確定要撤回此提案嗎?<br><br><strong>此操作無法取消!</strong>
|
724
|
-
withdraw_proposal: 撤回提案
|
725
649
|
update:
|
726
650
|
title: 更新提案
|
727
651
|
voting_rules:
|
728
652
|
proposal_limit:
|
729
653
|
description: 您最多可以創建 %{limit} 個提案。
|
654
|
+
vote_limit:
|
655
|
+
description: 您最多可以支持 %{limit} 個提案。
|
730
656
|
wizard_aside:
|
731
657
|
back: 返回
|
732
658
|
back_from_step_1: 返回提案
|
@@ -4,7 +4,7 @@ class AddPublishedAtToProposals < ActiveRecord::Migration[5.1]
|
|
4
4
|
def up
|
5
5
|
add_column :decidim_proposals_proposals, :published_at, :datetime, index: true
|
6
6
|
# rubocop:disable Rails/SkipsModelValidations
|
7
|
-
Decidim::Proposals::Proposal.update_all("published_at = updated_at")
|
7
|
+
Decidim::Proposals::Proposal.unscoped.update_all("published_at = updated_at")
|
8
8
|
# rubocop:enable Rails/SkipsModelValidations
|
9
9
|
end
|
10
10
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
class AddOrganizationAsAuthor < ActiveRecord::Migration[5.2]
|
4
4
|
def change
|
5
|
-
official_proposals = Decidim::Proposals::Proposal.find_each.select do |proposal|
|
5
|
+
official_proposals = Decidim::Proposals::Proposal.unscoped.find_each.select do |proposal|
|
6
6
|
proposal.coauthorships.count.zero?
|
7
7
|
end
|
8
8
|
|
@@ -26,7 +26,7 @@ class MoveProposalEndorsementsToCoreEndorsements < ActiveRecord::Migration[5.2]
|
|
26
26
|
)
|
27
27
|
end
|
28
28
|
# update new `decidim_proposals_proposal.endorsements_count` counter cache
|
29
|
-
Decidim::Proposals::Proposal.select(:id).all.find_each do |proposal|
|
29
|
+
Decidim::Proposals::Proposal.unscoped.select(:id).all.find_each do |proposal|
|
30
30
|
Decidim::Proposals::Proposal.reset_counters(proposal.id, :endorsements)
|
31
31
|
end
|
32
32
|
end
|
@@ -5,8 +5,8 @@ class AddCommentableCounterCacheToProposals < ActiveRecord::Migration[5.2]
|
|
5
5
|
add_column :decidim_proposals_proposals, :comments_count, :integer, null: false, default: 0, index: true
|
6
6
|
add_column :decidim_proposals_collaborative_drafts, :comments_count, :integer, null: false, default: 0, index: true
|
7
7
|
Decidim::Proposals::Proposal.reset_column_information
|
8
|
-
Decidim::Proposals::Proposal.find_each(&:update_comments_count)
|
9
|
-
Decidim::Proposals::CollaborativeDraft.reset_column_information
|
10
|
-
Decidim::Proposals::CollaborativeDraft.find_each(&:update_comments_count)
|
8
|
+
Decidim::Proposals::Proposal.unscoped.find_each(&:update_comments_count)
|
9
|
+
Decidim::Proposals::CollaborativeDraft.unscoped.reset_column_information
|
10
|
+
Decidim::Proposals::CollaborativeDraft.unscoped.find_each(&:update_comments_count)
|
11
11
|
end
|
12
12
|
end
|
@@ -7,7 +7,7 @@ class AddFollowableCounterCacheToProposals < ActiveRecord::Migration[5.2]
|
|
7
7
|
reversible do |dir|
|
8
8
|
dir.up do
|
9
9
|
Decidim::Proposals::Proposal.reset_column_information
|
10
|
-
Decidim::Proposals::Proposal.find_each do |record|
|
10
|
+
Decidim::Proposals::Proposal.unscoped.find_each do |record|
|
11
11
|
record.class.reset_counters(record.id, :follows)
|
12
12
|
end
|
13
13
|
end
|
@@ -16,7 +16,7 @@ class CreateDefaultProposalStates < ActiveRecord::Migration[6.1]
|
|
16
16
|
def up
|
17
17
|
CustomProposal.reset_column_information
|
18
18
|
Decidim::Proposals::ProposalState.reset_column_information
|
19
|
-
Decidim::Component.where(manifest_name: "proposals").find_each do |component|
|
19
|
+
Decidim::Component.unscoped.where(manifest_name: "proposals").find_each do |component|
|
20
20
|
admin_user = component.organization.admins.first
|
21
21
|
default_states = Decidim::Proposals.create_default_states!(component, admin_user)
|
22
22
|
|
data/db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
CHANGED
@@ -7,7 +7,7 @@ class AddValuationAssignmentsCountToDecidimProposalsProposals < ActiveRecord::Mi
|
|
7
7
|
reversible do |dir|
|
8
8
|
dir.up do
|
9
9
|
Decidim::Proposals::Proposal.reset_column_information
|
10
|
-
Decidim::Proposals::Proposal.find_each do |record|
|
10
|
+
Decidim::Proposals::Proposal.unscoped.find_each do |record|
|
11
11
|
Decidim::Proposals::Proposal.reset_counters(record.id, :valuation_assignments)
|
12
12
|
end
|
13
13
|
end
|
data/decidim-proposals.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
"homepage_uri" => "https://decidim.org",
|
20
20
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
21
21
|
}
|
22
|
-
s.required_ruby_version = "~> 3.
|
22
|
+
s.required_ruby_version = "~> 3.3.0"
|
23
23
|
|
24
24
|
s.name = "decidim-proposals"
|
25
25
|
s.summary = "Decidim proposals module"
|
@@ -7,8 +7,7 @@ module Decidim
|
|
7
7
|
|
8
8
|
implements Decidim::Comments::CommentableInterface
|
9
9
|
implements Decidim::Core::CoauthorableInterface
|
10
|
-
implements Decidim::Core::
|
11
|
-
implements Decidim::Core::ScopableInterface
|
10
|
+
implements Decidim::Core::TaxonomizableInterface
|
12
11
|
implements Decidim::Core::AttachableInterface
|
13
12
|
implements Decidim::Core::FingerprintInterface
|
14
13
|
implements Decidim::Core::AmendableInterface
|
@@ -17,40 +16,33 @@ module Decidim
|
|
17
16
|
implements Decidim::Core::EndorsableInterface
|
18
17
|
implements Decidim::Core::TimestampsInterface
|
19
18
|
|
20
|
-
field :id, GraphQL::Types::ID, null: false
|
21
|
-
field :title, Decidim::Core::TranslatedFieldType, "The title for this title", null: true
|
22
|
-
field :body, Decidim::Core::TranslatedFieldType, "The description for this body", null: true
|
23
19
|
field :address, GraphQL::Types::String, "The physical address (location) of this proposal", null: true
|
24
|
-
field :coordinates, Decidim::Core::CoordinatesType, "Physical coordinates for this proposal", null: true
|
25
|
-
|
26
|
-
def coordinates
|
27
|
-
[object.latitude, object.longitude]
|
28
|
-
end
|
29
|
-
|
30
|
-
field :reference, GraphQL::Types::String, "This proposal's unique reference", null: true
|
31
|
-
field :state, GraphQL::Types::String, "The answer status in which proposal is in", null: true
|
32
20
|
field :answer, Decidim::Core::TranslatedFieldType, "The answer feedback for the status for this proposal", null: true
|
33
|
-
|
34
21
|
field :answered_at, Decidim::Core::DateTimeType, description: "The date and time this proposal was answered", null: true
|
35
|
-
|
36
|
-
field :
|
37
|
-
|
38
|
-
field :participatory_text_level, GraphQL::Types::String, description: "If it is a participatory text, the level indicates the type of paragraph", null: true
|
39
|
-
field :position, GraphQL::Types::Int, "Position of this proposal in the participatory text", null: true
|
40
|
-
|
41
|
-
field :official, GraphQL::Types::Boolean, "Whether this proposal is official or not", method: :official?, null: true
|
22
|
+
field :body, Decidim::Core::TranslatedFieldType, "The description for this body", null: true
|
23
|
+
field :coordinates, Decidim::Core::CoordinatesType, "Physical coordinates for this proposal", null: true
|
42
24
|
field :created_in_meeting, GraphQL::Types::Boolean, "Whether this proposal comes from a meeting or not", method: :official_meeting?, null: true
|
25
|
+
field :id, GraphQL::Types::ID, "The id of the Proposal", null: false
|
43
26
|
field :meeting, Decidim::Meetings::MeetingType, description: "If the proposal comes from a meeting, the related meeting", null: true
|
44
|
-
|
45
|
-
field :
|
27
|
+
field :official, GraphQL::Types::Boolean, "Whether this proposal is official or not", method: :official?, null: true
|
28
|
+
field :participatory_text_level, GraphQL::Types::String, description: "If it is a participatory text, the level indicates the type of paragraph", null: true
|
29
|
+
field :position, GraphQL::Types::Int, "Position of this proposal in the participatory text", null: true
|
30
|
+
field :published_at, Decidim::Core::DateTimeType, description: "The date and time this proposal was published", null: true
|
31
|
+
field :reference, GraphQL::Types::String, "This proposal's unique reference", null: true
|
32
|
+
field :state, GraphQL::Types::String, "The answer status in which proposal is in", null: true
|
33
|
+
field :title, Decidim::Core::TranslatedFieldType, "The title for this title", null: true
|
34
|
+
field :vote_count, GraphQL::Types::Int, description: "The total amount of votes the proposal has received", null: true
|
46
35
|
field :withdrawn, GraphQL::Types::Boolean, "Whether this proposal has been withdrawn or not", method: :withdrawn?, null: true
|
36
|
+
field :withdrawn_at, Decidim::Core::DateTimeType, description: "The date and time this proposal was withdrawn", null: true
|
37
|
+
|
38
|
+
def coordinates
|
39
|
+
[object.latitude, object.longitude]
|
40
|
+
end
|
47
41
|
|
48
42
|
def meeting
|
49
43
|
object.authors.first if object.official_meeting?
|
50
44
|
end
|
51
45
|
|
52
|
-
field :vote_count, GraphQL::Types::Int, description: "The total amount of votes the proposal has received", null: true
|
53
|
-
|
54
46
|
def vote_count
|
55
47
|
current_component = object.component
|
56
48
|
object.proposal_votes_count unless current_component.current_settings.votes_hidden?
|
@@ -2,32 +2,17 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Proposals
|
5
|
-
class ProposalListHelper < Decidim::Core::ComponentListBase
|
6
|
-
# only querying published posts
|
7
|
-
def query_scope
|
8
|
-
super.published
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
class ProposalFinderHelper < Decidim::Core::ComponentFinderBase
|
13
|
-
# only querying published posts
|
14
|
-
def query_scope
|
15
|
-
super.published
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
5
|
class ProposalsType < Decidim::Core::ComponentType
|
20
6
|
graphql_name "Proposals"
|
21
7
|
description "A proposals component of a participatory space."
|
22
8
|
|
23
|
-
field :proposals, type: Decidim::Proposals::ProposalType.connection_type, description: "List all proposals", connection: true, null: true do
|
24
|
-
argument :order, Decidim::Proposals::ProposalInputSort, "Provides several methods to order the results", required: false
|
25
|
-
argument :filter, Decidim::Proposals::ProposalInputFilter, "Provides several methods to filter the results", required: false
|
26
|
-
end
|
27
|
-
|
28
9
|
field :proposal, type: Decidim::Proposals::ProposalType, description: "Finds one proposal", null: true do
|
29
10
|
argument :id, GraphQL::Types::ID, "The ID of the proposal", required: true
|
30
11
|
end
|
12
|
+
field :proposals, type: Decidim::Proposals::ProposalType.connection_type, description: "List all proposals", connection: true, null: true do
|
13
|
+
argument :filter, Decidim::Proposals::ProposalInputFilter, "Provides several methods to filter the results", required: false
|
14
|
+
argument :order, Decidim::Proposals::ProposalInputSort, "Provides several methods to order the results", required: false
|
15
|
+
end
|
31
16
|
|
32
17
|
def proposals(filter: {}, order: {})
|
33
18
|
Decidim::Proposals::ProposalListHelper.new(model_class: Proposal).call(object, { filter:, order: }, context)
|
@@ -14,17 +14,26 @@ module Decidim
|
|
14
14
|
routes do
|
15
15
|
resources :proposals, only: [:show, :index, :new, :create, :edit, :update] do
|
16
16
|
resources :valuation_assignments, only: [:destroy]
|
17
|
+
member do
|
18
|
+
patch :soft_delete
|
19
|
+
patch :restore
|
20
|
+
end
|
17
21
|
collection do
|
18
|
-
post :
|
22
|
+
post :update_taxonomies
|
19
23
|
post :publish_answers
|
20
|
-
post :
|
24
|
+
post :update_multiple_answers, controller: "proposal_answers"
|
25
|
+
get :manage_trash, controller: "proposals"
|
21
26
|
resource :proposals_import, only: [:new, :create]
|
22
27
|
resource :proposals_merge, only: [:create]
|
23
28
|
resource :proposals_split, only: [:create]
|
24
29
|
resource :valuation_assignment, only: [:create, :destroy]
|
25
30
|
end
|
26
31
|
resources :proposal_answers, only: [:edit, :update]
|
27
|
-
resources :proposal_notes, only: [:create]
|
32
|
+
resources :proposal_notes, only: [:create] do
|
33
|
+
member do
|
34
|
+
post :reply
|
35
|
+
end
|
36
|
+
end
|
28
37
|
end
|
29
38
|
|
30
39
|
resources :proposal_states
|
@@ -9,8 +9,7 @@ module Decidim
|
|
9
9
|
:is_emendation_true,
|
10
10
|
:state_eq,
|
11
11
|
:with_any_state,
|
12
|
-
:
|
13
|
-
:category_id_eq,
|
12
|
+
:taxonomies_part_of_contains,
|
14
13
|
:valuator_role_ids_has
|
15
14
|
)
|
16
15
|
|
@@ -18,16 +17,14 @@ module Decidim
|
|
18
17
|
is_emendation_true: %w(true false),
|
19
18
|
state_eq: state_eq_values,
|
20
19
|
with_any_state: %w(state_published state_not_published),
|
21
|
-
|
22
|
-
category_id_eq: category_ids_hash(categories.first_class),
|
20
|
+
taxonomies_part_of_contains: taxonomy_ids_hash(available_root_taxonomies),
|
23
21
|
valuator_role_ids_has: valuator_role_ids
|
24
22
|
)
|
25
23
|
|
26
24
|
configuration.add_dynamically_translated_filters(
|
27
|
-
:scope_id_eq,
|
28
|
-
:category_id_eq,
|
29
25
|
:valuator_role_ids_has,
|
30
26
|
:proposal_state_id_eq,
|
27
|
+
:taxonomies_part_of_contains,
|
31
28
|
:state_eq
|
32
29
|
)
|
33
30
|
end
|
@@ -29,14 +29,13 @@ Decidim.register_component(:proposals) do |component|
|
|
29
29
|
POSSIBLE_SORT_ORDERS = %w(automatic random recent most_endorsed most_voted most_commented most_followed with_more_authors).freeze
|
30
30
|
|
31
31
|
component.settings(:global) do |settings|
|
32
|
-
settings.attribute :
|
33
|
-
settings.attribute :scope_id, type: :scope
|
32
|
+
settings.attribute :taxonomy_filters, type: :taxonomy_filters
|
34
33
|
settings.attribute :vote_limit, type: :integer, default: 0, required: true
|
35
34
|
settings.attribute :minimum_votes_per_user, type: :integer, default: 0, required: true
|
36
35
|
settings.attribute :proposal_limit, type: :integer, default: 0, required: true
|
37
36
|
settings.attribute :proposal_length, type: :integer, default: 500
|
38
|
-
settings.attribute :proposal_edit_time, type: :enum, default: "limited", choices: -> { %w(limited
|
39
|
-
settings.attribute :
|
37
|
+
settings.attribute :proposal_edit_time, type: :enum, default: "limited", choices: -> { %w(infinite limited) }
|
38
|
+
settings.attribute :edit_time, type: :integer_with_units, default: [5, "minutes"], required: true, units: %w(minutes hours days)
|
40
39
|
settings.attribute :threshold_per_proposal, type: :integer, default: 0, required: true
|
41
40
|
settings.attribute :can_accumulate_votes_beyond_threshold, type: :boolean, default: false
|
42
41
|
settings.attribute :proposal_answering_enabled, type: :boolean, default: true
|
@@ -137,7 +136,7 @@ Decidim.register_component(:proposals) do |component|
|
|
137
136
|
.published
|
138
137
|
.not_hidden
|
139
138
|
.where(component: component_instance)
|
140
|
-
.includes(:
|
139
|
+
.includes(:taxonomies, :component)
|
141
140
|
|
142
141
|
if space.user_roles(:valuator).where(user:).any?
|
143
142
|
collection.with_valuation_assigned_to(user, space)
|