decidim-meetings 0.21.0 → 0.23.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_meetings_manifest.js +2 -0
  3. data/app/assets/images/decidim/gamification/badges/attended_meetings.svg +1 -106
  4. data/app/assets/images/decidim/meetings/icon.svg +1 -5
  5. data/app/assets/javascripts/decidim/meetings/admin/destroy_meeting_alert.js.es6 +16 -0
  6. data/app/assets/javascripts/decidim/meetings/admin/meetings_form.js.es6 +3 -0
  7. data/app/assets/javascripts/decidim/meetings/meetings_form.js.es6 +9 -0
  8. data/app/cells/decidim/meetings/content_blocks/upcoming_events_cell.rb +2 -1
  9. data/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +7 -7
  10. data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +1 -1
  11. data/app/cells/decidim/meetings/join_meeting_button/show.erb +2 -2
  12. data/app/cells/decidim/meetings/meeting_cell.rb +1 -0
  13. data/app/cells/decidim/meetings/meeting_list_item/show.erb +3 -3
  14. data/app/cells/decidim/meetings/meeting_list_item_cell.rb +1 -1
  15. data/app/cells/decidim/meetings/meeting_m/date.erb +1 -1
  16. data/app/cells/decidim/meetings/meeting_m/footer.erb +1 -1
  17. data/app/cells/decidim/meetings/meeting_m/multiple_dates.erb +1 -1
  18. data/app/cells/decidim/meetings/meeting_m_cell.rb +9 -1
  19. data/app/cells/decidim/meetings/meeting_s/show.erb +6 -6
  20. data/app/cells/decidim/meetings/meetings_map/show.erb +0 -2
  21. data/app/cells/decidim/meetings/meetings_map_cell.rb +3 -1
  22. data/app/commands/decidim/meetings/admin/close_meeting.rb +1 -2
  23. data/app/commands/decidim/meetings/admin/copy_meeting.rb +38 -28
  24. data/app/commands/decidim/meetings/admin/create_meeting.rb +36 -24
  25. data/app/commands/decidim/meetings/admin/destroy_meeting.rb +6 -1
  26. data/app/commands/decidim/meetings/admin/invite_user_to_join_meeting.rb +2 -1
  27. data/app/commands/decidim/meetings/admin/update_meeting.rb +9 -3
  28. data/app/commands/decidim/meetings/create_meeting.rb +78 -0
  29. data/app/commands/decidim/meetings/update_meeting.rb +94 -0
  30. data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
  31. data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +2 -0
  32. data/app/controllers/decidim/meetings/admin/meetings_controller.rb +21 -7
  33. data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +4 -0
  34. data/app/controllers/decidim/meetings/meetings_controller.rb +76 -13
  35. data/app/controllers/decidim/meetings/registrations_controller.rb +1 -1
  36. data/app/controllers/decidim/meetings/versions_controller.rb +14 -0
  37. data/app/controllers/decidim/meetings/{meeting_widgets_controller.rb → widgets_controller.rb} +2 -2
  38. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +7 -1
  39. data/app/forms/decidim/meetings/admin/meeting_copy_form.rb +2 -8
  40. data/app/forms/decidim/meetings/admin/meeting_form.rb +24 -23
  41. data/app/forms/decidim/meetings/meeting_form.rb +78 -0
  42. data/app/helpers/decidim/meetings/admin/application_helper.rb +1 -6
  43. data/app/helpers/decidim/meetings/application_helper.rb +26 -0
  44. data/app/helpers/decidim/meetings/map_helper.rb +2 -1
  45. data/app/helpers/decidim/meetings/meetings_helper.rb +13 -1
  46. data/app/models/decidim/meetings/agenda.rb +3 -0
  47. data/app/models/decidim/meetings/agenda_item.rb +3 -0
  48. data/app/models/decidim/meetings/meeting.rb +79 -23
  49. data/app/models/decidim/meetings/minutes.rb +3 -0
  50. data/app/models/decidim/meetings/service.rb +13 -0
  51. data/app/permissions/decidim/meetings/admin/permissions.rb +2 -0
  52. data/app/permissions/decidim/meetings/permissions.rb +20 -0
  53. data/app/presenters/decidim/meetings/admin_log/invite_presenter.rb +5 -1
  54. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +3 -4
  55. data/app/presenters/decidim/meetings/meeting_presenter.rb +21 -6
  56. data/app/presenters/decidim/meetings/official_author_presenter.rb +14 -0
  57. data/app/queries/decidim/meetings/filtered_meetings.rb +1 -1
  58. data/app/queries/decidim/meetings/metrics/meetings_metric_manage.rb +2 -8
  59. data/app/services/decidim/meetings/calendar/meeting_to_event.rb +1 -1
  60. data/app/services/decidim/meetings/diff_renderer.rb +21 -0
  61. data/app/services/decidim/meetings/meeting_search.rb +3 -25
  62. data/app/types/decidim/meetings/meeting_type.rb +1 -1
  63. data/app/views/decidim/meetings/_calendar_modal.html.erb +4 -4
  64. data/app/views/decidim/meetings/admin/invites/index.html.erb +2 -2
  65. data/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +1 -6
  66. data/app/views/decidim/meetings/admin/meeting_closes/proposals_picker.html.erb +1 -0
  67. data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +2 -9
  68. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +5 -12
  69. data/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -1
  70. data/app/views/decidim/meetings/admin/meetings/index.html.erb +22 -3
  71. data/app/views/decidim/meetings/admin/registrations/_form.html.erb +4 -0
  72. data/app/views/decidim/meetings/directory/meetings/index.html.erb +5 -3
  73. data/app/views/decidim/meetings/directory/meetings/index.js.erb +11 -4
  74. data/app/views/decidim/meetings/meetings/_count.html.erb +1 -0
  75. data/app/views/decidim/meetings/meetings/_filters.html.erb +13 -7
  76. data/app/views/decidim/meetings/meetings/_form.html.erb +51 -0
  77. data/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +2 -2
  78. data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +2 -2
  79. data/app/views/decidim/meetings/meetings/_meeting_minutes.html.erb +8 -8
  80. data/app/views/decidim/meetings/meetings/edit.html.erb +25 -0
  81. data/app/views/decidim/meetings/meetings/index.html.erb +16 -1
  82. data/app/views/decidim/meetings/meetings/index.js.erb +13 -4
  83. data/app/views/decidim/meetings/meetings/new.html.erb +25 -0
  84. data/app/views/decidim/meetings/meetings/show.html.erb +32 -8
  85. data/app/views/decidim/meetings/versions/index.html.erb +8 -0
  86. data/app/views/decidim/meetings/versions/show.html.erb +10 -0
  87. data/app/views/decidim/participatory_processes/participatory_process_groups/_meeting.html.erb +2 -2
  88. data/app/views/decidim/participatory_spaces/_conference_venues.html.erb +1 -1
  89. data/app/views/decidim/participatory_spaces/_upcoming_meeting_for_card.html.erb +1 -3
  90. data/config/locales/am-ET.yml +1 -0
  91. data/config/locales/ar.yml +0 -8
  92. data/config/locales/bg-BG.yml +21 -0
  93. data/config/locales/bg.yml +21 -0
  94. data/config/locales/ca.yml +60 -7
  95. data/config/locales/cs.yml +68 -9
  96. data/config/locales/da-DK.yml +1 -0
  97. data/config/locales/da.yml +1 -0
  98. data/config/locales/de.yml +128 -71
  99. data/config/locales/el.yml +448 -0
  100. data/config/locales/en.yml +61 -8
  101. data/config/locales/eo.yml +1 -0
  102. data/config/locales/es-MX.yml +60 -7
  103. data/config/locales/es-PY.yml +61 -8
  104. data/config/locales/es.yml +61 -8
  105. data/config/locales/et-EE.yml +1 -0
  106. data/config/locales/et.yml +1 -0
  107. data/config/locales/eu.yml +0 -8
  108. data/config/locales/fi-plain.yml +60 -7
  109. data/config/locales/fi.yml +183 -130
  110. data/config/locales/fr-CA.yml +504 -0
  111. data/config/locales/fr.yml +60 -7
  112. data/config/locales/ga-IE.yml +1 -0
  113. data/config/locales/gl.yml +3 -7
  114. data/config/locales/hr-HR.yml +1 -0
  115. data/config/locales/hr.yml +1 -0
  116. data/config/locales/hu.yml +11 -7
  117. data/config/locales/id-ID.yml +0 -8
  118. data/config/locales/is-IS.yml +0 -9
  119. data/config/locales/is.yml +228 -0
  120. data/config/locales/it.yml +58 -7
  121. data/config/locales/ja-JP.yml +494 -0
  122. data/config/locales/ja.yml +496 -0
  123. data/config/locales/ko-KR.yml +1 -0
  124. data/config/locales/ko.yml +1 -0
  125. data/config/locales/lt-LT.yml +1 -0
  126. data/config/locales/lt.yml +1 -0
  127. data/config/locales/lv.yml +452 -0
  128. data/config/locales/mt-MT.yml +1 -0
  129. data/config/locales/mt.yml +1 -0
  130. data/config/locales/nl.yml +52 -7
  131. data/config/locales/no.yml +35 -9
  132. data/config/locales/om-ET.yml +1 -0
  133. data/config/locales/pl.yml +210 -147
  134. data/config/locales/pt-BR.yml +2 -10
  135. data/config/locales/pt.yml +232 -177
  136. data/config/locales/ro-RO.yml +500 -0
  137. data/config/locales/ru.yml +0 -8
  138. data/config/locales/si-LK.yml +1 -0
  139. data/config/locales/sk-SK.yml +463 -0
  140. data/config/locales/sk.yml +458 -0
  141. data/config/locales/sl.yml +33 -0
  142. data/config/locales/so-SO.yml +1 -0
  143. data/config/locales/sr-CS.yml +13 -0
  144. data/config/locales/sv.yml +67 -13
  145. data/config/locales/sw-KE.yml +1 -0
  146. data/config/locales/ti-ER.yml +1 -0
  147. data/config/locales/tr-TR.yml +154 -98
  148. data/config/locales/uk.yml +0 -9
  149. data/config/locales/vi-VN.yml +1 -0
  150. data/config/locales/vi.yml +1 -0
  151. data/config/locales/zh-CN.yml +496 -0
  152. data/config/locales/zh-TW.yml +1 -0
  153. data/db/migrate/20200320105922_index_foreign_keys_in_decidim_meetings_registrations.rb +7 -0
  154. data/db/migrate/20200526110940_add_author_to_meetings.rb +30 -0
  155. data/db/migrate/20200702123209_create_meeting_services_table.rb +13 -0
  156. data/db/migrate/20200702123210_move_meeting_services_to_own_model.rb +31 -0
  157. data/db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb +9 -0
  158. data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +29 -0
  159. data/db/migrate/20201111133246_add_salt_to_decidim_meetings.rb +8 -0
  160. data/lib/decidim/api/services_interface.rb +1 -7
  161. data/lib/decidim/meetings/admin_engine.rb +5 -1
  162. data/lib/decidim/meetings/component.rb +63 -11
  163. data/lib/decidim/meetings/engine.rb +3 -6
  164. data/lib/decidim/meetings/meeting_serializer.rb +1 -1
  165. data/lib/decidim/meetings/seeds/city.jpeg +0 -0
  166. data/lib/decidim/meetings/test/factories.rb +46 -8
  167. data/lib/decidim/meetings/version.rb +1 -1
  168. data/lib/tasks/decidim_meetings.rake +16 -0
  169. metadata +88 -23
  170. data/app/presenters/decidim/meetings/admin_log/value_types/organizer_presenter.rb +0 -70
@@ -1,70 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Meetings
5
- module AdminLog
6
- module ValueTypes
7
- # This class presents the given value as a Decidim::Meetings::Organizer. Check
8
- # the `DefaultPresenter` for more info on how value presenters work.
9
- class OrganizerPresenter < Decidim::Log::ValueTypes::DefaultPresenter
10
- include Rails.application.routes.mounted_helpers
11
- include ActionView::Helpers::UrlHelper
12
- # Public: Presents the value as a Decidim::Meetings::Organizer. If the result can
13
- # be found, it shows its title. Otherwise it shows its ID.
14
- #
15
- # Returns an HTML-safe String.
16
- def present
17
- return unless value
18
- return present_organizer if organizer
19
-
20
- I18n.t("not_found", id: value, scope: "decidim.meetings.admin_log.meeting.value_types.organizer_presenter")
21
- end
22
-
23
- private
24
-
25
- def organizer
26
- @organizer ||= Decidim::User.find_by(id: value)
27
- end
28
-
29
- def present_organizer
30
- return content_tag(:span, present_user_name, class: "logs__log__author") if organizer.blank?
31
-
32
- link_to(
33
- present_user_name,
34
- user_path,
35
- class: "logs__log__author",
36
- title: "@" + present_user_nickname,
37
- target: "_blank",
38
- data: {
39
- tooltip: true,
40
- "disable-hover": false
41
- }, rel: "noopener"
42
- )
43
- end
44
-
45
- # Private: Presents the name of the organizer performing the action.
46
- #
47
- # Returns an HTML-safe String.
48
- def present_user_name
49
- organizer.name.html_safe
50
- end
51
-
52
- # Private: Presents the nickname of the organizer performing the action.
53
- #
54
- # Returns an HTML-safe String.
55
- def present_user_nickname
56
- organizer.nickname.html_safe
57
- end
58
-
59
- # Private: Calculates the path for the organizer. Returns the path of the
60
- # user profile. It's a public link.
61
- #
62
- # Returns an HTML-safe String.
63
- def user_path
64
- decidim.profile_path(present_user_nickname)
65
- end
66
- end
67
- end
68
- end
69
- end
70
- end