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
@@ -1,15 +0,0 @@
1
- <% if proposals.any? %>
2
- <section class="section row collapse highlighted_proposals">
3
- <h4 class="section-heading">
4
- <%= t(".proposals") %> <a href="<%= main_component_path(proposals.first.component) %>" class="text-small"><%= t(".see_all_proposals") %></a>
5
- </h4>
6
-
7
- <%= cell(
8
- "decidim/collapsible_list",
9
- proposals,
10
- cell_options: { context: { current_user: current_user } },
11
- list_class: "row small-up-1 medium-up-2 card-grid",
12
- size: proposals.count
13
- ) %>
14
- </section>
15
- <% end %>