decidim-meetings 0.23.1 → 0.24.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) 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 +47 -0
  4. data/app/assets/javascripts/decidim/meetings/meetings_form.js.es6 +45 -0
  5. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings/elements.erb +16 -0
  6. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings/heading.erb +1 -0
  7. data/app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb +27 -0
  8. data/app/cells/decidim/meetings/join_meeting_button/show.erb +7 -0
  9. data/app/cells/decidim/meetings/meeting_activity_cell.rb +13 -5
  10. data/app/cells/decidim/meetings/meeting_cell.rb +2 -4
  11. data/app/cells/decidim/meetings/meeting_highlighted_list_item/show.erb +21 -0
  12. data/app/cells/decidim/meetings/meeting_highlighted_list_item_cell.rb +10 -0
  13. data/app/cells/decidim/meetings/meeting_m/address.erb +5 -1
  14. data/app/cells/decidim/meetings/meeting_m_cell.rb +2 -0
  15. data/app/cells/decidim/meetings/meeting_url/show.erb +15 -0
  16. data/app/cells/decidim/meetings/meeting_url_cell.rb +17 -0
  17. data/app/cells/decidim/meetings/reported_content/show.erb +3 -0
  18. data/app/cells/decidim/meetings/reported_content_cell.rb +13 -0
  19. data/app/commands/decidim/meetings/admin/create_meeting.rb +5 -0
  20. data/app/commands/decidim/meetings/admin/invite_user_to_join_meeting.rb +1 -1
  21. data/app/commands/decidim/meetings/admin/update_meeting.rb +5 -0
  22. data/app/commands/decidim/meetings/admin/validate_registration_code.rb +2 -0
  23. data/app/commands/decidim/meetings/close_meeting.rb +66 -0
  24. data/app/commands/decidim/meetings/create_meeting.rb +7 -1
  25. data/app/commands/decidim/meetings/leave_meeting.rb +2 -2
  26. data/app/commands/decidim/meetings/update_meeting.rb +8 -1
  27. data/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
  28. data/app/controllers/decidim/meetings/admin/meeting_closes_controller.rb +2 -2
  29. data/app/controllers/decidim/meetings/directory/meetings_controller.rb +2 -2
  30. data/app/controllers/decidim/meetings/meeting_closes_controller.rb +43 -0
  31. data/app/controllers/decidim/meetings/meetings_controller.rb +10 -6
  32. data/app/forms/decidim/meetings/admin/close_meeting_form.rb +4 -4
  33. data/app/forms/decidim/meetings/admin/meeting_form.rb +62 -4
  34. data/app/forms/decidim/meetings/close_meeting_form.rb +31 -0
  35. data/app/forms/decidim/meetings/meeting_form.rb +71 -3
  36. data/app/helpers/decidim/meetings/application_helper.rb +20 -0
  37. data/app/helpers/decidim/meetings/map_helper.rb +1 -1
  38. data/app/models/decidim/meetings/agenda_item.rb +1 -1
  39. data/app/models/decidim/meetings/meeting.rb +95 -8
  40. data/app/permissions/decidim/meetings/permissions.rb +12 -2
  41. data/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +2 -2
  42. data/app/presenters/decidim/meetings/meeting_presenter.rb +33 -0
  43. data/app/services/decidim/meetings/meeting_search.rb +20 -0
  44. data/app/views/decidim/meetings/admin/invite_join_meeting_mailer/invite.html.erb +1 -1
  45. data/app/views/decidim/meetings/admin/invites/index.html.erb +1 -1
  46. data/app/views/decidim/meetings/admin/meetings/_form.html.erb +31 -1
  47. data/app/views/decidim/meetings/admin/meetings/edit.html.erb +2 -2
  48. data/app/views/decidim/meetings/admin/meetings/index.html.erb +23 -1
  49. data/app/views/decidim/meetings/admin/meetings/new.html.erb +2 -2
  50. data/app/views/decidim/meetings/admin/minutes/edit.html.erb +1 -1
  51. data/app/views/decidim/meetings/admin/registrations/edit.html.erb +20 -18
  52. data/app/views/decidim/meetings/directory/meetings/index.html.erb +1 -0
  53. data/app/views/decidim/meetings/directory/meetings/index.js.erb +0 -3
  54. data/app/views/decidim/meetings/meeting_closes/_form.html.erb +7 -0
  55. data/app/views/decidim/meetings/meeting_closes/edit.html.erb +25 -0
  56. data/app/views/decidim/meetings/meeting_closes/proposals_picker.html.erb +1 -0
  57. data/app/views/decidim/meetings/meetings/_filters.html.erb +6 -0
  58. data/app/views/decidim/meetings/meetings/_filters_small_view.html.erb +1 -1
  59. data/app/views/decidim/meetings/meetings/_form.html.erb +36 -2
  60. data/app/views/decidim/meetings/meetings/_online_meeting_link.html.erb +11 -0
  61. data/app/views/decidim/meetings/meetings/edit.html.erb +1 -1
  62. data/app/views/decidim/meetings/meetings/index.js.erb +0 -3
  63. data/app/views/decidim/meetings/meetings/new.html.erb +1 -1
  64. data/app/views/decidim/meetings/meetings/show.html.erb +31 -25
  65. data/app/views/decidim/meetings/registration_mailer/confirmation.html.erb +3 -1
  66. data/app/views/decidim/participatory_spaces/_upcoming_meeting_for_card.html.erb +1 -1
  67. data/config/locales/ar.yml +0 -7
  68. data/config/locales/ca.yml +48 -9
  69. data/config/locales/cs.yml +52 -13
  70. data/config/locales/de.yml +112 -73
  71. data/config/locales/el.yml +0 -10
  72. data/config/locales/en.yml +48 -9
  73. data/config/locales/es-MX.yml +47 -9
  74. data/config/locales/es-PY.yml +47 -9
  75. data/config/locales/es.yml +47 -9
  76. data/config/locales/eu.yml +0 -7
  77. data/config/locales/fi-plain.yml +46 -7
  78. data/config/locales/fi.yml +179 -140
  79. data/config/locales/fr-CA.yml +48 -9
  80. data/config/locales/fr.yml +50 -11
  81. data/config/locales/gl.yml +0 -7
  82. data/config/locales/hu.yml +0 -10
  83. data/config/locales/id-ID.yml +0 -7
  84. data/config/locales/is-IS.yml +0 -7
  85. data/config/locales/it.yml +0 -9
  86. data/config/locales/ja.yml +0 -9
  87. data/config/locales/lv.yml +0 -10
  88. data/config/locales/nl.yml +44 -8
  89. data/config/locales/no.yml +23 -11
  90. data/config/locales/pl.yml +54 -16
  91. data/config/locales/pt-BR.yml +0 -7
  92. data/config/locales/pt.yml +0 -9
  93. data/config/locales/ro-RO.yml +0 -9
  94. data/config/locales/ru.yml +0 -7
  95. data/config/locales/si-LK.yml +1 -0
  96. data/config/locales/sk.yml +0 -10
  97. data/config/locales/sv.yml +11 -9
  98. data/config/locales/sw-KE.yml +1 -0
  99. data/config/locales/tr-TR.yml +196 -97
  100. data/config/locales/uk.yml +0 -7
  101. data/config/locales/zh-CN.yml +0 -9
  102. data/db/migrate/20180809134748_add_upcoming_events_as_content_block.rb +1 -1
  103. data/db/migrate/20201006140511_add_online_meeting_url.rb +7 -0
  104. data/db/migrate/20201009124057_add_type_of_meeting.rb +7 -0
  105. data/db/migrate/20201016112641_add_registration_type_and_url_to_meetings.rb +19 -0
  106. data/db/migrate/20201111133246_add_salt_to_decidim_meetings.rb +8 -0
  107. data/lib/decidim/api/agenda_item_type.rb +22 -0
  108. data/lib/decidim/api/agenda_type.rb +19 -0
  109. data/lib/decidim/api/linked_resources_interface.rb +7 -6
  110. data/lib/decidim/api/meeting_type.rb +63 -0
  111. data/lib/decidim/api/meetings_type.rb +26 -0
  112. data/lib/decidim/api/minutes_type.rb +20 -0
  113. data/{app/types/decidim/meetings → lib/decidim/api}/service_type.rb +4 -4
  114. data/lib/decidim/api/services_interface.rb +3 -3
  115. data/lib/decidim/meetings.rb +1 -1
  116. data/lib/decidim/meetings/api.rb +6 -0
  117. data/lib/decidim/meetings/component.rb +53 -23
  118. data/lib/decidim/meetings/engine.rb +3 -17
  119. data/lib/decidim/meetings/test/factories.rb +16 -3
  120. data/lib/decidim/meetings/version.rb +1 -1
  121. metadata +49 -43
  122. data/app/types/decidim/meetings/agenda_item_type.rb +0 -28
  123. data/app/types/decidim/meetings/agenda_type.rb +0 -25
  124. data/app/types/decidim/meetings/meeting_type.rb +0 -65
  125. data/app/types/decidim/meetings/meetings_type.rb +0 -32
  126. data/app/types/decidim/meetings/minutes_type.rb +0 -26
  127. data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_meetings.html.erb +0 -15
  128. data/app/views/decidim/participatory_processes/participatory_process_groups/_meeting.html.erb +0 -10
@@ -12,7 +12,7 @@ module Decidim
12
12
  geocoded_meetings = meetings.select(&:geocoded?)
13
13
  geocoded_meetings.map do |meeting|
14
14
  meeting.slice(:latitude, :longitude, :address).merge(title: translated_attribute(meeting.title),
15
- description: translated_attribute(meeting.description),
15
+ description: html_truncate(translated_attribute(meeting.description), length: 200),
16
16
  startTimeDay: l(meeting.start_time, format: "%d"),
17
17
  startTimeMonth: l(meeting.start_time, format: "%B"),
18
18
  startTimeYear: l(meeting.start_time, format: "%Y"),
@@ -14,7 +14,7 @@ module Decidim
14
14
  belongs_to :agenda, -> { order(:position) }, foreign_key: "decidim_agenda_id", class_name: "Decidim::Meetings::Agenda"
15
15
 
16
16
  has_many :agenda_item_children, foreign_key: "parent_id", class_name: "Decidim::Meetings::AgendaItem", inverse_of: :parent, dependent: :destroy
17
- belongs_to :parent, foreign_key: "parent_id", class_name: "Decidim::Meetings::AgendaItem", inverse_of: :agenda_item_children, optional: true
17
+ belongs_to :parent, class_name: "Decidim::Meetings::AgendaItem", inverse_of: :agenda_item_children, optional: true
18
18
 
19
19
  default_scope { order(:position) }
20
20
 
@@ -24,6 +24,9 @@ module Decidim
24
24
  include Decidim::Authorable
25
25
  include Decidim::TranslatableResource
26
26
 
27
+ TYPE_OF_MEETING = %w(in_person online hybrid).freeze
28
+ REGISTRATION_TYPE = %w(registration_disabled on_this_platform on_different_platform).freeze
29
+
27
30
  translatable_fields :title, :description, :location, :location_hints, :closing_report, :registration_terms
28
31
 
29
32
  has_many :registrations, class_name: "Decidim::Meetings::Registration", foreign_key: "decidim_meeting_id", dependent: :destroy
@@ -42,14 +45,47 @@ module Decidim
42
45
  scope :upcoming, -> { where(arel_table[:end_time].gteq(Time.current)) }
43
46
 
44
47
  scope :visible_meeting_for, lambda { |user|
45
- joins("LEFT JOIN decidim_meetings_registrations ON
46
- decidim_meetings_registrations.decidim_meeting_id = #{table_name}.id")
47
- .where("(private_meeting = ? and decidim_meetings_registrations.decidim_user_id = ?)
48
- or private_meeting = ? or (private_meeting = ? and transparent = ?)", true, user, false, true, true).distinct
49
- }
48
+ (all.distinct if user&.admin?) ||
49
+ if user.present?
50
+ spaces = %w(assembly participatory_process)
51
+ spaces << "conference" if defined?(Decidim::Conference)
52
+ user_role_queries = spaces.map do |participatory_space_name|
53
+ "SELECT decidim_components.id FROM decidim_components
54
+ WHERE CONCAT(decidim_components.participatory_space_id, '-', decidim_components.participatory_space_type)
55
+ IN
56
+ (SELECT CONCAT(decidim_#{participatory_space_name}_user_roles.decidim_#{participatory_space_name}_id, '-Decidim::#{participatory_space_name.classify}')
57
+ FROM decidim_#{participatory_space_name}_user_roles WHERE decidim_#{participatory_space_name}_user_roles.decidim_user_id = ?)
58
+ "
59
+ end
60
+
61
+ where("decidim_meetings_meetings.private_meeting = ?
62
+ OR decidim_meetings_meetings.transparent = ?
63
+ OR decidim_meetings_meetings.id IN
64
+ (SELECT decidim_meetings_registrations.decidim_meeting_id FROM decidim_meetings_registrations WHERE decidim_meetings_registrations.decidim_user_id = ?)
65
+ OR decidim_meetings_meetings.decidim_component_id IN
66
+ (SELECT decidim_components.id FROM decidim_components
67
+ WHERE CONCAT(decidim_components.participatory_space_id, '-', decidim_components.participatory_space_type)
68
+ IN
69
+ (SELECT CONCAT(decidim_participatory_space_private_users.privatable_to_id, '-', decidim_participatory_space_private_users.privatable_to_type)
70
+ FROM decidim_participatory_space_private_users WHERE decidim_participatory_space_private_users.decidim_user_id = ?)
71
+ )
72
+ OR decidim_meetings_meetings.decidim_component_id IN
73
+ (
74
+ #{user_role_queries.compact.join(" UNION ")}
75
+ )
76
+ ", false, true, user.id, user.id, *user_role_queries.compact.map { user.id })
77
+ .distinct
78
+ else
79
+ visible
80
+ end
81
+ }
50
82
 
51
83
  scope :visible, -> { where("decidim_meetings_meetings.private_meeting != ? OR decidim_meetings_meetings.transparent = ?", true, true) }
52
84
 
85
+ TYPE_OF_MEETING.each do |type|
86
+ scope type.to_sym, -> { where(type_of_meeting: type.to_sym) }
87
+ end
88
+
53
89
  searchable_fields({
54
90
  scope_id: :decidim_scope_id,
55
91
  participatory_space: { component: :participatory_space },
@@ -60,6 +96,9 @@ module Decidim
60
96
  index_on_create: ->(meeting) { meeting.visible? },
61
97
  index_on_update: ->(meeting) { meeting.visible? })
62
98
 
99
+ # we create a salt for the meeting only on new meetings to prevent changing old IDs for existing (Ether)PADs
100
+ before_create :set_default_salt
101
+
63
102
  # Return registrations of a particular meeting made by users representing a group
64
103
  def user_group_registrations
65
104
  registrations.where.not(decidim_user_group_id: nil)
@@ -88,6 +127,10 @@ module Decidim
88
127
  closed_at.present?
89
128
  end
90
129
 
130
+ def past?
131
+ end_time < Time.current
132
+ end
133
+
91
134
  def has_available_slots?
92
135
  return true if available_slots.zero?
93
136
 
@@ -141,9 +184,8 @@ module Decidim
141
184
  can_participate_in_space?(user) && can_participate_in_meeting?(user)
142
185
  end
143
186
 
144
- def current_user_can_visit_meeting?(current_user)
145
- (private_meeting? && registrations.exists?(decidim_user_id: current_user.try(:id))) ||
146
- !private_meeting? || (private_meeting? && transparent?)
187
+ def current_user_can_visit_meeting?(user)
188
+ Decidim::Meetings::Meeting.visible_meeting_for(user).exists?(id: id)
147
189
  end
148
190
 
149
191
  # Return the duration of the meeting in minutes
@@ -152,6 +194,8 @@ module Decidim
152
194
  end
153
195
 
154
196
  def resource_visible?
197
+ return false if hidden?
198
+
155
199
  !private_meeting? || transparent?
156
200
  end
157
201
 
@@ -187,6 +231,44 @@ module Decidim
187
231
  ResourceLocatorPresenter.new(self).url
188
232
  end
189
233
 
234
+ # Public: Overrides the `reported_attributes` Reportable concern method.
235
+ def reported_attributes
236
+ [:description]
237
+ end
238
+
239
+ # Public: Overrides the `reported_searchable_content_extras` Reportable concern method.
240
+ def reported_searchable_content_extras
241
+ [normalized_author.name]
242
+ end
243
+
244
+ def hybrid_meeting?
245
+ type_of_meeting == "hybrid"
246
+ end
247
+
248
+ def online_meeting?
249
+ type_of_meeting == "online"
250
+ end
251
+
252
+ def registration_disabled?
253
+ registration_type == "registration_disabled"
254
+ end
255
+
256
+ def on_this_platform?
257
+ registration_type == "on_this_platform"
258
+ end
259
+
260
+ def on_different_platform?
261
+ registration_type == "on_different_platform"
262
+ end
263
+
264
+ def has_contributions?
265
+ !!contributions_count && contributions_count.positive?
266
+ end
267
+
268
+ def has_attendees?
269
+ !!attendees_count && attendees_count.positive?
270
+ end
271
+
190
272
  private
191
273
 
192
274
  def can_participate_in_meeting?(user)
@@ -202,6 +284,11 @@ module Decidim
202
284
 
203
285
  invites.exists?(decidim_user_id: user.id)
204
286
  end
287
+
288
+ # salt is used to generate secure hash in pads
289
+ def set_default_salt
290
+ self.salt ||= Tokenizer.random_salt
291
+ end
205
292
  end
206
293
  end
207
294
  end
@@ -23,6 +23,8 @@ module Decidim
23
23
  toggle_allow(can_create_meetings?)
24
24
  when :update
25
25
  toggle_allow(can_update_meeting?)
26
+ when :close
27
+ toggle_allow(can_close_meeting?)
26
28
  when :register
27
29
  toggle_allow(can_register_invitation_meeting?)
28
30
  end
@@ -47,7 +49,7 @@ module Decidim
47
49
 
48
50
  def can_decline_invitation?
49
51
  meeting.registrations_enabled? &&
50
- meeting.invites.where(user: user).exists?
52
+ meeting.invites.exists?(user: user)
51
53
  end
52
54
 
53
55
  def can_create_meetings?
@@ -56,7 +58,15 @@ module Decidim
56
58
 
57
59
  def can_update_meeting?
58
60
  component_settings&.creation_enabled_for_participants? &&
59
- meeting.authored_by?(user)
61
+ meeting.authored_by?(user) &&
62
+ !meeting.closed?
63
+ end
64
+
65
+ def can_close_meeting?
66
+ component_settings&.creation_enabled_for_participants? &&
67
+ meeting.authored_by?(user) &&
68
+ !meeting.closed? &&
69
+ meeting.past?
60
70
  end
61
71
 
62
72
  def can_register_invitation_meeting?
@@ -50,8 +50,8 @@ module Decidim
50
50
  "activemodel.attributes.meeting"
51
51
  end
52
52
 
53
- def has_diff?
54
- action == "close" || super
53
+ def diff_actions
54
+ super + %w(close)
55
55
  end
56
56
  end
57
57
  end
@@ -32,6 +32,39 @@ module Decidim
32
32
  end
33
33
  end
34
34
 
35
+ def location(all_locales: false)
36
+ return unless meeting
37
+
38
+ handle_locales(meeting.location, all_locales) do |content|
39
+ content
40
+ end
41
+ end
42
+
43
+ def location_hints(all_locales: false)
44
+ return unless meeting
45
+
46
+ handle_locales(meeting.location_hints, all_locales) do |content|
47
+ content
48
+ end
49
+ end
50
+
51
+ def registration_terms(all_locales: false)
52
+ return unless meeting
53
+
54
+ handle_locales(meeting.registration_terms, all_locales) do |content|
55
+ content
56
+ end
57
+ end
58
+
59
+ def closing_report(links: false, all_locales: false)
60
+ return unless meeting
61
+
62
+ handle_locales(meeting.closing_report, all_locales) do |content|
63
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(decidim_sanitize(content))
64
+ renderer.render(links: links).html_safe
65
+ end
66
+ end
67
+
35
68
  # Next methods are used for present a Meeting As Proposal Author
36
69
  def name
37
70
  title
@@ -27,6 +27,26 @@ module Decidim
27
27
 
28
28
  query.joins(:component).where(decidim_components: { participatory_space_type: options[:space].classify })
29
29
  end
30
+
31
+ def search_type
32
+ fields = Decidim::Meetings::Meeting::TYPE_OF_MEETING
33
+ filtered = []
34
+ options[:type].each do |inquiry|
35
+ filtered.push(inquiry) if fields.include?(inquiry)
36
+ end
37
+ filtered.size.positive? ? query.where(decidim_meetings_meetings: { type_of_meeting: filtered }) : query
38
+ end
39
+
40
+ # Handle the activity filter
41
+ def search_activity
42
+ case activity
43
+ when "my_meetings"
44
+ query
45
+ .where(decidim_author_id: user.id)
46
+ else
47
+ query
48
+ end
49
+ end
30
50
  end
31
51
  end
32
52
  end
@@ -4,5 +4,5 @@
4
4
  <%= t ".invited_you_to_join_a_meeting", invited_by: @invited_by.name, application: @user.organization.name %>
5
5
  </p>
6
6
 
7
- <p><%= link_to t(".decline", meeting_title: present(@meeting).title),routes.decline_invitation_meeting_registration_path(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %>
7
+ <p><%= link_to t(".decline", meeting_title: present(@meeting).title),routes.decline_invitation_meeting_registration_url(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %>
8
8
  <p><%= link_to t(".join", meeting_title: present(@meeting).title),routes.meeting_registration_url(meeting_id: @meeting, participatory_space_id: @meeting.component.participatory_space) %>
@@ -57,7 +57,7 @@
57
57
 
58
58
  <div class="card" id="meeting-invites">
59
59
  <div class="card-divider">
60
- <h2 class="card-title"><%= title %> - <%= t(".invites") %></h2>
60
+ <h2 class="card-title"><%= t(".invites") %></h2>
61
61
  </div>
62
62
 
63
63
  <div class="card-section">
@@ -12,11 +12,18 @@
12
12
  </div>
13
13
 
14
14
  <div class="row column">
15
+ <%= form.select :type_of_meeting,
16
+ @form.type_of_meeting_select,
17
+ { include_blank: t(".select_a_meeting_type") },
18
+ { multiple: false } %>
19
+ </div>
20
+
21
+ <div class="field" data-meeting-type="in_person">
15
22
  <%= form.geocoding_field :address %>
16
23
  <p class="help-text"><%= t(".address_help") %></p>
17
24
  </div>
18
25
 
19
- <div class="row column">
26
+ <div class="field" data-meeting-type="in_person">
20
27
  <%= form.translated :text_area, :location %>
21
28
  <p class="help-text"><%= t(".location_help") %></p>
22
29
  </div>
@@ -26,6 +33,11 @@
26
33
  <p class="help-text"><%= t(".location_hints_help") %></p>
27
34
  </div>
28
35
 
36
+ <div class="field" data-meeting-type="online">
37
+ <%= form.text_field :online_meeting_url %>
38
+ <p class="help-text"><%= t(".online_meeting_url_help") %></p>
39
+ </div>
40
+
29
41
  <div class="row">
30
42
  <div class="columns xlarge-6">
31
43
  <%= form.datetime_field :start_time %>
@@ -47,6 +59,24 @@
47
59
  </div>
48
60
  </div>
49
61
 
62
+ <div class="row column">
63
+ <%= form.select :registration_type,
64
+ @form.registration_type_select,
65
+ { include_blank: t(".select_a_registration_type") },
66
+ { multiple: false } %>
67
+ </div>
68
+
69
+ <div class="row column" id="meeting_available_slots">
70
+ <%= form.number_field :available_slots %>
71
+ <p class="help-text"><%= t(".available_slots_help") %></p>
72
+ </div>
73
+
74
+ <div class="field" id="meeting_registration_url">
75
+ <%= form.text_field :registration_url %>
76
+ <p class="help-text"><%= t(".registration_url_help") %></p>
77
+ <label><%= t(".disclaimer", organization: current_component.organization.name) %></label><br>
78
+ </div>
79
+
50
80
  <div class="row column" id="private_meeting">
51
81
  <%= form.check_box :private_meeting %>
52
82
  </div>
@@ -1,5 +1,5 @@
1
- <%= decidim_form_for(@form, url: { action: "update" }, html: { class: "form edit_meeting" }) do |f| %>
2
- <%= render partial: "form", object: f %>
1
+ <%= decidim_form_for(@form, url: { action: "update" }, html: { class: "form meetings_form edit_meeting" }) do |f| %>
2
+ <%= render partial: "form", object: f, locals: { title: t(".title") } %>
3
3
 
4
4
  <div class="button--double form-general-submit">
5
5
  <%= f.submit t(".update") %>
@@ -55,25 +55,45 @@
55
55
 
56
56
  <% if allowed_to? :copy, :meeting, meeting: meeting %>
57
57
  <%= icon_link_to "clipboard", new_meeting_copy_path(meeting), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
58
+ <% else %>
59
+ <span class="action-space icon"></span>
60
+ <% end %>
61
+
62
+ <% if allowed_to? :update, :meeting, meeting: meeting %>
63
+ <% if meeting.registration_disabled? %>
64
+ <%= icon "people", class: "action-icon action-icon--disabled", role: "img" %>
65
+ <% else %>
66
+ <%= icon_link_to "people", meeting.on_this_platform? ? edit_meeting_registrations_path(meeting) : meeting.registration_url, t("actions.registrations", scope: "decidim.meetings"), class: "action-icon--registrations" %>
67
+ <% end %>
58
68
  <% end %>
59
69
 
60
70
  <% if allowed_to? :update, :meeting, meeting: meeting %>
61
71
  <%= icon_link_to "pencil", edit_meeting_path(meeting), t("actions.edit", scope: "decidim.meetings"), class: "action-icon--edit" %>
62
- <%= icon_link_to "people", edit_meeting_registrations_path(meeting), t("actions.registrations", scope: "decidim.meetings"), class: "action-icon--registrations" %>
63
72
  <%= icon_link_to "clock", meeting.minutes.present? ? edit_meeting_minute_path(meeting, meeting.minutes) : new_meeting_minute_path(meeting), t("actions.minutes", scope: "decidim.meetings"), class: "action-icon--minutes" %>
64
73
  <%= icon_link_to "calendar", meeting.agenda.present? ? edit_meeting_agenda_path(meeting, meeting.agenda) : new_meeting_agenda_path(meeting), t("actions.agenda", scope: "decidim.meetings"), class: "action-icon--agenda" %>
74
+ <% else %>
75
+ <span class="action-space icon"></span>
76
+ <span class="action-space icon"></span>
77
+ <span class="action-space icon"></span>
78
+ <span class="action-space icon"></span>
65
79
  <% end %>
66
80
 
67
81
  <% if allowed_to? :close, :meeting, meeting: meeting %>
68
82
  <%= icon_link_to "lock-locked", edit_meeting_meeting_close_path(meeting_id: meeting.id, id: meeting.id), t("actions.close", scope: "decidim.meetings"), class: "action-icon--close" %>
83
+ <% else %>
84
+ <span class="action-space icon"></span>
69
85
  <% end %>
70
86
 
71
87
  <% if allowed_to? :update, :meeting, meeting: meeting %>
72
88
  <%= icon_link_to "folder", meeting_attachment_collections_path(meeting), t("actions.attachment_collections", scope: "decidim.meetings"), class: "action-icon--attachment_collections" %>
89
+ <% else %>
90
+ <span class="action-space icon"></span>
73
91
  <% end %>
74
92
 
75
93
  <% if allowed_to? :update, :meeting, meeting: meeting %>
76
94
  <%= icon_link_to "paperclip", meeting_attachments_path(meeting), t("actions.attachments", scope: "decidim.meetings"), class: "action-icon--attachments" %>
95
+ <% else %>
96
+ <span class="action-space icon"></span>
77
97
  <% end %>
78
98
 
79
99
  <%= resource_permissions_link(meeting) %>
@@ -95,6 +115,8 @@
95
115
  end
96
116
  %>
97
117
  <% end %>
118
+ <% else %>
119
+ <span class="action-space icon"></span>
98
120
  <% end %>
99
121
  </td>
100
122
  </tr>
@@ -1,7 +1,7 @@
1
- <%= decidim_form_for(@form, html: { class: "form new_meeting" }) do |f| %>
1
+ <%= decidim_form_for(@form, html: { class: "form meetings_form new_meeting" }) do |f| %>
2
2
  <%= render partial: "form", object: f, locals: { title: t(".title") } %>
3
3
 
4
4
  <div class="button--double form-general-submit">
5
- <%= f.submit t(".create") %>
5
+ <%= f.submit t(".create") %>
6
6
  </div>
7
7
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <%= decidim_form_for(@form, url: meeting_minute_path(@current_meeting, @minutes), html: { class: "form edit_minutes" }) do |f| %>
2
- <%= render partial: "form", object: f %>
2
+ <%= render partial: "form", object: f, locals: { title: t(".title") } %>
3
3
 
4
4
  <div class="button--double form-general-submit">
5
5
  <%= f.submit t(".update") %>