decidim-meetings 0.22.0 → 0.23.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_meetings_manifest.js +1 -0
  3. data/app/assets/javascripts/decidim/meetings/admin/meetings_form.js.es6 +3 -0
  4. data/app/assets/javascripts/decidim/meetings/meetings_form.js.es6 +9 -0
  5. data/app/cells/decidim/meetings/content_blocks/upcoming_events_cell.rb +2 -1
  6. data/app/cells/decidim/meetings/highlighted_meetings_for_component_cell.rb +1 -1
  7. data/app/cells/decidim/meetings/meeting_cell.rb +1 -1
  8. data/app/cells/decidim/meetings/meeting_list_item_cell.rb +2 -2
  9. data/app/cells/decidim/meetings/meeting_m_cell.rb +9 -1
  10. data/app/cells/decidim/meetings/meetings_map/show.erb +0 -2
  11. data/app/cells/decidim/meetings/meetings_map_cell.rb +3 -1
  12. data/app/commands/decidim/meetings/admin/close_meeting.rb +1 -2
  13. data/app/commands/decidim/meetings/admin/copy_meeting.rb +38 -28
  14. data/app/commands/decidim/meetings/admin/create_meeting.rb +36 -24
  15. data/app/commands/decidim/meetings/admin/invite_user_to_join_meeting.rb +2 -1
  16. data/app/commands/decidim/meetings/admin/update_meeting.rb +9 -3
  17. data/app/commands/decidim/meetings/create_meeting.rb +78 -0
  18. data/app/commands/decidim/meetings/update_meeting.rb +94 -0
  19. data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
  20. data/app/controllers/decidim/meetings/admin/meetings_controller.rb +11 -7
  21. data/app/controllers/decidim/meetings/admin/registration_form_controller.rb +4 -0
  22. data/app/controllers/decidim/meetings/meetings_controller.rb +76 -13
  23. data/app/controllers/decidim/meetings/registrations_controller.rb +1 -1
  24. data/app/controllers/decidim/meetings/versions_controller.rb +14 -0
  25. data/app/controllers/decidim/meetings/{meeting_widgets_controller.rb → widgets_controller.rb} +2 -2
  26. data/app/forms/decidim/meetings/admin/meeting_copy_form.rb +2 -8
  27. data/app/forms/decidim/meetings/admin/meeting_form.rb +24 -23
  28. data/app/forms/decidim/meetings/meeting_form.rb +78 -0
  29. data/app/helpers/decidim/meetings/admin/application_helper.rb +1 -6
  30. data/app/helpers/decidim/meetings/application_helper.rb +25 -0
  31. data/app/helpers/decidim/meetings/meetings_helper.rb +12 -0
  32. data/app/models/decidim/meetings/agenda.rb +3 -0
  33. data/app/models/decidim/meetings/agenda_item.rb +3 -0
  34. data/app/models/decidim/meetings/meeting.rb +69 -23
  35. data/app/models/decidim/meetings/minutes.rb +3 -0
  36. data/app/models/decidim/meetings/service.rb +13 -0
  37. data/app/permissions/decidim/meetings/admin/permissions.rb +2 -0
  38. data/app/permissions/decidim/meetings/permissions.rb +20 -0
  39. data/app/presenters/decidim/meetings/admin_log/invite_presenter.rb +5 -1
  40. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +3 -4
  41. data/app/presenters/decidim/meetings/meeting_presenter.rb +7 -3
  42. data/app/presenters/decidim/meetings/official_author_presenter.rb +14 -0
  43. data/app/queries/decidim/meetings/filtered_meetings.rb +1 -1
  44. data/app/services/decidim/meetings/diff_renderer.rb +21 -0
  45. data/app/services/decidim/meetings/meeting_search.rb +3 -25
  46. data/app/types/decidim/meetings/meeting_type.rb +1 -1
  47. data/app/views/decidim/meetings/admin/meeting_copies/_form.html.erb +2 -9
  48. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +4 -11
  49. data/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -1
  50. data/app/views/decidim/meetings/admin/meetings/index.html.erb +4 -2
  51. data/app/views/decidim/meetings/directory/meetings/index.js.erb +11 -4
  52. data/app/views/decidim/meetings/meetings/_count.html.erb +1 -0
  53. data/app/views/decidim/meetings/meetings/_filters.html.erb +8 -10
  54. data/app/views/decidim/meetings/meetings/_form.html.erb +51 -0
  55. data/app/views/decidim/meetings/meetings/edit.html.erb +25 -0
  56. data/app/views/decidim/meetings/meetings/index.html.erb +15 -0
  57. data/app/views/decidim/meetings/meetings/index.js.erb +13 -4
  58. data/app/views/decidim/meetings/meetings/new.html.erb +25 -0
  59. data/app/views/decidim/meetings/meetings/show.html.erb +24 -9
  60. data/app/views/decidim/meetings/versions/index.html.erb +8 -0
  61. data/app/views/decidim/meetings/versions/show.html.erb +10 -0
  62. data/config/locales/am-ET.yml +1 -0
  63. data/config/locales/ar.yml +0 -8
  64. data/config/locales/bg-BG.yml +0 -8
  65. data/config/locales/bg.yml +21 -0
  66. data/config/locales/ca.yml +49 -7
  67. data/config/locales/cs.yml +57 -13
  68. data/config/locales/da.yml +1 -0
  69. data/config/locales/de.yml +113 -71
  70. data/config/locales/el.yml +2 -7
  71. data/config/locales/en.yml +49 -7
  72. data/config/locales/eo.yml +1 -0
  73. data/config/locales/es-MX.yml +49 -7
  74. data/config/locales/es-PY.yml +50 -8
  75. data/config/locales/es.yml +50 -8
  76. data/config/locales/et.yml +1 -0
  77. data/config/locales/eu.yml +0 -8
  78. data/config/locales/fi-plain.yml +49 -7
  79. data/config/locales/fi.yml +168 -126
  80. data/config/locales/fr-CA.yml +57 -7
  81. data/config/locales/fr.yml +57 -7
  82. data/config/locales/gl.yml +3 -7
  83. data/config/locales/hr.yml +1 -0
  84. data/config/locales/hu.yml +2 -7
  85. data/config/locales/id-ID.yml +0 -8
  86. data/config/locales/is-IS.yml +0 -7
  87. data/config/locales/is.yml +228 -0
  88. data/config/locales/it.yml +47 -7
  89. data/config/locales/ja-JP.yml +48 -9
  90. data/config/locales/ja.yml +496 -0
  91. data/config/locales/ko-KR.yml +1 -0
  92. data/config/locales/ko.yml +1 -0
  93. data/config/locales/lt.yml +1 -0
  94. data/config/locales/{lv-LV.yml → lv.yml} +2 -2
  95. data/config/locales/mt.yml +1 -0
  96. data/config/locales/nl.yml +49 -7
  97. data/config/locales/no.yml +34 -8
  98. data/config/locales/om-ET.yml +1 -0
  99. data/config/locales/pl.yml +193 -149
  100. data/config/locales/pt-BR.yml +1 -9
  101. data/config/locales/pt.yml +47 -7
  102. data/config/locales/ro-RO.yml +48 -7
  103. data/config/locales/ru.yml +0 -8
  104. data/config/locales/si-LK.yml +1 -0
  105. data/config/locales/sk.yml +2 -7
  106. data/config/locales/sl.yml +25 -2
  107. data/config/locales/so-SO.yml +1 -0
  108. data/config/locales/sv.yml +56 -8
  109. data/config/locales/sw-KE.yml +1 -0
  110. data/config/locales/ti-ER.yml +1 -0
  111. data/config/locales/tr-TR.yml +154 -98
  112. data/config/locales/uk.yml +0 -7
  113. data/config/locales/vi-VN.yml +1 -0
  114. data/config/locales/vi.yml +1 -0
  115. data/config/locales/zh-CN.yml +496 -0
  116. data/config/locales/zh-TW.yml +1 -0
  117. data/db/migrate/20200526110940_add_author_to_meetings.rb +30 -0
  118. data/db/migrate/20200702123209_create_meeting_services_table.rb +13 -0
  119. data/db/migrate/20200702123210_move_meeting_services_to_own_model.rb +31 -0
  120. data/db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb +9 -0
  121. data/db/migrate/20201016065302_fix_meetings_registration_terms.rb +29 -0
  122. data/db/migrate/20201111133246_add_salt_to_decidim_meetings.rb +8 -0
  123. data/lib/decidim/api/services_interface.rb +1 -7
  124. data/lib/decidim/meetings/admin_engine.rb +2 -0
  125. data/lib/decidim/meetings/component.rb +63 -11
  126. data/lib/decidim/meetings/engine.rb +3 -2
  127. data/lib/decidim/meetings/meeting_serializer.rb +1 -1
  128. data/lib/decidim/meetings/test/factories.rb +45 -8
  129. data/lib/decidim/meetings/version.rb +1 -1
  130. metadata +62 -22
  131. 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