decidim-proposals 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -0
  3. data/app/assets/config/decidim_proposals_manifest.js +1 -0
  4. data/app/assets/javascripts/decidim/proposals/add_proposal.js.es6 +1 -1
  5. data/app/assets/javascripts/decidim/proposals/admin/proposals_form.js.es6 +23 -0
  6. data/app/cells/decidim/proposals/collaborative_draft_cell.rb +0 -2
  7. data/app/cells/decidim/proposals/collaborative_draft_m_cell.rb +5 -1
  8. data/app/cells/decidim/proposals/highlighted_proposals/show.erb +3 -0
  9. data/app/cells/decidim/proposals/highlighted_proposals_cell.rb +25 -0
  10. data/app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb +19 -0
  11. data/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb +34 -0
  12. data/app/cells/decidim/proposals/participatory_text_proposal/buttons.erb +33 -0
  13. data/app/cells/decidim/proposals/participatory_text_proposal/show.erb +9 -0
  14. data/app/cells/decidim/proposals/participatory_text_proposal_cell.rb +77 -0
  15. data/app/cells/decidim/proposals/proposal_cell.rb +0 -2
  16. data/app/cells/decidim/proposals/proposal_m/footer.erb +1 -1
  17. data/app/cells/decidim/proposals/proposal_m_cell.rb +6 -1
  18. data/app/commands/decidim/proposals/accept_access_to_collaborative_draft.rb +3 -3
  19. data/app/commands/decidim/proposals/admin/answer_proposal.rb +2 -1
  20. data/app/commands/decidim/proposals/admin/create_proposal.rb +7 -7
  21. data/app/commands/decidim/proposals/admin/import_participatory_text.rb +8 -8
  22. data/app/commands/decidim/proposals/admin/update_proposal.rb +13 -6
  23. data/app/commands/decidim/proposals/admin/update_proposal_category.rb +1 -1
  24. data/app/commands/decidim/proposals/create_collaborative_draft.rb +6 -3
  25. data/app/commands/decidim/proposals/create_proposal.rb +25 -11
  26. data/app/commands/decidim/proposals/endorse_proposal.rb +1 -2
  27. data/app/commands/decidim/proposals/hashtags_methods.rb +36 -0
  28. data/app/commands/decidim/proposals/publish_collaborative_draft.rb +39 -34
  29. data/app/commands/decidim/proposals/publish_proposal.rb +13 -17
  30. data/app/commands/decidim/proposals/reject_access_to_collaborative_draft.rb +2 -3
  31. data/app/commands/decidim/proposals/request_access_to_collaborative_draft.rb +1 -2
  32. data/app/commands/decidim/proposals/update_collaborative_draft.rb +11 -8
  33. data/app/commands/decidim/proposals/update_proposal.rb +37 -13
  34. data/app/commands/decidim/proposals/withdraw_collaborative_draft.rb +3 -3
  35. data/app/commands/decidim/proposals/withdraw_proposal.rb +14 -1
  36. data/app/controllers/decidim/proposals/admin/participatory_texts_controller.rb +2 -1
  37. data/app/controllers/decidim/proposals/admin/proposals_controller.rb +9 -1
  38. data/app/controllers/decidim/proposals/collaborative_drafts_controller.rb +8 -0
  39. data/app/controllers/decidim/proposals/proposals_controller.rb +64 -27
  40. data/app/controllers/decidim/proposals/versions_controller.rb +5 -1
  41. data/app/events/decidim/proposals/accepted_proposal_event.rb +8 -0
  42. data/app/events/decidim/proposals/evaluating_proposal_event.rb +3 -0
  43. data/app/events/decidim/proposals/proposal_endorsed_event.rb +4 -0
  44. data/app/events/decidim/proposals/publish_proposal_event.rb +4 -0
  45. data/app/events/decidim/proposals/rejected_proposal_event.rb +8 -0
  46. data/app/forms/decidim/proposals/admin/import_participatory_text_form.rb +4 -0
  47. data/app/forms/decidim/proposals/admin/proposal_form.rb +49 -0
  48. data/app/forms/decidim/proposals/collaborative_draft_form.rb +2 -0
  49. data/app/forms/decidim/proposals/proposal_form.rb +32 -0
  50. data/app/helpers/decidim/proposals/admin/proposals_helper.rb +19 -0
  51. data/app/helpers/decidim/proposals/application_helper.rb +48 -12
  52. data/app/helpers/decidim/proposals/control_version_helper.rb +61 -0
  53. data/app/helpers/decidim/proposals/participatory_texts_helper.rb +8 -0
  54. data/app/helpers/decidim/proposals/proposal_cells_helper.rb +7 -1
  55. data/app/helpers/decidim/proposals/proposal_endorsements_helper.rb +8 -6
  56. data/app/jobs/decidim/proposals/notify_proposals_mentioned_job.rb +2 -2
  57. data/app/jobs/decidim/proposals/settings_change_job.rb +8 -6
  58. data/app/models/decidim/proposals/collaborative_draft.rb +3 -0
  59. data/app/models/decidim/proposals/proposal.rb +20 -8
  60. data/app/permissions/decidim/proposals/admin/permissions.rb +1 -1
  61. data/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb +2 -1
  62. data/app/presenters/decidim/proposals/collaborative_draft_presenter.rb +15 -2
  63. data/app/presenters/decidim/proposals/official_author_presenter.rb +4 -0
  64. data/app/presenters/decidim/proposals/proposal_presenter.rb +10 -14
  65. data/app/queries/decidim/proposals/metrics/endorsements_metric_manage.rb +54 -0
  66. data/app/queries/decidim/proposals/metrics/proposal_followers_metric_measure.rb +56 -0
  67. data/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb +64 -0
  68. data/app/services/decidim/proposals/proposal_search.rb +46 -5
  69. data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_proposals.html.erb +1 -1
  70. data/app/views/decidim/proposals/admin/proposals/_form.html.erb +43 -2
  71. data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +6 -2
  72. data/app/views/decidim/proposals/admin/proposals/edit.html.erb +1 -1
  73. data/app/views/decidim/proposals/admin/proposals/new.html.erb +1 -1
  74. data/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb +81 -0
  75. data/app/views/decidim/proposals/collaborative_drafts/complete.html.erb +1 -49
  76. data/app/views/decidim/proposals/collaborative_drafts/edit.html.erb +1 -29
  77. data/app/views/decidim/proposals/collaborative_drafts/show.html.erb +5 -5
  78. data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +27 -3
  79. data/app/views/decidim/proposals/proposals/_filters.html.erb +5 -2
  80. data/app/views/decidim/proposals/proposals/_proposal.html.erb +5 -1
  81. data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +2 -2
  82. data/app/views/decidim/proposals/proposals/_vote_button.html.erb +39 -35
  83. data/app/views/decidim/proposals/proposals/_votes_count.html.erb +16 -12
  84. data/app/views/decidim/proposals/proposals/new.html.erb +1 -1
  85. data/app/views/decidim/proposals/proposals/participatory_texts/_index.html.erb +19 -0
  86. data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb +46 -0
  87. data/app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb +41 -0
  88. data/app/views/decidim/proposals/proposals/participatory_texts/_view_index.html.erb +10 -0
  89. data/app/views/decidim/proposals/proposals/participatory_texts/participatory_text.html.erb +15 -0
  90. data/app/views/decidim/proposals/proposals/show.html.erb +45 -4
  91. data/app/views/decidim/proposals/versions/_version.html.erb +2 -2
  92. data/app/views/decidim/proposals/versions/index.html.erb +1 -1
  93. data/app/views/decidim/proposals/versions/show.html.erb +2 -2
  94. data/config/locales/ca.yml +87 -33
  95. data/config/locales/de.yml +87 -36
  96. data/config/locales/en.yml +87 -33
  97. data/config/locales/es-PY.yml +87 -33
  98. data/config/locales/es.yml +88 -34
  99. data/config/locales/eu.yml +87 -33
  100. data/config/locales/fi-pl.yml +87 -33
  101. data/config/locales/fi.yml +87 -33
  102. data/config/locales/fr.yml +87 -33
  103. data/config/locales/gl.yml +87 -33
  104. data/config/locales/hu.yml +87 -33
  105. data/config/locales/id-ID.yml +84 -30
  106. data/config/locales/it.yml +87 -33
  107. data/config/locales/nl.yml +87 -33
  108. data/config/locales/pl.yml +87 -33
  109. data/config/locales/pt-BR.yml +87 -33
  110. data/config/locales/pt.yml +87 -33
  111. data/config/locales/ru.yml +21 -38
  112. data/config/locales/sv.yml +87 -33
  113. data/config/locales/tr-TR.yml +86 -32
  114. data/config/locales/uk.yml +21 -38
  115. data/db/migrate/20181026073215_add_created_in_meeting.rb +7 -0
  116. data/lib/decidim/proposals.rb +2 -0
  117. data/lib/decidim/proposals/component.rb +74 -0
  118. data/lib/decidim/proposals/doc_to_markdown.rb +40 -0
  119. data/lib/decidim/proposals/engine.rb +52 -35
  120. data/lib/decidim/proposals/odt_to_markdown.rb +46 -0
  121. data/lib/decidim/proposals/proposal_serializer.rb +29 -13
  122. data/lib/decidim/proposals/test/factories.rb +76 -0
  123. data/lib/decidim/proposals/version.rb +1 -1
  124. metadata +56 -20
  125. data/app/views/decidim/participatory_spaces/_highlighted_proposals.html.erb +0 -15
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "doc2text"
4
+ require "tempfile"
5
+
6
+ module Decidim
7
+ module Proposals
8
+ # This class parses a participatory text document in markdown and
9
+ # produces Proposals in the form of sections and articles.
10
+ #
11
+ # This implementation uses Redcarpet Base renderer.
12
+ # Redcarpet::Render::Base performs a callback for every block it finds, what MarkdownToProposals
13
+ # does is to implement callbacks for the blocks which it is interested in performing some actions.
14
+ #
15
+ class DocToMarkdown
16
+ MARKDOWN_MIME_TYPE = "text/markdown"
17
+ ODT_MIME_TYPE = "application/vnd.oasis.opendocument.text"
18
+ DOCX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
19
+
20
+ # Public: Initializes the serializer with a proposal.
21
+ def initialize(doc, mime_type)
22
+ @doc = doc
23
+ @transformer = case mime_type
24
+ # when MARKDOWN_MIME_TYPE
25
+ # no transformer required
26
+ when ODT_MIME_TYPE
27
+ # convert libreoffice odt to markdown
28
+ OdtToMarkdown.new(doc)
29
+ when DOCX_MIME_TYPE
30
+ # convert word 2013 docx to markdown
31
+ DocxToMarkdown.new(doc)
32
+ end
33
+ end
34
+
35
+ def to_md
36
+ @transformer ? @transformer.to_md : @doc
37
+ end
38
+ end
39
+ end
40
+ end
@@ -32,6 +32,7 @@ module Decidim
32
32
  end
33
33
  resource :proposal_vote, only: [:create, :destroy]
34
34
  resource :proposal_widget, only: :show, path: "embed"
35
+ resources :versions, only: [:show, :index]
35
36
  end
36
37
  resources :collaborative_drafts, except: [:destroy] do
37
38
  get :compare, on: :collection
@@ -62,21 +63,7 @@ module Decidim
62
63
 
63
64
  initializer "decidim_proposals.view_hooks" do
64
65
  Decidim.view_hooks.register(:participatory_space_highlighted_elements, priority: Decidim::ViewHooks::MEDIUM_PRIORITY) do |view_context|
65
- published_components = Decidim::Component.where(participatory_space: view_context.current_participatory_space).published
66
- proposals = Decidim::Proposals::Proposal.published.not_hidden.except_withdrawn
67
- .where(component: published_components)
68
- .order_randomly(rand * 2 - 1)
69
- .limit(Decidim::Proposals.config.participatory_space_highlighted_proposals_limit)
70
-
71
- next unless proposals.any?
72
-
73
- view_context.extend Decidim::Proposals::ApplicationHelper
74
- view_context.render(
75
- partial: "decidim/participatory_spaces/highlighted_proposals",
76
- locals: {
77
- proposals: proposals
78
- }
79
- )
66
+ view_context.cell("decidim/proposals/highlighted_proposals", view_context.current_participatory_space)
80
67
  end
81
68
 
82
69
  if defined? Decidim::ParticipatoryProcesses
@@ -191,26 +178,56 @@ module Decidim
191
178
  end
192
179
 
193
180
  initializer "decidim_proposals.register_metrics" do
194
- Decidim.metrics_registry.register(
195
- :proposals,
196
- "Decidim::Proposals::Metrics::ProposalsMetricManage",
197
- Decidim::MetricRegistry::HIGHLIGHTED,
198
- 2
199
- )
200
-
201
- Decidim.metrics_registry.register(
202
- :accepted_proposals,
203
- "Decidim::Proposals::Metrics::AcceptedProposalsMetricManage",
204
- Decidim::MetricRegistry::NOT_HIGHLIGHTED,
205
- 3
206
- )
207
-
208
- Decidim.metrics_registry.register(
209
- :votes,
210
- "Decidim::Proposals::Metrics::VotesMetricManage",
211
- Decidim::MetricRegistry::HIGHLIGHTED,
212
- 3
213
- )
181
+ Decidim.metrics_registry.register(:proposals) do |metric_registry|
182
+ metric_registry.manager_class = "Decidim::Proposals::Metrics::ProposalsMetricManage"
183
+
184
+ metric_registry.settings do |settings|
185
+ settings.attribute :highlighted, type: :boolean, default: true
186
+ settings.attribute :scopes, type: :array, default: %w(home participatory_process)
187
+ settings.attribute :weight, type: :integer, default: 2
188
+ settings.attribute :stat_block, type: :string, default: "medium"
189
+ end
190
+ end
191
+
192
+ Decidim.metrics_registry.register(:accepted_proposals) do |metric_registry|
193
+ metric_registry.manager_class = "Decidim::Proposals::Metrics::AcceptedProposalsMetricManage"
194
+
195
+ metric_registry.settings do |settings|
196
+ settings.attribute :highlighted, type: :boolean, default: false
197
+ settings.attribute :scopes, type: :array, default: %w(home participatory_process)
198
+ settings.attribute :weight, type: :integer, default: 3
199
+ settings.attribute :stat_block, type: :string, default: "small"
200
+ end
201
+ end
202
+
203
+ Decidim.metrics_registry.register(:votes) do |metric_registry|
204
+ metric_registry.manager_class = "Decidim::Proposals::Metrics::VotesMetricManage"
205
+
206
+ metric_registry.settings do |settings|
207
+ settings.attribute :highlighted, type: :boolean, default: true
208
+ settings.attribute :scopes, type: :array, default: %w(home participatory_process)
209
+ settings.attribute :weight, type: :integer, default: 3
210
+ settings.attribute :stat_block, type: :string, default: "medium"
211
+ end
212
+ end
213
+
214
+ Decidim.metrics_registry.register(:endorsements) do |metric_registry|
215
+ metric_registry.manager_class = "Decidim::Proposals::Metrics::EndorsementsMetricManage"
216
+
217
+ metric_registry.settings do |settings|
218
+ settings.attribute :highlighted, type: :boolean, default: false
219
+ settings.attribute :scopes, type: :array, default: %w(participatory_process)
220
+ settings.attribute :weight, type: :integer, default: 4
221
+ settings.attribute :stat_block, type: :string, default: "medium"
222
+ end
223
+ end
224
+
225
+ Decidim.metrics_operation.register(:participants, :proposals) do |metric_operation|
226
+ metric_operation.manager_class = "Decidim::Proposals::Metrics::ProposalParticipantsMetricMeasure"
227
+ end
228
+ Decidim.metrics_operation.register(:followers, :proposals) do |metric_operation|
229
+ metric_operation.manager_class = "Decidim::Proposals::Metrics::ProposalFollowersMetricMeasure"
230
+ end
214
231
  end
215
232
  end
216
233
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "doc2text"
4
+ require "tempfile"
5
+
6
+ module Decidim
7
+ module Proposals
8
+ # This class parses a participatory text document in markdown and
9
+ # produces Proposals in the form of sections and articles.
10
+ #
11
+ # This implementation uses Redcarpet Base renderer.
12
+ # Redcarpet::Render::Base performs a callback for every block it finds, what MarkdownToProposals
13
+ # does is to implement callbacks for the blocks which it is interested in performing some actions.
14
+ #
15
+ class OdtToMarkdown
16
+ # Public: Initializes the serializer with a proposal.
17
+ def initialize(doc)
18
+ @doc = doc
19
+ end
20
+
21
+ def to_md
22
+ doc_file = doc_to_tmp_file
23
+ md_file = transform_to_md_file(doc_file)
24
+ md_file.read
25
+ end
26
+
27
+ #-----------------------------------------------------
28
+
29
+ private
30
+
31
+ #-----------------------------------------------------
32
+
33
+ def doc_to_tmp_file
34
+ file = Tempfile.new("doc-to-markdown-odt", encoding: "ascii-8bit")
35
+ file.write(@doc)
36
+ file
37
+ end
38
+
39
+ def transform_to_md_file(doc_file)
40
+ md_file = Tempfile.new
41
+ Doc2Text::Odt::Document.parse_and_save doc_file, md_file
42
+ md_file
43
+ end
44
+ end
45
+ end
46
+ end
@@ -16,23 +16,33 @@ module Decidim
16
16
  # Public: Exports a hash with the serialized data for this proposal.
17
17
  def serialize
18
18
  {
19
- id: @proposal.id,
19
+ id: proposal.id,
20
20
  category: {
21
- id: @proposal.category.try(:id),
22
- name: @proposal.category.try(:name)
21
+ id: proposal.category.try(:id),
22
+ name: proposal.category.try(:name)
23
23
  },
24
24
  scope: {
25
- id: @proposal.scope.try(:id),
26
- name: @proposal.scope.try(:name)
25
+ id: proposal.scope.try(:id),
26
+ name: proposal.scope.try(:name)
27
+ },
28
+ participatory_space: {
29
+ id: proposal.participatory_space.id,
30
+ url: Decidim::ResourceLocatorPresenter.new(proposal.participatory_space).url
27
31
  },
28
- title: present(@proposal).title,
29
- body: present(@proposal).body,
30
- supports: @proposal.proposal_votes_count,
31
- comments: @proposal.comments.count,
32
- published_at: @proposal.published_at,
33
- url: url,
34
32
  component: { id: component.id },
35
- meeting_urls: meetings
33
+ title: present(proposal).title,
34
+ body: present(proposal).body,
35
+ state: proposal.state.to_s,
36
+ reference: proposal.reference,
37
+ supports: proposal.proposal_votes_count,
38
+ endorsements: proposal.endorsements.count,
39
+ comments: proposal.comments.count,
40
+ attachments: proposal.attachments.count,
41
+ followers: proposal.followers.count,
42
+ published_at: proposal.published_at,
43
+ url: url,
44
+ meeting_urls: meetings,
45
+ related_proposals: related_proposals
36
46
  }
37
47
  end
38
48
 
@@ -45,11 +55,17 @@ module Decidim
45
55
  end
46
56
 
47
57
  def meetings
48
- @proposal.linked_resources(:meetings, "proposals_from_meeting").map do |meeting|
58
+ proposal.linked_resources(:meetings, "proposals_from_meeting").map do |meeting|
49
59
  Decidim::ResourceLocatorPresenter.new(meeting).url
50
60
  end
51
61
  end
52
62
 
63
+ def related_proposals
64
+ proposal.linked_resources(:proposals, "copied_from_component").map do |proposal|
65
+ Decidim::ResourceLocatorPresenter.new(proposal).url
66
+ end
67
+ end
68
+
53
69
  def url
54
70
  Decidim::ResourceLocatorPresenter.new(proposal).url
55
71
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "decidim/core/test/factories"
4
4
  require "decidim/participatory_processes/test/factories"
5
+ require "decidim/meetings/test/factories"
5
6
 
6
7
  FactoryBot.define do
7
8
  factory :proposal_component, parent: :component do
@@ -159,6 +160,24 @@ FactoryBot.define do
159
160
  end
160
161
  end
161
162
 
163
+ trait :with_geocoding_and_collaborative_drafts_enabled do
164
+ settings do
165
+ {
166
+ geocoding_enabled: true,
167
+ collaborative_drafts_enabled: true
168
+ }
169
+ end
170
+ end
171
+
172
+ trait :with_attachments_allowed_and_collaborative_drafts_enabled do
173
+ settings do
174
+ {
175
+ attachments_allowed: true,
176
+ collaborative_drafts_enabled: true
177
+ }
178
+ end
179
+ end
180
+
162
181
  trait :with_minimum_votes_per_user do
163
182
  transient do
164
183
  minimum_votes_per_user { 3 }
@@ -170,6 +189,7 @@ FactoryBot.define do
170
189
  }
171
190
  end
172
191
  end
192
+
173
193
  trait :with_participatory_texts_enabled do
174
194
  settings do
175
195
  {
@@ -177,6 +197,48 @@ FactoryBot.define do
177
197
  }
178
198
  end
179
199
  end
200
+
201
+ trait :with_amendments_enabled do
202
+ settings do
203
+ {
204
+ amendments_enabled: true
205
+ }
206
+ end
207
+ end
208
+
209
+ trait :with_amendments_and_participatory_texts_enabled do
210
+ settings do
211
+ {
212
+ participatory_texts_enabled: true,
213
+ amendments_enabled: true
214
+ }
215
+ end
216
+ end
217
+
218
+ trait :with_comments_disabled do
219
+ settings do
220
+ {
221
+ comments_enabled: false
222
+ }
223
+ end
224
+ end
225
+
226
+ trait :with_extra_hashtags do
227
+ transient do
228
+ automatic_hashtags { "AutoHashtag AnotherAutoHashtag" }
229
+ suggested_hashtags { "SuggestedHashtag AnotherSuggestedHashtag" }
230
+ end
231
+
232
+ step_settings do
233
+ {
234
+ participatory_space.active_step.id => {
235
+ automatic_hashtags: automatic_hashtags,
236
+ suggested_hashtags: suggested_hashtags,
237
+ creation_enabled: true
238
+ }
239
+ }
240
+ end
241
+ end
180
242
  end
181
243
 
182
244
  factory :proposal, class: "Decidim::Proposals::Proposal" do
@@ -217,6 +279,14 @@ FactoryBot.define do
217
279
  end
218
280
  end
219
281
 
282
+ trait :official_meeting do
283
+ after :build do |proposal|
284
+ proposal.coauthorships.clear
285
+ component = create(:meeting_component, participatory_space: proposal.component.participatory_space)
286
+ proposal.coauthorships.build(author: build(:meeting, component: component))
287
+ end
288
+ end
289
+
220
290
  trait :evaluating do
221
291
  state { "evaluating" }
222
292
  answered_at { Time.current }
@@ -323,4 +393,10 @@ FactoryBot.define do
323
393
  state { "withdrawn" }
324
394
  end
325
395
  end
396
+
397
+ factory :participatory_text, class: "Decidim::Proposals::ParticipatoryText" do
398
+ title { Faker::Hacker.say_something_smart }
399
+ description { Faker::Lorem.sentences(3).join("\n") }
400
+ component { create(:proposal_component) }
401
+ end
326
402
  end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds decidim-proposals version.
5
5
  module Proposals
6
6
  def self.version
7
- "0.15.2"
7
+ "0.16.0"
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.15.2
4
+ version: 0.16.0
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: 2019-01-08 00:00:00.000000000 Z
13
+ date: 2019-01-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: acts_as_list
@@ -60,28 +60,42 @@ dependencies:
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.15.2
63
+ version: 0.16.0
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.15.2
70
+ version: 0.16.0
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.15.2
77
+ version: 0.16.0
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.15.2
84
+ version: 0.16.0
85
+ - !ruby/object:Gem::Dependency
86
+ name: doc2text
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 0.3.3
92
+ type: :runtime
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 0.3.3
85
99
  - !ruby/object:Gem::Dependency
86
100
  name: kaminari
87
101
  requirement: !ruby/object:Gem::Requirement
@@ -144,84 +158,84 @@ dependencies:
144
158
  requirements:
145
159
  - - '='
146
160
  - !ruby/object:Gem::Version
147
- version: 0.15.2
161
+ version: 0.16.0
148
162
  type: :development
149
163
  prerelease: false
150
164
  version_requirements: !ruby/object:Gem::Requirement
151
165
  requirements:
152
166
  - - '='
153
167
  - !ruby/object:Gem::Version
154
- version: 0.15.2
168
+ version: 0.16.0
155
169
  - !ruby/object:Gem::Dependency
156
170
  name: decidim-assemblies
157
171
  requirement: !ruby/object:Gem::Requirement
158
172
  requirements:
159
173
  - - '='
160
174
  - !ruby/object:Gem::Version
161
- version: 0.15.2
175
+ version: 0.16.0
162
176
  type: :development
163
177
  prerelease: false
164
178
  version_requirements: !ruby/object:Gem::Requirement
165
179
  requirements:
166
180
  - - '='
167
181
  - !ruby/object:Gem::Version
168
- version: 0.15.2
182
+ version: 0.16.0
169
183
  - !ruby/object:Gem::Dependency
170
184
  name: decidim-budgets
171
185
  requirement: !ruby/object:Gem::Requirement
172
186
  requirements:
173
187
  - - '='
174
188
  - !ruby/object:Gem::Version
175
- version: 0.15.2
189
+ version: 0.16.0
176
190
  type: :development
177
191
  prerelease: false
178
192
  version_requirements: !ruby/object:Gem::Requirement
179
193
  requirements:
180
194
  - - '='
181
195
  - !ruby/object:Gem::Version
182
- version: 0.15.2
196
+ version: 0.16.0
183
197
  - !ruby/object:Gem::Dependency
184
198
  name: decidim-dev
185
199
  requirement: !ruby/object:Gem::Requirement
186
200
  requirements:
187
201
  - - '='
188
202
  - !ruby/object:Gem::Version
189
- version: 0.15.2
203
+ version: 0.16.0
190
204
  type: :development
191
205
  prerelease: false
192
206
  version_requirements: !ruby/object:Gem::Requirement
193
207
  requirements:
194
208
  - - '='
195
209
  - !ruby/object:Gem::Version
196
- version: 0.15.2
210
+ version: 0.16.0
197
211
  - !ruby/object:Gem::Dependency
198
212
  name: decidim-meetings
199
213
  requirement: !ruby/object:Gem::Requirement
200
214
  requirements:
201
215
  - - '='
202
216
  - !ruby/object:Gem::Version
203
- version: 0.15.2
217
+ version: 0.16.0
204
218
  type: :development
205
219
  prerelease: false
206
220
  version_requirements: !ruby/object:Gem::Requirement
207
221
  requirements:
208
222
  - - '='
209
223
  - !ruby/object:Gem::Version
210
- version: 0.15.2
224
+ version: 0.16.0
211
225
  - !ruby/object:Gem::Dependency
212
226
  name: decidim-participatory_processes
213
227
  requirement: !ruby/object:Gem::Requirement
214
228
  requirements:
215
229
  - - '='
216
230
  - !ruby/object:Gem::Version
217
- version: 0.15.2
231
+ version: 0.16.0
218
232
  type: :development
219
233
  prerelease: false
220
234
  version_requirements: !ruby/object:Gem::Requirement
221
235
  requirements:
222
236
  - - '='
223
237
  - !ruby/object:Gem::Version
224
- version: 0.15.2
238
+ version: 0.16.0
225
239
  description: A proposals component for decidim's participatory spaces.
226
240
  email:
227
241
  - josepjaume@gmail.com
@@ -242,6 +256,7 @@ files:
242
256
  - app/assets/images/decidim/proposals/icon.svg
243
257
  - app/assets/javascripts/decidim/proposals/add_proposal.js.es6
244
258
  - app/assets/javascripts/decidim/proposals/admin/proposals.es6
259
+ - app/assets/javascripts/decidim/proposals/admin/proposals_form.js.es6
245
260
  - app/assets/javascripts/decidim/proposals/identity_selector_dialog.js.es6
246
261
  - app/assets/javascripts/decidim/proposals/social_share.js
247
262
  - app/assets/javascripts/decidim/proposals/utils.js.es6
@@ -254,8 +269,15 @@ files:
254
269
  - app/cells/decidim/proposals/collaborative_draft_m_cell.rb
255
270
  - app/cells/decidim/proposals/endorsers_list/show.erb
256
271
  - app/cells/decidim/proposals/endorsers_list_cell.rb
272
+ - app/cells/decidim/proposals/highlighted_proposals/show.erb
273
+ - app/cells/decidim/proposals/highlighted_proposals_cell.rb
274
+ - app/cells/decidim/proposals/highlighted_proposals_for_component/show.erb
275
+ - app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb
257
276
  - app/cells/decidim/proposals/irreversible_action_modal/show.erb
258
277
  - app/cells/decidim/proposals/irreversible_action_modal_cell.rb
278
+ - app/cells/decidim/proposals/participatory_text_proposal/buttons.erb
279
+ - app/cells/decidim/proposals/participatory_text_proposal/show.erb
280
+ - app/cells/decidim/proposals/participatory_text_proposal_cell.rb
259
281
  - app/cells/decidim/proposals/proposal_activity_cell.rb
260
282
  - app/cells/decidim/proposals/proposal_cell.rb
261
283
  - app/cells/decidim/proposals/proposal_link_to_collaborative_draft/show.erb
@@ -282,6 +304,7 @@ files:
282
304
  - app/commands/decidim/proposals/create_proposal_export.rb
283
305
  - app/commands/decidim/proposals/destroy_proposal.rb
284
306
  - app/commands/decidim/proposals/endorse_proposal.rb
307
+ - app/commands/decidim/proposals/hashtags_methods.rb
285
308
  - app/commands/decidim/proposals/publish_collaborative_draft.rb
286
309
  - app/commands/decidim/proposals/publish_proposal.rb
287
310
  - app/commands/decidim/proposals/reject_access_to_collaborative_draft.rb
@@ -344,9 +367,11 @@ files:
344
367
  - app/forms/decidim/proposals/proposal_wizard_create_step_form.rb
345
368
  - app/forms/decidim/proposals/reject_access_to_collaborative_draft_form.rb
346
369
  - app/forms/decidim/proposals/request_access_to_collaborative_draft_form.rb
370
+ - app/helpers/decidim/proposals/admin/proposals_helper.rb
347
371
  - app/helpers/decidim/proposals/application_helper.rb
348
372
  - app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
349
373
  - app/helpers/decidim/proposals/collaborative_draft_helper.rb
374
+ - app/helpers/decidim/proposals/control_version_helper.rb
350
375
  - app/helpers/decidim/proposals/map_helper.rb
351
376
  - app/helpers/decidim/proposals/participatory_texts_helper.rb
352
377
  - app/helpers/decidim/proposals/proposal_cells_helper.rb
@@ -375,6 +400,9 @@ files:
375
400
  - app/presenters/decidim/proposals/proposal_presenter.rb
376
401
  - app/queries/decidim/proposals/filtered_proposals.rb
377
402
  - app/queries/decidim/proposals/metrics/accepted_proposals_metric_manage.rb
403
+ - app/queries/decidim/proposals/metrics/endorsements_metric_manage.rb
404
+ - app/queries/decidim/proposals/metrics/proposal_followers_metric_measure.rb
405
+ - app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb
378
406
  - app/queries/decidim/proposals/metrics/proposals_metric_manage.rb
379
407
  - app/queries/decidim/proposals/metrics/votes_metric_manage.rb
380
408
  - app/queries/decidim/proposals/similar_collaborative_drafts.rb
@@ -386,7 +414,6 @@ files:
386
414
  - app/types/decidim/proposals/proposal_type.rb
387
415
  - app/types/decidim/proposals/proposals_type.rb
388
416
  - app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_proposals.html.erb
389
- - app/views/decidim/participatory_spaces/_highlighted_proposals.html.erb
390
417
  - app/views/decidim/proposals/admin/participatory_texts/_article-preview.html.erb
391
418
  - app/views/decidim/proposals/admin/participatory_texts/_bulk-actions.html.erb
392
419
  - app/views/decidim/proposals/admin/participatory_texts/index.html.erb
@@ -413,6 +440,7 @@ files:
413
440
  - app/views/decidim/proposals/collaborative_drafts/_collaborative_drafts.html.erb
414
441
  - app/views/decidim/proposals/collaborative_drafts/_collaborator_requests.html.erb
415
442
  - app/views/decidim/proposals/collaborative_drafts/_count.html.erb
443
+ - app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb
416
444
  - app/views/decidim/proposals/collaborative_drafts/_filters.html.erb
417
445
  - app/views/decidim/proposals/collaborative_drafts/_filters_small_view.html.erb
418
446
  - app/views/decidim/proposals/collaborative_drafts/_new_collaborative_draft_button.html.erb
@@ -456,6 +484,11 @@ files:
456
484
  - app/views/decidim/proposals/proposals/index.html.erb
457
485
  - app/views/decidim/proposals/proposals/index.js.erb
458
486
  - app/views/decidim/proposals/proposals/new.html.erb
487
+ - app/views/decidim/proposals/proposals/participatory_texts/_index.html.erb
488
+ - app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb
489
+ - app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb
490
+ - app/views/decidim/proposals/proposals/participatory_texts/_view_index.html.erb
491
+ - app/views/decidim/proposals/proposals/participatory_texts/participatory_text.html.erb
459
492
  - app/views/decidim/proposals/proposals/preview.html.erb
460
493
  - app/views/decidim/proposals/proposals/show.html.erb
461
494
  - app/views/decidim/proposals/versions/_version.html.erb
@@ -520,6 +553,7 @@ files:
520
553
  - db/migrate/20181010114622_add_temporary_votes.rb
521
554
  - db/migrate/20181016132225_add_organization_as_author.rb
522
555
  - db/migrate/20181017084221_make_author_polymorhpic_for_proposal_endorsements.rb
556
+ - db/migrate/20181026073215_add_created_in_meeting.rb
523
557
  - lib/decidim/content_parsers/proposal_parser.rb
524
558
  - lib/decidim/content_renderers/proposal_renderer.rb
525
559
  - lib/decidim/proposals.rb
@@ -528,8 +562,10 @@ files:
528
562
  - lib/decidim/proposals/commentable_collaborative_draft.rb
529
563
  - lib/decidim/proposals/commentable_proposal.rb
530
564
  - lib/decidim/proposals/component.rb
565
+ - lib/decidim/proposals/doc_to_markdown.rb
531
566
  - lib/decidim/proposals/engine.rb
532
567
  - lib/decidim/proposals/markdown_to_proposals.rb
568
+ - lib/decidim/proposals/odt_to_markdown.rb
533
569
  - lib/decidim/proposals/participatory_text_section.rb
534
570
  - lib/decidim/proposals/proposal_serializer.rb
535
571
  - lib/decidim/proposals/test/factories.rb
@@ -554,7 +590,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
554
590
  version: '0'
555
591
  requirements: []
556
592
  rubyforge_project:
557
- rubygems_version: 2.7.7
593
+ rubygems_version: 2.7.6
558
594
  signing_key:
559
595
  specification_version: 4
560
596
  summary: Decidim proposals module