decidim-conferences 0.19.1 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/app/assets/images/decidim/conferences/conference.svg +1 -3
  4. data/app/cells/decidim/conferences/conference_m/footer.erb +1 -1
  5. data/app/cells/decidim/conferences/conference_m_cell.rb +4 -0
  6. data/app/cells/decidim/conferences/conference_speaker/show.erb +2 -2
  7. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +9 -10
  8. data/app/cells/decidim/conferences/media_link/show.erb +2 -2
  9. data/app/cells/decidim/conferences/partner_cell.rb +1 -1
  10. data/app/cells/decidim/conferences/photo/show.erb +3 -5
  11. data/app/cells/decidim/conferences/photo_cell.rb +2 -2
  12. data/app/cells/decidim/conferences/photos_list/show.erb +1 -1
  13. data/app/cells/decidim/conferences/registration_type/join_conference.erb +1 -1
  14. data/app/cells/decidim/conferences/registration_type_cell.rb +2 -2
  15. data/app/commands/decidim/conferences/admin/create_conference.rb +3 -3
  16. data/app/commands/decidim/conferences/admin/create_conference_admin.rb +2 -1
  17. data/app/commands/decidim/conferences/admin/create_partner.rb +9 -9
  18. data/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb +22 -0
  19. data/app/commands/decidim/conferences/admin/update_conference.rb +13 -6
  20. data/app/commands/decidim/conferences/admin/update_conference_admin.rb +2 -1
  21. data/app/controllers/concerns/decidim/conferences/admin/filterable.rb +27 -0
  22. data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +2 -1
  23. data/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +2 -1
  24. data/app/controllers/decidim/conferences/admin/conference_user_roles_controller.rb +2 -1
  25. data/app/controllers/decidim/conferences/admin/conferences_controller.rb +4 -4
  26. data/app/controllers/decidim/conferences/admin/media_links_controller.rb +2 -1
  27. data/app/controllers/decidim/conferences/admin/partners_controller.rb +2 -1
  28. data/app/controllers/decidim/conferences/admin/registration_types_controller.rb +2 -1
  29. data/app/events/decidim/conferences/conference_role_assigned_event.rb +30 -0
  30. data/app/forms/decidim/conferences/admin/conference_form.rb +5 -2
  31. data/app/forms/decidim/conferences/admin/conference_speaker_form.rb +12 -1
  32. data/app/forms/decidim/conferences/admin/diploma_form.rb +6 -2
  33. data/app/forms/decidim/conferences/admin/partner_form.rb +16 -1
  34. data/app/jobs/decidim/conferences/admin/send_conference_diploma_job.rb +1 -1
  35. data/app/models/decidim/conference.rb +41 -1
  36. data/app/models/decidim/conference_speaker.rb +5 -2
  37. data/app/models/decidim/conference_user_role.rb +1 -1
  38. data/app/models/decidim/conferences/media_link.rb +3 -0
  39. data/app/models/decidim/conferences/partner.rb +5 -1
  40. data/app/models/decidim/conferences/registration_type.rb +3 -0
  41. data/app/permissions/decidim/conferences/permissions.rb +9 -0
  42. data/app/presenters/decidim/conferences/conference_stats_presenter.rb +1 -1
  43. data/app/types/decidim/conferences/conference_media_link_type.rb +19 -0
  44. data/app/types/decidim/conferences/conference_partner_type.rb +20 -0
  45. data/app/types/decidim/conferences/conference_speaker_type.rb +24 -0
  46. data/app/types/decidim/conferences/conference_type.rb +45 -0
  47. data/app/views/decidim/conferences/_order_by_conferences.html.erb +1 -1
  48. data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +2 -2
  49. data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +3 -2
  50. data/app/views/decidim/conferences/admin/conference_user_roles/index.html.erb +1 -0
  51. data/app/views/decidim/conferences/admin/conferences/index.html.erb +7 -3
  52. data/app/views/decidim/conferences/admin/partners/index.html.erb +1 -0
  53. data/app/views/decidim/conferences/admin/registration_types/index.html.erb +1 -0
  54. data/app/views/decidim/conferences/conference_program/_program_item.html.erb +6 -4
  55. data/app/views/decidim/conferences/conference_program/show.html.erb +6 -6
  56. data/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +1 -1
  57. data/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +1 -1
  58. data/app/views/decidim/conferences/conference_speakers/index.html.erb +1 -1
  59. data/app/views/decidim/conferences/conferences/_partners.html.erb +1 -1
  60. data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +3 -3
  61. data/app/views/decidim/conferences/conferences/show.html.erb +7 -13
  62. data/app/views/decidim/conferences/media/index.html.erb +3 -3
  63. data/app/views/decidim/conferences/registration_types/index.html.erb +1 -1
  64. data/app/views/layouts/decidim/_conference_hero.html.erb +4 -8
  65. data/app/views/layouts/decidim/_conferences_nav.html.erb +2 -2
  66. data/app/views/layouts/decidim/admin/conference.html.erb +2 -2
  67. data/app/views/layouts/decidim/conference.html.erb +4 -5
  68. data/config/locales/am-ET.yml +1 -0
  69. data/config/locales/ar.yml +4 -2
  70. data/config/locales/bg-BG.yml +7 -0
  71. data/config/locales/bg.yml +7 -0
  72. data/config/locales/ca.yml +10 -0
  73. data/config/locales/cs.yml +20 -10
  74. data/config/locales/da-DK.yml +1 -0
  75. data/config/locales/da.yml +1 -0
  76. data/config/locales/de.yml +9 -0
  77. data/config/locales/el-GR.yml +1 -0
  78. data/config/locales/el.yml +580 -0
  79. data/config/locales/en.yml +10 -0
  80. data/config/locales/eo.yml +1 -0
  81. data/config/locales/es-MX.yml +10 -0
  82. data/config/locales/es-PY.yml +10 -0
  83. data/config/locales/es.yml +10 -0
  84. data/config/locales/et-EE.yml +1 -0
  85. data/config/locales/et.yml +1 -0
  86. data/config/locales/fi-plain.yml +10 -0
  87. data/config/locales/fi.yml +14 -4
  88. data/config/locales/fr-CA.yml +581 -0
  89. data/config/locales/fr.yml +10 -0
  90. data/config/locales/ga-IE.yml +1 -0
  91. data/config/locales/hr-HR.yml +1 -0
  92. data/config/locales/hr.yml +1 -0
  93. data/config/locales/hu.yml +4 -0
  94. data/config/locales/is-IS.yml +1 -0
  95. data/config/locales/is.yml +1 -0
  96. data/config/locales/it.yml +169 -159
  97. data/config/locales/ja-JP.yml +575 -0
  98. data/config/locales/ja.yml +576 -0
  99. data/config/locales/ko-KR.yml +1 -0
  100. data/config/locales/ko.yml +1 -0
  101. data/config/locales/lt-LT.yml +1 -0
  102. data/config/locales/lt.yml +1 -0
  103. data/config/locales/lv.yml +584 -0
  104. data/config/locales/mt-MT.yml +1 -0
  105. data/config/locales/mt.yml +1 -0
  106. data/config/locales/nl.yml +10 -0
  107. data/config/locales/no.yml +470 -7
  108. data/config/locales/om-ET.yml +1 -0
  109. data/config/locales/pl.yml +203 -193
  110. data/config/locales/pt-BR.yml +1 -1
  111. data/config/locales/pt.yml +238 -229
  112. data/config/locales/ro-RO.yml +536 -0
  113. data/config/locales/sk-SK.yml +585 -0
  114. data/config/locales/sk.yml +585 -0
  115. data/config/locales/sl.yml +42 -0
  116. data/config/locales/so-SO.yml +1 -0
  117. data/config/locales/sr-CS.yml +19 -0
  118. data/config/locales/sv.yml +24 -15
  119. data/config/locales/ti-ER.yml +1 -0
  120. data/config/locales/vi-VN.yml +1 -0
  121. data/config/locales/vi.yml +1 -0
  122. data/config/locales/zh-CN.yml +576 -0
  123. data/config/locales/zh-TW.yml +1 -0
  124. data/db/migrate/20200320105913_index_foreign_keys_in_decidim_conferences.rb +7 -0
  125. data/db/migrate/20200320105914_index_foreign_keys_in_decidim_conferences_conference_invites.rb +7 -0
  126. data/db/migrate/20200320105915_index_foreign_keys_in_decidim_conferences_conference_registrations.rb +7 -0
  127. data/db/seeds/city.jpeg +0 -0
  128. data/db/seeds/city2.jpeg +0 -0
  129. data/lib/decidim/conferences/admin_engine.rb +1 -0
  130. data/lib/decidim/conferences/participatory_space.rb +21 -12
  131. data/lib/decidim/conferences/test/factories.rb +19 -3
  132. data/lib/decidim/conferences/version.rb +1 -1
  133. metadata +58 -12
  134. data/app/views/decidim/conferences/conference_widgets/show.html.erb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17b13f7756447bf49686845ee1c035fd843c7187110f1e2fe0c3938d8b42d5eb
4
- data.tar.gz: 0b7c31d1b7feeefb0e7eb727269002479e7bdb57eadf61a0c7bd2cc1c95a5664
3
+ metadata.gz: f1abe7fce04112e52d436ff9d8525b282e07aa0dc21315e041dca2a294e20fb0
4
+ data.tar.gz: 80eec51964b2fe9d03e7dbaadfb70c30f41ba3725c5d7cb706cf767e5b319b07
5
5
  SHA512:
6
- metadata.gz: 42f0d7c52d5f2eb0c555d145505372412fd5e763cc4bc546c7a356bd6bdf774d601f3a620965bed1f068eaa6a1df5986b930cb2771538d6646a2a489d0bde293
7
- data.tar.gz: 8af57513c692428d9c7a9685441bd13470e271b15d4dd0960b5a2c8a0fad6ea4c790434c9f2b7557d9961db5efabe47b6ccf92679c0b0903a021db39147424f6
6
+ metadata.gz: c55f072fecf62705bd252953da7bb5bcb052e0384db7091f63a5f2dccbfa1408d1261c092653f208b83fb2c66067b7f74fc324d8a6ebbf98214a4d9919fbe26b
7
+ data.tar.gz: bbde5bd70266e7eda4e0f379124d49ce1e9c3e73e4faf931f9072719c4e5d5b35865de4fd6e7980f591b683522a9ca4ed90577159d642cc331a2ac43813da300
data/README.md CHANGED
@@ -27,6 +27,8 @@ And then execute:
27
27
 
28
28
  ```bash
29
29
  bundle
30
+ bundle exec rails decidim_conferences:install:migrations
31
+ bundle exec rails db:migrate
30
32
  ```
31
33
 
32
34
  ## Contributing
@@ -1,3 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
2
- <path d="M2.91-.03a1 1 0 0 0-.13.03 1 1 0 0 0-.78 1v2a1 1 0 1 0 2 0v-2a1 1 0 0 0-1.09-1.03zm-2.56 2.03a.5.5 0 0 0-.34.5v.5c0 1.48 1.09 2.69 2.5 2.94v1.06h-.5c-.55 0-1 .45-1 1h4.01c0-.55-.45-1-1-1h-.5v-1.06c1.41-.24 2.5-1.46 2.5-2.94v-.5a.5.5 0 1 0-1 0v.5c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2v-.5a.5.5 0 0 0-.59-.5.5.5 0 0 0-.06 0z" transform="translate(1)"/>
3
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"><path d="M2.91-.03a1 1 0 0 0-.13.03 1 1 0 0 0-.78 1v2a1 1 0 1 0 2 0v-2a1 1 0 0 0-1.09-1.03zm-2.56 2.03a.5.5 0 0 0-.34.5v.5c0 1.48 1.09 2.69 2.5 2.94v1.06h-.5c-.55 0-1 .45-1 1h4.01c0-.55-.45-1-1-1h-.5v-1.06c1.41-.24 2.5-1.46 2.5-2.94v-.5a.5.5 0 1 0-1 0v.5c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2v-.5a.5.5 0 0 0-.59-.5.5.5 0 0 0-.06 0z" transform="translate(1)"/></svg>
@@ -3,7 +3,7 @@
3
3
  <%= link_to(
4
4
  t(model.cta_button_text_key, scope: "layouts.decidim.conferences.conference"),
5
5
  resource_path,
6
- class: "card__button button button--sc secondary light small"
6
+ class: "card__button button button--sc small"
7
7
  ) %>
8
8
  </div>
9
9
  </div>
@@ -14,6 +14,10 @@ module Decidim
14
14
 
15
15
  private
16
16
 
17
+ def title
18
+ decidim_html_escape(super)
19
+ end
20
+
17
21
  def has_image?
18
22
  true
19
23
  end
@@ -1,7 +1,7 @@
1
1
  <div class="column conference-speaker js-conference">
2
2
  <div class="speaker-img-wrapper">
3
3
  <div class="speaker-img">
4
- <%= image_tag avatar.url %>
4
+ <%= image_tag avatar.url, alt: "speaker-image" %>
5
5
  </div>
6
6
  </div>
7
7
  <div class="speaker-data">
@@ -26,7 +26,7 @@
26
26
  <div class="column medium-6">
27
27
  <div class="speaker-img-wrapper">
28
28
  <div class="speaker-img">
29
- <%= image_tag avatar.url %>
29
+ <%= image_tag avatar.url, alt: "speaker-image" %>
30
30
  </div>
31
31
  </div>
32
32
  <div class="speaker-data">
@@ -6,17 +6,13 @@
6
6
  large-up-4 card-grid">
7
7
  <% highlighted_conferences.each do |conference| %>
8
8
  <div class="column">
9
- <article class="card card--conference card--mini">
10
- <%= link_to decidim_conferences.conference_path(conference), class: "card__link" do %>
11
- <div class="card__image-top"
12
- style="background-image:url(<%= conference.hero_image.url %>)"></div>
13
- <% end %>
9
+ <%= link_to decidim_conferences.conference_path(conference), class: "card card--conference card--mini" do %>
10
+ <div aria-hidden="true" class="card__image-top"
11
+ style="background-image:url(<%= conference.hero_image.url %>)"></div>
14
12
  <div class="card__content">
15
- <%= link_to decidim_conferences.conference_path(conference), class: "card__link" do %>
16
- <h4 class="card__title"><%= translated_attribute conference.title %></h4>
17
- <% end %>
13
+ <span class="card__title card__link"><%= translated_attribute conference.title %></span>
18
14
  </div>
19
- </article>
15
+ <% end %>
20
16
  </div>
21
17
  <% end %>
22
18
  </div>
@@ -25,7 +21,10 @@
25
21
  <div class="row" id="see-all-conferences">
26
22
  <div class="columns small-centered small-12
27
23
  smallmedium-8 medium-6 large-4">
28
- <%= link_to t("see_all_conferences", scope: i18n_scope), decidim_conferences.conferences_path, class: "button expanded hollow button--sc home-section__cta" %>
24
+ <%= link_to t("see_all_conferences", scope: i18n_scope),
25
+ decidim_conferences.conferences_path,
26
+ class: "button expanded hollow button--sc home-section__cta",
27
+ title: t("conferences_button_title", scope: i18n_scope) %>
29
28
  </div>
30
29
  </div>
31
30
  </section>
@@ -1,9 +1,9 @@
1
1
  <li>
2
- <%= icon "external-link" %>
2
+ <%= icon "external-link", role: "img", "aria-hidden": true %>
3
3
  <div>
4
4
  <%= link_to model.link, target: "_blank" do %>
5
5
  <strong><%= translated_attribute(model.title) %> </strong>
6
6
  <% end %>
7
- <div class="text-small"><%= l(model.date, format: :decidim_short_with_month_name_short) %> · <%= model.link %></small>
7
+ <div class="text-small"><%= l(model.date, format: :decidim_short_with_month_name_short) %> · <%= model.link %></div>
8
8
  </div>
9
9
  </li>
@@ -19,7 +19,7 @@ module Decidim
19
19
  def logo
20
20
  return unless model.logo.presence
21
21
 
22
- "<div class='card p-m flex--cc'> #{image_tag model.logo.medium.url} </div>"
22
+ "<div class='card p-m flex--cc'> #{image_tag model.logo.medium.url, alt: "logo"} </div>"
23
23
  end
24
24
  end
25
25
  end
@@ -1,15 +1,13 @@
1
1
  <div class="column">
2
- <article class="card" data-open="media-picture-<%= index %>">
2
+ <div class="card" data-open="media-picture-<%= index %>">
3
3
  <div class="picture__content">
4
4
  <%= image_thumb %>
5
- <h5 class="card__title">
6
- <strong><%= title %></strong>
7
- </h5>
5
+ <strong class="card__title"><%= title %></strong>
8
6
  <div class="text-small">
9
7
  <%= short_description %>
10
8
  </div>
11
9
  </div>
12
- </article>
10
+ </div>
13
11
  <div id="media-picture-<%= index %>" class="reveal picture__modal" data-reveal>
14
12
  <div class="reveal__header">
15
13
  <h3 class="reveal__title"><%= t("conferences.photo.show.photo", scope: "decidim") %></h3>
@@ -18,11 +18,11 @@ module Decidim
18
18
  end
19
19
 
20
20
  def image_thumb
21
- image_tag model.thumbnail_url
21
+ image_tag model.thumbnail_url, alt: t("alt", scope: "decidim.conferences.photo.image.attributes")
22
22
  end
23
23
 
24
24
  def image_big
25
- image_tag model.big_url
25
+ image_tag model.big_url, alt: t("alt", scope: "decidim.conferences.photo.image.attributes")
26
26
  end
27
27
 
28
28
  def title
@@ -1,5 +1,5 @@
1
1
  <div class="section images">
2
- <h4 class="section-heading"><%= t("conferences.photos_list.show.related_photos", scope: "decidim") %></h4>
2
+ <h3 class="section-heading"><%= t("conferences.photos_list.show.related_photos", scope: "decidim") %></h3>
3
3
  <div class="row small-up-1 smallmedium-up-2 card-grid">
4
4
  <% model.each_with_index do |photo, index| %>
5
5
  <%= cell "decidim/conferences/photo", photo, index: index %>
@@ -13,7 +13,7 @@
13
13
  <% else %>
14
14
  <%= render :registration_confirm %>
15
15
  <% if allowed? %>
16
- <%= button_to i18n_join_text, "",
16
+ <%= button_to i18n_join_text, "#",
17
17
  class: button_classes,
18
18
  disabled: !conference.has_available_slots? || conference.has_registration_for?(current_user),
19
19
  style: "margin-bottom: 0;",
@@ -18,11 +18,11 @@ module Decidim
18
18
  delegate :current_user, to: :controller, prefix: false
19
19
 
20
20
  def title
21
- translated_attribute model.title
21
+ decidim_sanitize translated_attribute model.title
22
22
  end
23
23
 
24
24
  def description
25
- translated_attribute model.description
25
+ decidim_sanitize translated_attribute model.description
26
26
  end
27
27
 
28
28
  def price
@@ -85,7 +85,7 @@ module Decidim
85
85
  end
86
86
 
87
87
  def link_participatory_processes
88
- conference.link_participatory_spaces_resources(participatory_processes, "included_participatory_processes")
88
+ conference.link_participatory_space_resources(participatory_processes, "included_participatory_processes")
89
89
  end
90
90
 
91
91
  def assemblies
@@ -93,7 +93,7 @@ module Decidim
93
93
  end
94
94
 
95
95
  def link_assemblies
96
- conference.link_participatory_spaces_resources(assemblies, "included_assemblies")
96
+ conference.link_participatory_space_resources(assemblies, "included_assemblies")
97
97
  end
98
98
 
99
99
  def consultations
@@ -102,7 +102,7 @@ module Decidim
102
102
  end
103
103
 
104
104
  def link_consultations
105
- conference.link_participatory_spaces_resources(consultations, "included_consultations")
105
+ conference.link_participatory_space_resources(consultations, "included_consultations")
106
106
  end
107
107
  end
108
108
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when creating a new conference
7
7
  # admin in the system.
8
- class CreateConferenceAdmin < Rectify::Command
8
+ class CreateConferenceAdmin < NotifyRoleAssignedToConference
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -57,6 +57,7 @@ module Decidim
57
57
  conference: @conference
58
58
  )
59
59
  end
60
+ send_notification user
60
61
  end
61
62
 
62
63
  def existing_user
@@ -49,15 +49,15 @@ module Decidim
49
49
  @partner = Decidim.traceability.create!(
50
50
  Decidim::Conferences::Partner,
51
51
  form.current_user,
52
- form.attributes.slice(
53
- :name,
54
- :weight,
55
- :link,
56
- :partner_type,
57
- :logo,
58
- :remove_avatar
59
- ).merge(
60
- conference: conference
52
+ { conference: conference }.merge(
53
+ form.attributes.slice(
54
+ :name,
55
+ :weight,
56
+ :link,
57
+ :partner_type,
58
+ :logo,
59
+ :remove_avatar
60
+ )
61
61
  ),
62
62
  log_info
63
63
  )
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ module Admin
6
+ # A command to notify users when a role is assigned for a Conference
7
+ class NotifyRoleAssignedToConference < Rectify::Command
8
+ def send_notification(user)
9
+ Decidim::EventsManager.publish(
10
+ event: "decidim.events.conferences.role_assigned",
11
+ event_class: Decidim::Conferences::ConferenceRoleAssignedEvent,
12
+ resource: form.current_participatory_space,
13
+ affected_users: [user],
14
+ extra: {
15
+ role: form.role
16
+ }
17
+ )
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -81,13 +81,20 @@ module Decidim
81
81
  location: form.location,
82
82
  start_date: form.start_date,
83
83
  end_date: form.end_date,
84
- hero_image: form.hero_image,
85
- banner_image: form.banner_image,
86
84
  promoted: form.promoted,
87
85
  scopes_enabled: form.scopes_enabled,
88
86
  scope: form.scope,
89
87
  show_statistics: form.show_statistics
90
- }
88
+ }.merge(uploader_attributes)
89
+ end
90
+
91
+ def uploader_attributes
92
+ {
93
+ hero_image: form.hero_image,
94
+ remove_hero_image: form.remove_hero_image,
95
+ banner_image: form.banner_image,
96
+ remove_banner_image: form.remove_banner_image
97
+ }.delete_if { |_k, val| val.is_a?(Decidim::ApplicationUploader) }
91
98
  end
92
99
 
93
100
  def send_notification_registrations_enabled
@@ -140,7 +147,7 @@ module Decidim
140
147
  end
141
148
 
142
149
  def link_participatory_processes
143
- @conference.link_participatory_spaces_resources(participatory_processes, "included_participatory_processes")
150
+ @conference.link_participatory_space_resources(participatory_processes, "included_participatory_processes")
144
151
  end
145
152
 
146
153
  def assemblies
@@ -148,7 +155,7 @@ module Decidim
148
155
  end
149
156
 
150
157
  def link_assemblies
151
- @conference.link_participatory_spaces_resources(assemblies, "included_assemblies")
158
+ @conference.link_participatory_space_resources(assemblies, "included_assemblies")
152
159
  end
153
160
 
154
161
  def consultations
@@ -157,7 +164,7 @@ module Decidim
157
164
  end
158
165
 
159
166
  def link_consultations
160
- @conference.link_participatory_spaces_resources(consultations, "included_consultations")
167
+ @conference.link_participatory_space_resources(consultations, "included_consultations")
161
168
  end
162
169
  end
163
170
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # A command with all the business logic when updated a participatory
7
7
  # process admin in the system.
8
- class UpdateConferenceAdmin < Rectify::Command
8
+ class UpdateConferenceAdmin < NotifyRoleAssignedToConference
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -45,6 +45,7 @@ module Decidim
45
45
  { role: form.role },
46
46
  log_info
47
47
  )
48
+ send_notification user_role.user
48
49
  end
49
50
  end
50
51
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/concern"
4
+
5
+ module Decidim
6
+ module Conferences
7
+ module Admin
8
+ module Filterable
9
+ extend ActiveSupport::Concern
10
+
11
+ included do
12
+ include Decidim::Admin::Filterable
13
+
14
+ private
15
+
16
+ def base_query
17
+ collection
18
+ end
19
+
20
+ def filters
21
+ [:published_at_null]
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -9,13 +9,14 @@ module Decidim
9
9
  #
10
10
  class ConferenceRegistrationsController < Decidim::Conferences::Admin::ApplicationController
11
11
  include Concerns::ConferenceAdmin
12
+ include Decidim::Paginable
12
13
 
13
14
  helper_method :conference
14
15
 
15
16
  def index
16
17
  enforce_permission_to :read_conference_registrations, :conference, conference: conference
17
18
 
18
- @conference_registrations = Decidim::Conferences::ConferenceRegistration.where(conference: conference).page(params[:page]).per(15)
19
+ @conference_registrations = paginate(Decidim::Conferences::ConferenceRegistration.where(conference: conference))
19
20
  end
20
21
 
21
22
  def export
@@ -8,13 +8,14 @@ module Decidim
8
8
  class ConferenceSpeakersController < Decidim::Conferences::Admin::ApplicationController
9
9
  helper Decidim::Conferences::Admin::ConferenceSpeakersHelper
10
10
  include Concerns::ConferenceAdmin
11
+ include Decidim::Paginable
11
12
 
12
13
  def index
13
14
  enforce_permission_to :index, :conference_speaker
14
15
 
15
16
  @query = params[:q]
16
17
 
17
- @conference_speakers = Decidim::Conferences::Admin::ConferenceSpeakers.for(collection, @query).page(params[:page]).per(15)
18
+ @conference_speakers = paginate(Decidim::Conferences::Admin::ConferenceSpeakers.for(collection, @query))
18
19
  end
19
20
 
20
21
  def new
@@ -7,10 +7,11 @@ module Decidim
7
7
  #
8
8
  class ConferenceUserRolesController < Decidim::Conferences::Admin::ApplicationController
9
9
  include Concerns::ConferenceAdmin
10
+ include Decidim::Paginable
10
11
 
11
12
  def index
12
13
  enforce_permission_to :index, :conference_user_role
13
- @conference_user_roles = collection
14
+ @conference_user_roles = paginate(collection)
14
15
  end
15
16
 
16
17
  def new
@@ -8,10 +8,11 @@ module Decidim
8
8
  class ConferencesController < Decidim::Conferences::Admin::ApplicationController
9
9
  helper_method :current_conference, :current_participatory_space
10
10
  layout "decidim/admin/conferences"
11
+ include Decidim::Conferences::Admin::Filterable
11
12
 
12
13
  def index
13
14
  enforce_permission_to :read, :conference_list
14
- @conferences = collection
15
+ @conferences = filtered_collection
15
16
  end
16
17
 
17
18
  def new
@@ -69,9 +70,8 @@ module Decidim
69
70
  private
70
71
 
71
72
  def current_conference
72
- scope = OrganizationConferences.new(current_user.organization).query
73
- @current_conference ||= scope.where(slug: params[:slug]).or(
74
- scope.where(id: params[:slug])
73
+ @current_conference ||= collection.where(slug: params[:slug]).or(
74
+ collection.where(id: params[:slug])
75
75
  ).first
76
76
  end
77
77