decidim-assemblies 0.20.1 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/decidim/assemblies/assembly.svg +1 -3
  3. data/app/assets/javascripts/decidim/assemblies/orgchart.js.es6 +698 -0
  4. data/app/cells/decidim/assemblies/assembly_m/footer.erb +2 -2
  5. data/app/cells/decidim/assemblies/assembly_m_cell.rb +5 -5
  6. data/app/cells/decidim/assemblies/assembly_member/show.erb +4 -4
  7. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb +10 -11
  8. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_cell.rb +1 -0
  9. data/app/commands/decidim/assemblies/admin/create_assemblies_type.rb +45 -0
  10. data/app/commands/decidim/assemblies/admin/create_assembly.rb +1 -2
  11. data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +2 -1
  12. data/app/commands/decidim/assemblies/admin/create_assembly_member.rb +12 -3
  13. data/app/commands/decidim/assemblies/admin/destroy_assemblies_type.rb +45 -0
  14. data/app/commands/decidim/assemblies/admin/import_assembly.rb +72 -0
  15. data/app/commands/decidim/assemblies/admin/notify_role_assigned_to_assembly.rb +22 -0
  16. data/app/commands/decidim/assemblies/admin/update_assemblies_setting.rb +46 -0
  17. data/app/commands/decidim/assemblies/admin/update_assemblies_type.rb +46 -0
  18. data/app/commands/decidim/assemblies/admin/update_assembly.rb +11 -7
  19. data/app/commands/decidim/assemblies/admin/update_assembly_admin.rb +2 -1
  20. data/app/controllers/concerns/decidim/assemblies/admin/filterable.rb +30 -0
  21. data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +8 -23
  22. data/app/controllers/decidim/assemblies/admin/assemblies_settings_controller.rb +49 -0
  23. data/app/controllers/decidim/assemblies/admin/assemblies_types_controller.rb +107 -0
  24. data/app/controllers/decidim/assemblies/admin/assembly_exports_controller.rb +24 -0
  25. data/app/controllers/decidim/assemblies/admin/assembly_imports_controller.rb +31 -0
  26. data/app/controllers/decidim/assemblies/admin/assembly_user_roles_controller.rb +2 -1
  27. data/app/controllers/decidim/assemblies/assemblies_controller.rb +6 -2
  28. data/app/controllers/decidim/assemblies/{assembly_widgets_controller.rb → widgets_controller.rb} +2 -2
  29. data/app/events/decidim/assemblies/create_assembly_member_event.rb +17 -0
  30. data/app/events/decidim/role_assigned_to_assembly_event.rb +28 -0
  31. data/app/forms/decidim/assemblies/admin/assemblies_setting_form.rb +14 -0
  32. data/app/forms/decidim/assemblies/admin/assemblies_type_form.rb +17 -0
  33. data/app/forms/decidim/assemblies/admin/assembly_form.rb +37 -19
  34. data/app/forms/decidim/assemblies/admin/assembly_import_form.rb +83 -0
  35. data/app/forms/decidim/assemblies/admin/assembly_user_role_form.rb +8 -2
  36. data/app/helpers/decidim/assemblies/admin/assemblies_helper.rb +6 -0
  37. data/app/helpers/decidim/assemblies/assemblies_helper.rb +6 -3
  38. data/app/helpers/decidim/assemblies/filter_assemblies_helper.rb +10 -7
  39. data/app/models/decidim/assemblies_setting.rb +17 -0
  40. data/app/models/decidim/assemblies_type.rb +27 -0
  41. data/app/models/decidim/assembly.rb +26 -3
  42. data/app/models/decidim/assembly_user_role.rb +1 -1
  43. data/app/permissions/decidim/assemblies/permissions.rb +60 -2
  44. data/app/presenters/decidim/assemblies/admin_log/assemblies_setting_presenter.rb +27 -0
  45. data/app/presenters/decidim/assemblies/admin_log/assemblies_type_presenter.rb +43 -0
  46. data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +1 -2
  47. data/app/presenters/decidim/assemblies/assembly_presenter.rb +29 -0
  48. data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +1 -1
  49. data/app/presenters/decidim/log/value_types/assembly_type_presenter.rb +29 -0
  50. data/app/queries/decidim/assemblies/filtered_assemblies.rb +2 -2
  51. data/app/queries/decidim/assemblies/parent_assemblies_for_select.rb +42 -0
  52. data/app/serializers/decidim/assemblies/assembly_importer.rb +172 -0
  53. data/app/serializers/decidim/assemblies/assembly_serializer.rb +147 -0
  54. data/app/services/decidim/assemblies/assembly_search.rb +3 -3
  55. data/app/types/decidim/assemblies/assemblies_type_type.rb +17 -0
  56. data/app/types/decidim/assemblies/assembly_member_type.rb +29 -0
  57. data/app/types/decidim/assemblies/assembly_type.rb +67 -0
  58. data/app/views/decidim/assemblies/_filter_by_type.html.erb +11 -7
  59. data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +2 -6
  60. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +18 -4
  61. data/app/views/decidim/assemblies/admin/assemblies_settings/_form.html.erb +10 -0
  62. data/app/views/decidim/assemblies/admin/assemblies_settings/edit.html.erb +6 -0
  63. data/app/views/decidim/assemblies/admin/assemblies_types/_form.html.erb +11 -0
  64. data/app/views/decidim/assemblies/admin/assemblies_types/edit.html.erb +6 -0
  65. data/app/views/decidim/assemblies/admin/assemblies_types/index.html.erb +43 -0
  66. data/app/views/decidim/assemblies/admin/assemblies_types/new.html.erb +7 -0
  67. data/app/views/decidim/assemblies/admin/assembly_imports/_form.html.erb +46 -0
  68. data/app/views/decidim/assemblies/admin/assembly_imports/new.html.erb +7 -0
  69. data/app/views/decidim/assemblies/admin/assembly_members/index.html.erb +30 -30
  70. data/app/views/decidim/assemblies/assemblies/_parent_assemblies.html.erb +2 -2
  71. data/app/views/decidim/assemblies/assemblies/_promoted_assembly.html.erb +3 -3
  72. data/app/views/decidim/assemblies/assemblies/index.html.erb +11 -8
  73. data/app/views/decidim/assemblies/assemblies/show.html.erb +11 -14
  74. data/app/views/decidim/assemblies/assembly_members/index.html.erb +1 -1
  75. data/app/views/layouts/decidim/admin/assemblies.html.erb +22 -0
  76. data/app/views/layouts/decidim/admin/assembly.html.erb +2 -2
  77. data/app/views/layouts/decidim/assembly.html.erb +1 -0
  78. data/config/locales/am-ET.yml +1 -0
  79. data/config/locales/ar.yml +24 -0
  80. data/config/locales/bg-BG.yml +7 -0
  81. data/config/locales/bg.yml +7 -0
  82. data/config/locales/ca.yml +100 -0
  83. data/config/locales/cs.yml +135 -35
  84. data/config/locales/da-DK.yml +1 -0
  85. data/config/locales/da.yml +1 -0
  86. data/config/locales/de.yml +99 -0
  87. data/config/locales/el.yml +475 -0
  88. data/config/locales/en.yml +100 -0
  89. data/config/locales/eo.yml +1 -0
  90. data/config/locales/es-MX.yml +100 -0
  91. data/config/locales/es-PY.yml +100 -0
  92. data/config/locales/es.yml +100 -0
  93. data/config/locales/et-EE.yml +1 -0
  94. data/config/locales/et.yml +1 -0
  95. data/config/locales/eu.yml +11 -0
  96. data/config/locales/fi-plain.yml +100 -0
  97. data/config/locales/fi.yml +104 -4
  98. data/config/locales/fr-CA.yml +478 -0
  99. data/config/locales/fr.yml +100 -0
  100. data/config/locales/ga-IE.yml +1 -0
  101. data/config/locales/gl.yml +11 -0
  102. data/config/locales/hr-HR.yml +1 -0
  103. data/config/locales/hr.yml +1 -0
  104. data/config/locales/hu.yml +85 -2
  105. data/config/locales/id-ID.yml +11 -0
  106. data/config/locales/is-IS.yml +11 -0
  107. data/config/locales/is.yml +263 -0
  108. data/config/locales/it.yml +171 -74
  109. data/config/locales/ja-JP.yml +471 -0
  110. data/config/locales/ja.yml +471 -0
  111. data/config/locales/ko-KR.yml +1 -0
  112. data/config/locales/ko.yml +1 -0
  113. data/config/locales/lt-LT.yml +1 -0
  114. data/config/locales/lt.yml +1 -0
  115. data/config/locales/lv.yml +454 -0
  116. data/config/locales/mt-MT.yml +1 -0
  117. data/config/locales/mt.yml +1 -0
  118. data/config/locales/nl.yml +97 -0
  119. data/config/locales/no.yml +107 -10
  120. data/config/locales/om-ET.yml +1 -0
  121. data/config/locales/pl.yml +250 -151
  122. data/config/locales/pt-BR.yml +12 -1
  123. data/config/locales/pt.yml +217 -118
  124. data/config/locales/ro-RO.yml +441 -0
  125. data/config/locales/ru.yml +11 -0
  126. data/config/locales/sk-SK.yml +168 -0
  127. data/config/locales/sk.yml +172 -0
  128. data/config/locales/sl.yml +283 -0
  129. data/config/locales/so-SO.yml +1 -0
  130. data/config/locales/sr-CS.yml +73 -0
  131. data/config/locales/sv.yml +188 -88
  132. data/config/locales/ti-ER.yml +1 -0
  133. data/config/locales/tr-TR.yml +30 -0
  134. data/config/locales/uk.yml +11 -0
  135. data/config/locales/vi-VN.yml +1 -0
  136. data/config/locales/vi.yml +1 -0
  137. data/config/locales/zh-CN.yml +471 -0
  138. data/config/locales/zh-TW.yml +1 -0
  139. data/db/migrate/20200108113855_create_decidim_assembly_types.rb +19 -0
  140. data/db/migrate/20200108123050_migrate_decidim_assembly_types.rb +83 -0
  141. data/db/migrate/20200320105906_index_foreign_keys_in_decidim_assemblies.rb +7 -0
  142. data/db/migrate/20200320105907_index_foreign_keys_in_decidim_assembly_user_roles.rb +7 -0
  143. data/db/migrate/20200416132109_remove_legacy_decidim_assembly_type.rb +8 -0
  144. data/db/migrate/20200430202456_create_decidim_assemblies_settings.rb +10 -0
  145. data/db/seeds/city.jpeg +0 -0
  146. data/db/seeds/city2.jpeg +0 -0
  147. data/lib/decidim/assemblies/admin_engine.rb +10 -0
  148. data/lib/decidim/assemblies/engine.rb +8 -1
  149. data/lib/decidim/assemblies/participatory_space.rb +29 -15
  150. data/lib/decidim/assemblies/query_extensions.rb +40 -0
  151. data/lib/decidim/assemblies/test/factories.rb +32 -5
  152. data/lib/decidim/assemblies/version.rb +1 -1
  153. metadata +90 -12
  154. data/app/views/decidim/assemblies/assembly_widgets/show.html.erb +0 -11
@@ -1,11 +0,0 @@
1
- <% content_for(:header, "false") %>
2
- <% content_for(:title, translated_attribute(model.title)) %>
3
- <p class="card__desc"><%= decidim_sanitize html_truncate(translated_attribute(model.short_description), length: 630, separator: "...") %></p>
4
- <% content_for(:footer) do %>
5
- <div class="card__support">
6
- <span class="card--process__small"></span>
7
- <%= link_to assembly_path(model), class: "card__button button small" do %>
8
- <%= t("assembly_widgets.show.take_part", scope: "layouts.decidim") %>
9
- <% end %>
10
- </div>
11
- <% end %>