decidim-conferences 0.19.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) 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_speaker/show.erb +2 -2
  6. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +9 -10
  7. data/app/cells/decidim/conferences/media_link/show.erb +2 -2
  8. data/app/cells/decidim/conferences/partner_cell.rb +1 -1
  9. data/app/cells/decidim/conferences/photo/show.erb +3 -5
  10. data/app/cells/decidim/conferences/photo_cell.rb +2 -2
  11. data/app/cells/decidim/conferences/photos_list/show.erb +1 -1
  12. data/app/cells/decidim/conferences/registration_type/join_conference.erb +1 -1
  13. data/app/commands/decidim/conferences/admin/create_conference.rb +3 -3
  14. data/app/commands/decidim/conferences/admin/create_conference_admin.rb +2 -1
  15. data/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb +22 -0
  16. data/app/commands/decidim/conferences/admin/update_conference.rb +3 -3
  17. data/app/commands/decidim/conferences/admin/update_conference_admin.rb +2 -1
  18. data/app/controllers/concerns/decidim/conferences/admin/filterable.rb +27 -0
  19. data/app/controllers/decidim/conferences/admin/conference_registrations_controller.rb +2 -1
  20. data/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +2 -1
  21. data/app/controllers/decidim/conferences/admin/conference_user_roles_controller.rb +2 -1
  22. data/app/controllers/decidim/conferences/admin/conferences_controller.rb +4 -4
  23. data/app/controllers/decidim/conferences/admin/media_links_controller.rb +2 -1
  24. data/app/controllers/decidim/conferences/admin/partners_controller.rb +2 -1
  25. data/app/controllers/decidim/conferences/admin/registration_types_controller.rb +2 -1
  26. data/app/events/decidim/conferences/conference_role_assigned_event.rb +30 -0
  27. data/app/jobs/decidim/conferences/admin/send_conference_diploma_job.rb +1 -1
  28. data/app/models/decidim/conference.rb +25 -0
  29. data/app/models/decidim/conference_user_role.rb +1 -1
  30. data/app/permissions/decidim/conferences/permissions.rb +9 -0
  31. data/app/presenters/decidim/conferences/conference_stats_presenter.rb +1 -1
  32. data/app/types/decidim/conferences/conference_media_link_type.rb +19 -0
  33. data/app/types/decidim/conferences/conference_partner_type.rb +20 -0
  34. data/app/types/decidim/conferences/conference_speaker_type.rb +24 -0
  35. data/app/types/decidim/conferences/conference_type.rb +45 -0
  36. data/app/views/decidim/conferences/_order_by_conferences.html.erb +1 -1
  37. data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +2 -2
  38. data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +3 -2
  39. data/app/views/decidim/conferences/admin/conference_user_roles/index.html.erb +1 -0
  40. data/app/views/decidim/conferences/admin/conferences/index.html.erb +7 -3
  41. data/app/views/decidim/conferences/admin/partners/index.html.erb +1 -0
  42. data/app/views/decidim/conferences/admin/registration_types/index.html.erb +1 -0
  43. data/app/views/decidim/conferences/conference_program/_program_item.html.erb +6 -4
  44. data/app/views/decidim/conferences/conference_program/show.html.erb +6 -6
  45. data/app/views/decidim/conferences/conference_registration_mailer/confirmation.html.erb +1 -1
  46. data/app/views/decidim/conferences/conference_registration_mailer/pending_validation.html.erb +1 -1
  47. data/app/views/decidim/conferences/conference_speakers/index.html.erb +1 -1
  48. data/app/views/decidim/conferences/conferences/_partners.html.erb +1 -1
  49. data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +3 -3
  50. data/app/views/decidim/conferences/conferences/show.html.erb +7 -13
  51. data/app/views/decidim/conferences/media/index.html.erb +3 -3
  52. data/app/views/layouts/decidim/_conference_hero.html.erb +4 -8
  53. data/app/views/layouts/decidim/_conferences_nav.html.erb +2 -2
  54. data/app/views/layouts/decidim/admin/conference.html.erb +2 -2
  55. data/app/views/layouts/decidim/conference.html.erb +3 -5
  56. data/config/locales/ar.yml +4 -2
  57. data/config/locales/bg-BG.yml +7 -0
  58. data/config/locales/ca.yml +9 -0
  59. data/config/locales/cs.yml +16 -7
  60. data/config/locales/da-DK.yml +1 -0
  61. data/config/locales/de.yml +9 -0
  62. data/config/locales/el-GR.yml +1 -0
  63. data/config/locales/el.yml +580 -0
  64. data/config/locales/en.yml +9 -0
  65. data/config/locales/es-MX.yml +9 -0
  66. data/config/locales/es-PY.yml +9 -0
  67. data/config/locales/es.yml +9 -0
  68. data/config/locales/et-EE.yml +1 -0
  69. data/config/locales/fi-plain.yml +9 -0
  70. data/config/locales/fi.yml +13 -4
  71. data/config/locales/fr-CA.yml +580 -0
  72. data/config/locales/fr.yml +9 -0
  73. data/config/locales/ga-IE.yml +1 -0
  74. data/config/locales/hr-HR.yml +1 -0
  75. data/config/locales/hu.yml +5 -1
  76. data/config/locales/is-IS.yml +1 -0
  77. data/config/locales/it.yml +168 -159
  78. data/config/locales/ja-JP.yml +575 -0
  79. data/config/locales/lt-LT.yml +1 -0
  80. data/config/locales/lv-LV.yml +584 -0
  81. data/config/locales/mt-MT.yml +1 -0
  82. data/config/locales/nl.yml +9 -0
  83. data/config/locales/no.yml +566 -0
  84. data/config/locales/pl.yml +192 -182
  85. data/config/locales/pt-BR.yml +1 -1
  86. data/config/locales/pt.yml +238 -229
  87. data/config/locales/ro-RO.yml +536 -0
  88. data/config/locales/sk-SK.yml +585 -0
  89. data/config/locales/sk.yml +585 -0
  90. data/config/locales/sl.yml +37 -0
  91. data/config/locales/sr-CS.yml +19 -0
  92. data/config/locales/sv.yml +22 -13
  93. data/db/migrate/20200320105913_index_foreign_keys_in_decidim_conferences.rb +7 -0
  94. data/db/migrate/20200320105914_index_foreign_keys_in_decidim_conferences_conference_invites.rb +7 -0
  95. data/db/migrate/20200320105915_index_foreign_keys_in_decidim_conferences_conference_registrations.rb +7 -0
  96. data/db/seeds/city.jpeg +0 -0
  97. data/db/seeds/city2.jpeg +0 -0
  98. data/lib/decidim/conferences/participatory_space.rb +10 -1
  99. data/lib/decidim/conferences/test/factories.rb +16 -0
  100. data/lib/decidim/conferences/version.rb +1 -1
  101. metadata +39 -12
  102. 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: a350885d8989dcbed020295a179753dd257966cc6ea5234188a5257dc506d1c6
4
- data.tar.gz: b28820eefb620c35d49d9caabae092c086397940793d510aad55d10c61148278
3
+ metadata.gz: e927274e7911f8f49d468aa0d0102712d9271549757ff974f97b65dee4f12800
4
+ data.tar.gz: f0a57fd51a3fcec014bd6dbb1ddedf1a646d7bd25a9d726248e1de5f254c9914
5
5
  SHA512:
6
- metadata.gz: 33434c66f9cbf62b02131047146097f0283b1e3cd9dc7a5bb11f41ca42589c8de7ceb30349ab23b19738b30286960f3c7f3aa30a1598b6ee08c5a74262a0b7b9
7
- data.tar.gz: e1902107434422ba5f6527297db272b71cb536810e90fbbef7a5cb1d82575f956b4af61fc30e3519d3488ae06928d5dddb00606e8f6e9f05a4b2945c47553007
6
+ metadata.gz: 1fe6c3aea3cd56b87ff3771cb04965d3473f70553fbbef087dcacc7adbe097c3c7fa8501a79b390c29d81ae7781b3b1e3f511e9582ff08cf508d22ff1ac65455
7
+ data.tar.gz: b3f935e675ed4cc6ab24b81243b4b157ca238f57a0eb7674db1e1e44dcc55aa789f341454cb0278a81acae1aef1476024651aa613d63e8a25e48c0b46c13c64c
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>
@@ -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;",
@@ -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
@@ -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
@@ -140,7 +140,7 @@ module Decidim
140
140
  end
141
141
 
142
142
  def link_participatory_processes
143
- @conference.link_participatory_spaces_resources(participatory_processes, "included_participatory_processes")
143
+ @conference.link_participatory_space_resources(participatory_processes, "included_participatory_processes")
144
144
  end
145
145
 
146
146
  def assemblies
@@ -148,7 +148,7 @@ module Decidim
148
148
  end
149
149
 
150
150
  def link_assemblies
151
- @conference.link_participatory_spaces_resources(assemblies, "included_assemblies")
151
+ @conference.link_participatory_space_resources(assemblies, "included_assemblies")
152
152
  end
153
153
 
154
154
  def consultations
@@ -157,7 +157,7 @@ module Decidim
157
157
  end
158
158
 
159
159
  def link_consultations
160
- @conference.link_participatory_spaces_resources(consultations, "included_consultations")
160
+ @conference.link_participatory_space_resources(consultations, "included_consultations")
161
161
  end
162
162
  end
163
163
  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
 
@@ -6,11 +6,12 @@ module Decidim
6
6
  # Controller that allows managing conference media links.
7
7
  class MediaLinksController < Decidim::Conferences::Admin::ApplicationController
8
8
  include Concerns::ConferenceAdmin
9
+ include Decidim::Paginable
9
10
 
10
11
  def index
11
12
  enforce_permission_to :index, :media_link
12
13
 
13
- @media_links = collection.page(params[:page]).per(15)
14
+ @media_links = paginate(collection)
14
15
  end
15
16
 
16
17
  def new
@@ -7,11 +7,12 @@ module Decidim
7
7
  #
8
8
  class PartnersController < 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, :partner
13
14
 
14
- @partners = collection.page(params[:page]).per(15)
15
+ @partners = paginate(collection)
15
16
  end
16
17
 
17
18
  def new
@@ -8,11 +8,12 @@ module Decidim
8
8
  class RegistrationTypesController < Decidim::Conferences::Admin::ApplicationController
9
9
  include Concerns::ConferenceAdmin
10
10
  include Decidim::ApplicationHelper
11
+ include Decidim::Paginable
11
12
 
12
13
  def index
13
14
  enforce_permission_to :index, :registration_type
14
15
 
15
- @registration_types = collection.page(params[:page]).per(15)
16
+ @registration_types = paginate(collection)
16
17
  end
17
18
 
18
19
  def new
@@ -0,0 +1,30 @@
1
+ # frozen-string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ class ConferenceRoleAssignedEvent < Decidim::Events::SimpleEvent
6
+ include Decidim::Events::NotificationEvent
7
+ include Decidim::Events::AuthorEvent
8
+
9
+ def notification_title
10
+ I18n.t("notification_title", i18n_options).html_safe
11
+ end
12
+
13
+ def i18n_role
14
+ I18n.t(extra["role"], "decidim.admin.models.conference_user_role.roles", default: extra["role"])
15
+ end
16
+
17
+ def i18n_options
18
+ {
19
+ resource_path: resource_path,
20
+ resource_title: resource_title,
21
+ resource_url: resource_url,
22
+ scope: event_name,
23
+ participatory_space_title: participatory_space_title,
24
+ participatory_space_url: participatory_space_url,
25
+ role: i18n_role
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end