decidim-proposals 0.23.5 → 0.24.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim/proposals/add_proposal.js.es6 +4 -1
  3. data/app/assets/javascripts/decidim/proposals/admin/proposals_form.js.es6 +4 -1
  4. data/app/assets/stylesheets/decidim/proposals/_proposals.css.scss +1 -0
  5. data/app/assets/stylesheets/decidim/proposals/proposals/_preview.css.scss +3 -0
  6. data/app/cells/decidim/proposals/collaborative_draft_link_to_proposal_cell.rb +3 -3
  7. data/app/cells/decidim/proposals/collaborative_drafts/reported_content/show.erb +3 -0
  8. data/app/cells/decidim/proposals/collaborative_drafts/reported_content_cell.rb +15 -0
  9. data/app/cells/decidim/proposals/content_blocks/highlighted_proposals/elements.erb +5 -0
  10. data/app/cells/decidim/proposals/content_blocks/highlighted_proposals/heading.erb +1 -0
  11. data/app/cells/decidim/proposals/content_blocks/highlighted_proposals_cell.rb +19 -0
  12. data/app/cells/decidim/proposals/irreversible_action_modal_cell.rb +1 -1
  13. data/app/cells/decidim/proposals/proposal_m_cell.rb +23 -2
  14. data/app/cells/decidim/proposals/proposals_picker_cell.rb +1 -1
  15. data/app/cells/decidim/proposals/reported_content/show.erb +4 -0
  16. data/app/cells/decidim/proposals/reported_content_cell.rb +13 -0
  17. data/app/commands/decidim/proposals/hashtags_methods.rb +1 -1
  18. data/app/commands/decidim/proposals/update_proposal.rb +0 -2
  19. data/app/controllers/decidim/proposals/admin/proposals_controller.rb +6 -4
  20. data/app/controllers/decidim/proposals/collaborative_drafts_controller.rb +1 -30
  21. data/app/controllers/decidim/proposals/proposals_controller.rb +5 -6
  22. data/app/events/decidim/proposals/publish_proposal_event.rb +1 -1
  23. data/app/forms/decidim/proposals/access_to_collaborative_draft_form.rb +1 -3
  24. data/app/forms/decidim/proposals/admin/proposal_base_form.rb +3 -2
  25. data/app/forms/decidim/proposals/proposal_form.rb +15 -5
  26. data/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb +1 -1
  27. data/app/helpers/decidim/proposals/admin/filterable_helper.rb +1 -1
  28. data/app/helpers/decidim/proposals/admin/proposal_rankings_helper.rb +1 -1
  29. data/app/helpers/decidim/proposals/admin/proposals_helper.rb +8 -8
  30. data/app/helpers/decidim/proposals/application_helper.rb +5 -2
  31. data/app/helpers/decidim/proposals/map_helper.rb +31 -8
  32. data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +14 -44
  33. data/app/helpers/decidim/proposals/proposals_helper.rb +3 -6
  34. data/app/models/decidim/proposals/collaborative_draft.rb +10 -0
  35. data/app/models/decidim/proposals/proposal.rb +18 -10
  36. data/app/permissions/decidim/proposals/admin/permissions.rb +2 -2
  37. data/app/permissions/decidim/proposals/permissions.rb +3 -2
  38. data/app/presenters/decidim/proposals/proposal_presenter.rb +4 -4
  39. data/app/queries/decidim/proposals/metrics/proposal_followers_metric_measure.rb +4 -4
  40. data/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb +6 -6
  41. data/app/services/decidim/proposals/collaborative_draft_search.rb +1 -1
  42. data/app/services/decidim/proposals/diff_renderer.rb +7 -11
  43. data/app/services/decidim/proposals/proposal_builder.rb +1 -0
  44. data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +8 -1
  45. data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +5 -1
  46. data/app/views/decidim/proposals/admin/proposals_imports/new.html.erb +1 -1
  47. data/app/views/decidim/proposals/collaborative_drafts/_filters_small_view.html.erb +1 -1
  48. data/app/views/decidim/proposals/collaborative_drafts/_wizard_aside.html.erb +2 -7
  49. data/app/views/decidim/proposals/collaborative_drafts/_wizard_header.html.erb +14 -0
  50. data/app/views/decidim/proposals/collaborative_drafts/edit.html.erb +1 -3
  51. data/app/views/decidim/proposals/collaborative_drafts/new.html.erb +5 -13
  52. data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +1 -7
  53. data/app/views/decidim/proposals/proposals/_dynamic_map_instructions.html.erb +3 -0
  54. data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +6 -6
  55. data/app/views/decidim/proposals/proposals/_filters.html.erb +34 -32
  56. data/app/views/decidim/proposals/proposals/_filters_small_view.html.erb +1 -1
  57. data/app/views/decidim/proposals/proposals/_wizard_header.html.erb +21 -11
  58. data/app/views/decidim/proposals/proposals/edit.html.erb +1 -3
  59. data/app/views/decidim/proposals/proposals/preview.html.erb +50 -2
  60. data/app/views/decidim/proposals/proposals/show.html.erb +2 -8
  61. data/config/locales/ar.yml +2 -23
  62. data/config/locales/bg.yml +0 -4
  63. data/config/locales/ca.yml +23 -29
  64. data/config/locales/cs.yml +24 -30
  65. data/config/locales/de.yml +23 -29
  66. data/config/locales/el.yml +2 -29
  67. data/config/locales/en.yml +23 -29
  68. data/config/locales/es-MX.yml +23 -29
  69. data/config/locales/es-PY.yml +23 -29
  70. data/config/locales/es.yml +23 -29
  71. data/config/locales/eu.yml +2 -23
  72. data/config/locales/fi-plain.yml +22 -28
  73. data/config/locales/fi.yml +22 -28
  74. data/config/locales/fr-CA.yml +19 -29
  75. data/config/locales/fr.yml +19 -29
  76. data/config/locales/gl.yml +17 -25
  77. data/config/locales/hu.yml +2 -23
  78. data/config/locales/id-ID.yml +2 -23
  79. data/config/locales/is-IS.yml +0 -8
  80. data/config/locales/it.yml +4 -29
  81. data/config/locales/ja.yml +2 -29
  82. data/config/locales/lv.yml +2 -22
  83. data/config/locales/nl.yml +17 -29
  84. data/config/locales/no.yml +2 -23
  85. data/config/locales/pl.yml +22 -28
  86. data/config/locales/pt-BR.yml +2 -22
  87. data/config/locales/pt.yml +2 -29
  88. data/config/locales/ro-RO.yml +13 -29
  89. data/config/locales/ru.yml +0 -8
  90. data/config/locales/sk.yml +5 -23
  91. data/config/locales/sv.yml +23 -28
  92. data/config/locales/tr-TR.yml +17 -29
  93. data/config/locales/uk.yml +0 -8
  94. data/config/locales/zh-CN.yml +2 -29
  95. data/db/migrate/20210310102839_add_followable_counter_cache_to_proposals.rb +16 -0
  96. data/db/migrate/20210310120812_add_followable_counter_cache_to_collaborative_drafts.rb +16 -0
  97. data/db/migrate/20210318082934_fix_counters_for_copied_proposals.rb +9 -7
  98. data/{app/types/decidim/proposals → lib/decidim/api}/proposal_input_filter.rb +0 -0
  99. data/{app/types/decidim/proposals → lib/decidim/api}/proposal_input_sort.rb +3 -5
  100. data/lib/decidim/api/proposal_type.rb +56 -0
  101. data/lib/decidim/api/proposals_type.rb +43 -0
  102. data/lib/decidim/content_renderers/proposal_renderer.rb +1 -1
  103. data/lib/decidim/proposals.rb +2 -0
  104. data/lib/decidim/proposals/api.rb +10 -0
  105. data/lib/decidim/proposals/component.rb +30 -19
  106. data/lib/decidim/proposals/engine.rb +6 -27
  107. data/lib/decidim/proposals/proposal_creator.rb +98 -0
  108. data/lib/decidim/proposals/test/factories.rb +22 -8
  109. data/lib/decidim/proposals/version.rb +1 -1
  110. metadata +49 -35
  111. data/app/commands/decidim/proposals/create_proposal_export.rb +0 -37
  112. data/app/helpers/decidim/proposals/proposal_endorsements_helper.rb +0 -0
  113. data/app/queries/decidim/proposals/similar_collaborative_drafts.rb +0 -52
  114. data/app/types/decidim/proposals/proposal_type.rb +0 -70
  115. data/app/types/decidim/proposals/proposals_type.rb +0 -41
  116. data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_proposals.html.erb +0 -13
  117. data/app/views/decidim/proposals/collaborative_drafts/compare.html.erb +0 -21
  118. data/app/views/decidim/proposals/collaborative_drafts/complete.html.erb +0 -24
  119. data/app/views/decidim/proposals/proposals/_proposal_preview.html.erb +0 -1
@@ -32,8 +32,6 @@ module Decidim
32
32
  resources :versions, only: [:show, :index]
33
33
  end
34
34
  resources :collaborative_drafts, except: [:destroy] do
35
- get :compare, on: :collection
36
- get :complete, on: :collection
37
35
  member do
38
36
  post :request_access, controller: "collaborative_draft_collaborator_requests"
39
37
  post :request_accept, controller: "collaborative_draft_collaborator_requests"
@@ -60,27 +58,6 @@ module Decidim
60
58
  Decidim.view_hooks.register(:participatory_space_highlighted_elements, priority: Decidim::ViewHooks::MEDIUM_PRIORITY) do |view_context|
61
59
  view_context.cell("decidim/proposals/highlighted_proposals", view_context.current_participatory_space)
62
60
  end
63
-
64
- if defined? Decidim::ParticipatoryProcesses
65
- Decidim::ParticipatoryProcesses.view_hooks.register(:process_group_highlighted_elements, priority: Decidim::ViewHooks::MEDIUM_PRIORITY) do |view_context|
66
- published_components = Decidim::Component.where(participatory_space: view_context.participatory_processes).published
67
- proposals = Decidim::Proposals::Proposal.published.not_hidden.except_withdrawn
68
- .where(component: published_components)
69
- .order_randomly(rand * 2 - 1)
70
- .limit(Decidim::Proposals.config.process_group_highlighted_proposals_limit)
71
-
72
- next unless proposals.any?
73
-
74
- view_context.extend Decidim::ResourceReferenceHelper
75
- view_context.extend Decidim::Proposals::ApplicationHelper
76
- view_context.render(
77
- partial: "decidim/participatory_processes/participatory_process_groups/highlighted_proposals",
78
- locals: {
79
- proposals: proposals
80
- }
81
- )
82
- end
83
- end
84
61
  end
85
62
 
86
63
  initializer "decidim_changes" do
@@ -125,13 +102,14 @@ module Decidim
125
102
  badge.valid_for = [:user, :user_group]
126
103
 
127
104
  badge.reset = lambda { |model|
128
- if model.is_a?(User)
105
+ case model
106
+ when User
129
107
  Decidim::Coauthorship.where(
130
108
  coauthorable_type: "Decidim::Proposals::Proposal",
131
109
  author: model,
132
110
  user_group: nil
133
111
  ).count
134
- elsif model.is_a?(UserGroup)
112
+ when UserGroup
135
113
  Decidim::Coauthorship.where(
136
114
  coauthorable_type: "Decidim::Proposals::Proposal",
137
115
  user_group: model
@@ -146,13 +124,14 @@ module Decidim
146
124
  badge.valid_for = [:user, :user_group]
147
125
 
148
126
  badge.reset = lambda { |model|
149
- proposal_ids = if model.is_a?(User)
127
+ proposal_ids = case model
128
+ when User
150
129
  Decidim::Coauthorship.where(
151
130
  coauthorable_type: "Decidim::Proposals::Proposal",
152
131
  author: model,
153
132
  user_group: nil
154
133
  ).select(:coauthorable_id)
155
- elsif model.is_a?(UserGroup)
134
+ when UserGroup
156
135
  Decidim::Coauthorship.where(
157
136
  coauthorable_type: "Decidim::Proposals::Proposal",
158
137
  user_group: model
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Proposals
5
+ # This class is responsible for creating the imported proposals
6
+ # and must be included in proposals component's import manifest.
7
+ class ProposalCreator < Decidim::Admin::Import::Creator
8
+ # Retuns the resource class to be created with the provided data.
9
+ def self.resource_klass
10
+ Decidim::Proposals::Proposal
11
+ end
12
+
13
+ # Produces a proposal from parsed data
14
+ #
15
+ # Returns a proposal
16
+ def produce
17
+ resource.add_coauthor(context[:current_user], user_group: context[:user_group])
18
+
19
+ resource
20
+ end
21
+
22
+ # Saves the proposal
23
+ def finish!
24
+ super # resource.save!
25
+ notify(resource)
26
+ publish(resource)
27
+ end
28
+
29
+ private
30
+
31
+ attr_reader :context
32
+
33
+ def resource
34
+ @resource ||= Decidim::Proposals::Proposal.new(
35
+ category: category,
36
+ scope: scope,
37
+ title: title,
38
+ body: body,
39
+ component: component,
40
+ published_at: Time.current
41
+ )
42
+ end
43
+
44
+ def category
45
+ id = data.has_key?(:category) ? data[:category]["id"] : data[:"category/id"].to_i
46
+ Decidim::Category.find_by(id: id)
47
+ end
48
+
49
+ def scope
50
+ id = data.has_key?(:scope) ? data[:scope]["id"] : data[:"scope/id"].to_i
51
+ Decidim::Scope.find_by(id: id)
52
+ end
53
+
54
+ def title
55
+ locale_hasher("title", available_locales)
56
+ end
57
+
58
+ def body
59
+ locale_hasher("body", available_locales)
60
+ end
61
+
62
+ def available_locales
63
+ @available_locales ||= component.participatory_space.organization.available_locales
64
+ end
65
+
66
+ def component
67
+ context[:current_component]
68
+ end
69
+
70
+ def notify(proposal)
71
+ return if proposal.coauthorships.empty?
72
+
73
+ Decidim::EventsManager.publish(
74
+ event: "decidim.events.proposals.proposal_published",
75
+ event_class: Decidim::Proposals::PublishProposalEvent,
76
+ resource: proposal,
77
+ followers: coauthors_followers(proposal)
78
+ )
79
+ end
80
+
81
+ def publish(proposal)
82
+ Decidim::EventsManager.publish(
83
+ event: "decidim.events.proposals.proposal_published",
84
+ event_class: Decidim::Proposals::PublishProposalEvent,
85
+ resource: proposal,
86
+ followers: proposal.participatory_space.followers - coauthors_followers(proposal),
87
+ extra: {
88
+ participatory_space: true
89
+ }
90
+ )
91
+ end
92
+
93
+ def coauthors_followers(proposal)
94
+ @coauthors_followers ||= proposal.authors.flat_map(&:followers)
95
+ end
96
+ end
97
+ end
98
+ end
@@ -262,19 +262,21 @@ FactoryBot.define do
262
262
  if skip_injection
263
263
  Decidim::Faker::Localized.localized { generate(:title) }
264
264
  else
265
- Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script> " + generate(:title) }
265
+ Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script> #{generate(:title)}" }
266
266
  end
267
267
  end
268
268
  body do
269
269
  if skip_injection
270
- Decidim::Faker::Localized.localized { Faker::Lorem.sentences(3).join("\n") }
270
+ Decidim::Faker::Localized.localized { Faker::Lorem.sentences(number: 3).join("\n") }
271
271
  else
272
- Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script> " + Faker::Lorem.sentences(3).join("\n") }
272
+ Decidim::Faker::Localized.localized { "<script>alert(\"TITLE\");</script> #{Faker::Lorem.sentences(number: 3).join("\n")}" }
273
273
  end
274
274
  end
275
275
  component { create(:proposal_component) }
276
276
  published_at { Time.current }
277
277
  address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
278
+ latitude { Faker::Address.latitude }
279
+ longitude { Faker::Address.longitude }
278
280
 
279
281
  after(:build) do |proposal, evaluator|
280
282
  proposal.title = if evaluator.title.is_a?(String)
@@ -409,6 +411,18 @@ FactoryBot.define do
409
411
  create_list(:proposal_amendment, 5, amendable: proposal)
410
412
  end
411
413
  end
414
+
415
+ trait :with_photo do
416
+ after :create do |proposal|
417
+ proposal.attachments << create(:attachment, :with_image, attached_to: proposal)
418
+ end
419
+ end
420
+
421
+ trait :with_document do
422
+ after :create do |proposal|
423
+ proposal.attachments << create(:attachment, :with_pdf, attached_to: proposal)
424
+ end
425
+ end
412
426
  end
413
427
 
414
428
  factory :proposal_vote, class: "Decidim::Proposals::ProposalVote" do
@@ -424,7 +438,7 @@ FactoryBot.define do
424
438
  end
425
439
 
426
440
  factory :proposal_note, class: "Decidim::Proposals::ProposalNote" do
427
- body { Faker::Lorem.sentences(3).join("\n") }
441
+ body { Faker::Lorem.sentences(number: 3).join("\n") }
428
442
  proposal { build(:proposal) }
429
443
  author { build(:user, organization: proposal.organization) }
430
444
  end
@@ -436,8 +450,8 @@ FactoryBot.define do
436
450
  user_groups { [] }
437
451
  end
438
452
 
439
- title { "<script>alert(\"TITLE\");</script> " + generate(:title) }
440
- body { "<script>alert(\"BODY\");</script>\n" + Faker::Lorem.sentences(3).join("\n") }
453
+ title { "<script>alert(\"TITLE\");</script> #{generate(:title)}" }
454
+ body { "<script>alert(\"BODY\");</script>\n#{Faker::Lorem.sentences(number: 3).join("\n")}" }
441
455
  component { create(:proposal_component) }
442
456
  address { "#{Faker::Address.street_name}, #{Faker::Address.city}" }
443
457
  state { "open" }
@@ -467,8 +481,8 @@ FactoryBot.define do
467
481
  end
468
482
 
469
483
  factory :participatory_text, class: "Decidim::Proposals::ParticipatoryText" do
470
- title { { en: "<script>alert(\"TITLE\");</script> " + generate(:title) } }
471
- description { { en: "<script>alert(\"DESCRIPTION\");</script>\n" + Faker::Lorem.sentences(3).join("\n") } }
484
+ title { { en: "<script>alert(\"TITLE\");</script> #{generate(:title)}" } }
485
+ description { { en: "<script>alert(\"DESCRIPTION\");</script>\n#{Faker::Lorem.sentences(number: 3).join("\n")}" } }
472
486
  component { create(:proposal_component) }
473
487
  end
474
488
 
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-proposals version.
5
5
  module Proposals
6
6
  def self.version
7
- "0.23.5"
7
+ "0.24.2"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-proposals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.5
4
+ version: 0.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-04-08 00:00:00.000000000 Z
13
+ date: 2021-05-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: acts_as_list
@@ -60,42 +60,42 @@ dependencies:
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.23.5
63
+ version: 0.24.2
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.23.5
70
+ version: 0.24.2
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-core
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.23.5
77
+ version: 0.24.2
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.23.5
84
+ version: 0.24.2
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: doc2text
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: 0.4.2
91
+ version: 0.4.3
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: 0.4.2
98
+ version: 0.4.3
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: kaminari
101
101
  requirement: !ruby/object:Gem::Requirement
@@ -136,98 +136,104 @@ dependencies:
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '3.4'
139
+ version: '3.5'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 3.5.1
140
143
  type: :runtime
141
144
  prerelease: false
142
145
  version_requirements: !ruby/object:Gem::Requirement
143
146
  requirements:
144
147
  - - "~>"
145
148
  - !ruby/object:Gem::Version
146
- version: '3.4'
149
+ version: '3.5'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 3.5.1
147
153
  - !ruby/object:Gem::Dependency
148
154
  name: decidim-admin
149
155
  requirement: !ruby/object:Gem::Requirement
150
156
  requirements:
151
157
  - - '='
152
158
  - !ruby/object:Gem::Version
153
- version: 0.23.5
159
+ version: 0.24.2
154
160
  type: :development
155
161
  prerelease: false
156
162
  version_requirements: !ruby/object:Gem::Requirement
157
163
  requirements:
158
164
  - - '='
159
165
  - !ruby/object:Gem::Version
160
- version: 0.23.5
166
+ version: 0.24.2
161
167
  - !ruby/object:Gem::Dependency
162
168
  name: decidim-assemblies
163
169
  requirement: !ruby/object:Gem::Requirement
164
170
  requirements:
165
171
  - - '='
166
172
  - !ruby/object:Gem::Version
167
- version: 0.23.5
173
+ version: 0.24.2
168
174
  type: :development
169
175
  prerelease: false
170
176
  version_requirements: !ruby/object:Gem::Requirement
171
177
  requirements:
172
178
  - - '='
173
179
  - !ruby/object:Gem::Version
174
- version: 0.23.5
180
+ version: 0.24.2
175
181
  - !ruby/object:Gem::Dependency
176
182
  name: decidim-budgets
177
183
  requirement: !ruby/object:Gem::Requirement
178
184
  requirements:
179
185
  - - '='
180
186
  - !ruby/object:Gem::Version
181
- version: 0.23.5
187
+ version: 0.24.2
182
188
  type: :development
183
189
  prerelease: false
184
190
  version_requirements: !ruby/object:Gem::Requirement
185
191
  requirements:
186
192
  - - '='
187
193
  - !ruby/object:Gem::Version
188
- version: 0.23.5
194
+ version: 0.24.2
189
195
  - !ruby/object:Gem::Dependency
190
196
  name: decidim-dev
191
197
  requirement: !ruby/object:Gem::Requirement
192
198
  requirements:
193
199
  - - '='
194
200
  - !ruby/object:Gem::Version
195
- version: 0.23.5
201
+ version: 0.24.2
196
202
  type: :development
197
203
  prerelease: false
198
204
  version_requirements: !ruby/object:Gem::Requirement
199
205
  requirements:
200
206
  - - '='
201
207
  - !ruby/object:Gem::Version
202
- version: 0.23.5
208
+ version: 0.24.2
203
209
  - !ruby/object:Gem::Dependency
204
210
  name: decidim-meetings
205
211
  requirement: !ruby/object:Gem::Requirement
206
212
  requirements:
207
213
  - - '='
208
214
  - !ruby/object:Gem::Version
209
- version: 0.23.5
215
+ version: 0.24.2
210
216
  type: :development
211
217
  prerelease: false
212
218
  version_requirements: !ruby/object:Gem::Requirement
213
219
  requirements:
214
220
  - - '='
215
221
  - !ruby/object:Gem::Version
216
- version: 0.23.5
222
+ version: 0.24.2
217
223
  - !ruby/object:Gem::Dependency
218
224
  name: decidim-participatory_processes
219
225
  requirement: !ruby/object:Gem::Requirement
220
226
  requirements:
221
227
  - - '='
222
228
  - !ruby/object:Gem::Version
223
- version: 0.23.5
229
+ version: 0.24.2
224
230
  type: :development
225
231
  prerelease: false
226
232
  version_requirements: !ruby/object:Gem::Requirement
227
233
  requirements:
228
234
  - - '='
229
235
  - !ruby/object:Gem::Version
230
- version: 0.23.5
236
+ version: 0.24.2
231
237
  description: A proposals component for decidim's participatory spaces.
232
238
  email:
233
239
  - josepjaume@gmail.com
@@ -252,12 +258,19 @@ files:
252
258
  - app/assets/javascripts/decidim/proposals/admin/proposals_form.js.es6
253
259
  - app/assets/javascripts/decidim/proposals/admin/proposals_picker.js.es6
254
260
  - app/assets/javascripts/decidim/proposals/utils.js.es6
261
+ - app/assets/stylesheets/decidim/proposals/_proposals.css.scss
262
+ - app/assets/stylesheets/decidim/proposals/proposals/_preview.css.scss
255
263
  - app/cells/decidim/proposals/collaborative_draft_cell.rb
256
264
  - app/cells/decidim/proposals/collaborative_draft_link_to_proposal/show.erb
257
265
  - app/cells/decidim/proposals/collaborative_draft_link_to_proposal_cell.rb
258
266
  - app/cells/decidim/proposals/collaborative_draft_m/footer.erb
259
267
  - app/cells/decidim/proposals/collaborative_draft_m/tags.erb
260
268
  - app/cells/decidim/proposals/collaborative_draft_m_cell.rb
269
+ - app/cells/decidim/proposals/collaborative_drafts/reported_content/show.erb
270
+ - app/cells/decidim/proposals/collaborative_drafts/reported_content_cell.rb
271
+ - app/cells/decidim/proposals/content_blocks/highlighted_proposals/elements.erb
272
+ - app/cells/decidim/proposals/content_blocks/highlighted_proposals/heading.erb
273
+ - app/cells/decidim/proposals/content_blocks/highlighted_proposals_cell.rb
261
274
  - app/cells/decidim/proposals/cost_report/show.erb
262
275
  - app/cells/decidim/proposals/cost_report_cell.rb
263
276
  - app/cells/decidim/proposals/highlighted_proposals/show.erb
@@ -284,6 +297,8 @@ files:
284
297
  - app/cells/decidim/proposals/proposals_picker/proposals.erb
285
298
  - app/cells/decidim/proposals/proposals_picker/show.erb
286
299
  - app/cells/decidim/proposals/proposals_picker_cell.rb
300
+ - app/cells/decidim/proposals/reported_content/show.erb
301
+ - app/cells/decidim/proposals/reported_content_cell.rb
287
302
  - app/commands/decidim/proposals/accept_access_to_collaborative_draft.rb
288
303
  - app/commands/decidim/proposals/admin/answer_proposal.rb
289
304
  - app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb
@@ -304,7 +319,6 @@ files:
304
319
  - app/commands/decidim/proposals/admin/update_proposal_scope.rb
305
320
  - app/commands/decidim/proposals/create_collaborative_draft.rb
306
321
  - app/commands/decidim/proposals/create_proposal.rb
307
- - app/commands/decidim/proposals/create_proposal_export.rb
308
322
  - app/commands/decidim/proposals/destroy_proposal.rb
309
323
  - app/commands/decidim/proposals/gallery_methods.rb
310
324
  - app/commands/decidim/proposals/hashtags_methods.rb
@@ -388,7 +402,6 @@ files:
388
402
  - app/helpers/decidim/proposals/map_helper.rb
389
403
  - app/helpers/decidim/proposals/participatory_texts_helper.rb
390
404
  - app/helpers/decidim/proposals/proposal_cells_helper.rb
391
- - app/helpers/decidim/proposals/proposal_endorsements_helper.rb
392
405
  - app/helpers/decidim/proposals/proposal_votes_helper.rb
393
406
  - app/helpers/decidim/proposals/proposal_wizard_helper.rb
394
407
  - app/helpers/decidim/proposals/proposals_helper.rb
@@ -422,18 +435,12 @@ files:
422
435
  - app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb
423
436
  - app/queries/decidim/proposals/metrics/proposals_metric_manage.rb
424
437
  - app/queries/decidim/proposals/metrics/votes_metric_manage.rb
425
- - app/queries/decidim/proposals/similar_collaborative_drafts.rb
426
438
  - app/queries/decidim/proposals/similar_proposals.rb
427
439
  - app/services/decidim/proposals/collaborative_draft_search.rb
428
440
  - app/services/decidim/proposals/diff_renderer.rb
429
441
  - app/services/decidim/proposals/proposal_builder.rb
430
442
  - app/services/decidim/proposals/proposal_search.rb
431
- - app/types/decidim/proposals/proposal_input_filter.rb
432
- - app/types/decidim/proposals/proposal_input_sort.rb
433
- - app/types/decidim/proposals/proposal_type.rb
434
- - app/types/decidim/proposals/proposals_type.rb
435
443
  - app/validators/proposal_length_validator.rb
436
- - app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_proposals.html.erb
437
444
  - app/views/decidim/proposals/admin/participatory_texts/_article-preview.html.erb
438
445
  - app/views/decidim/proposals/admin/participatory_texts/_bulk-actions.html.erb
439
446
  - app/views/decidim/proposals/admin/participatory_texts/index.html.erb
@@ -472,8 +479,7 @@ files:
472
479
  - app/views/decidim/proposals/collaborative_drafts/_reject_request_access_form.html.erb
473
480
  - app/views/decidim/proposals/collaborative_drafts/_request_access_form.html.erb
474
481
  - app/views/decidim/proposals/collaborative_drafts/_wizard_aside.html.erb
475
- - app/views/decidim/proposals/collaborative_drafts/compare.html.erb
476
- - app/views/decidim/proposals/collaborative_drafts/complete.html.erb
482
+ - app/views/decidim/proposals/collaborative_drafts/_wizard_header.html.erb
477
483
  - app/views/decidim/proposals/collaborative_drafts/edit.html.erb
478
484
  - app/views/decidim/proposals/collaborative_drafts/index.html.erb
479
485
  - app/views/decidim/proposals/collaborative_drafts/index.js.erb
@@ -481,6 +487,7 @@ files:
481
487
  - app/views/decidim/proposals/collaborative_drafts/show.html.erb
482
488
  - app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb
483
489
  - app/views/decidim/proposals/proposals/_count.html.erb
490
+ - app/views/decidim/proposals/proposals/_dynamic_map_instructions.html.erb
484
491
  - app/views/decidim/proposals/proposals/_edit_form_fields.html.erb
485
492
  - app/views/decidim/proposals/proposals/_endorsements_card_row.html.erb
486
493
  - app/views/decidim/proposals/proposals/_filters.html.erb
@@ -488,7 +495,6 @@ files:
488
495
  - app/views/decidim/proposals/proposals/_linked_proposals.html.erb
489
496
  - app/views/decidim/proposals/proposals/_proposal.html.erb
490
497
  - app/views/decidim/proposals/proposals/_proposal_badge.html.erb
491
- - app/views/decidim/proposals/proposals/_proposal_preview.html.erb
492
498
  - app/views/decidim/proposals/proposals/_proposal_similar.html.erb
493
499
  - app/views/decidim/proposals/proposals/_proposals.html.erb
494
500
  - app/views/decidim/proposals/proposals/_remaining_votes_count.html.erb
@@ -633,12 +639,19 @@ files:
633
639
  - db/migrate/20200827154156_add_commentable_counter_cache_to_proposals.rb
634
640
  - db/migrate/20201002085508_fix_proposals_data.rb
635
641
  - db/migrate/20210127115628_fix_answered_proposals_after_copy.rb
642
+ - db/migrate/20210310102839_add_followable_counter_cache_to_proposals.rb
643
+ - db/migrate/20210310120812_add_followable_counter_cache_to_collaborative_drafts.rb
636
644
  - db/migrate/20210318082934_fix_counters_for_copied_proposals.rb
645
+ - lib/decidim/api/proposal_input_filter.rb
646
+ - lib/decidim/api/proposal_input_sort.rb
647
+ - lib/decidim/api/proposal_type.rb
648
+ - lib/decidim/api/proposals_type.rb
637
649
  - lib/decidim/content_parsers/proposal_parser.rb
638
650
  - lib/decidim/content_renderers/proposal_renderer.rb
639
651
  - lib/decidim/proposals.rb
640
652
  - lib/decidim/proposals/admin.rb
641
653
  - lib/decidim/proposals/admin_engine.rb
654
+ - lib/decidim/proposals/api.rb
642
655
  - lib/decidim/proposals/commentable_collaborative_draft.rb
643
656
  - lib/decidim/proposals/commentable_proposal.rb
644
657
  - lib/decidim/proposals/component.rb
@@ -647,6 +660,7 @@ files:
647
660
  - lib/decidim/proposals/markdown_to_proposals.rb
648
661
  - lib/decidim/proposals/odt_to_markdown.rb
649
662
  - lib/decidim/proposals/participatory_text_section.rb
663
+ - lib/decidim/proposals/proposal_creator.rb
650
664
  - lib/decidim/proposals/proposal_serializer.rb
651
665
  - lib/decidim/proposals/test/capybara_proposals_picker.rb
652
666
  - lib/decidim/proposals/test/factories.rb
@@ -664,14 +678,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
664
678
  requirements:
665
679
  - - ">="
666
680
  - !ruby/object:Gem::Version
667
- version: '2.6'
681
+ version: '2.7'
668
682
  required_rubygems_version: !ruby/object:Gem::Requirement
669
683
  requirements:
670
684
  - - ">="
671
685
  - !ruby/object:Gem::Version
672
686
  version: '0'
673
687
  requirements: []
674
- rubygems_version: 3.0.3
688
+ rubygems_version: 3.1.2
675
689
  signing_key:
676
690
  specification_version: 4
677
691
  summary: Decidim proposals module