decidim-conferences 0.30.2 → 0.31.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/conferences/content_blocks/highlighted_conferences_settings_form/show.erb +3 -1
  3. data/app/commands/decidim/conferences/admin/create_conference.rb +1 -1
  4. data/app/commands/decidim/conferences/admin/{copy_conference.rb → duplicate_conference.rb} +15 -16
  5. data/app/commands/decidim/conferences/admin/update_conference.rb +2 -2
  6. data/app/controllers/decidim/conferences/admin/conference_duplicates_controller.rb +35 -0
  7. data/app/controllers/decidim/conferences/admin/conference_invites_controller.rb +1 -1
  8. data/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +4 -4
  9. data/app/controllers/decidim/conferences/admin/conferences_controller.rb +3 -3
  10. data/app/controllers/decidim/conferences/admin/diplomas_controller.rb +1 -1
  11. data/app/controllers/decidim/conferences/admin/media_links_controller.rb +2 -2
  12. data/app/controllers/decidim/conferences/admin/partners_controller.rb +2 -2
  13. data/app/controllers/decidim/conferences/admin/registration_types_controller.rb +2 -2
  14. data/app/forms/decidim/conferences/admin/{conference_copy_form.rb → conference_duplicate_form.rb} +3 -3
  15. data/app/forms/decidim/conferences/admin/conference_form.rb +0 -4
  16. data/app/helpers/decidim/conferences/conference_helper.rb +1 -0
  17. data/app/jobs/decidim/conferences/upcoming_conference_notification_job.rb +1 -1
  18. data/app/models/decidim/conference.rb +0 -4
  19. data/app/models/decidim/conferences/registration_type.rb +4 -0
  20. data/app/packs/entrypoints/decidim_conferences_admin.js +0 -1
  21. data/app/packs/src/decidim/conferences/admin/conference_invite_form.js +1 -1
  22. data/app/packs/src/decidim/conferences/admin/conference_speakers.js +1 -1
  23. data/app/packs/src/decidim/conferences/admin/conferences.js +1 -1
  24. data/app/packs/stylesheets/decidim/conferences/conferences.scss +5 -5
  25. data/app/permissions/decidim/conferences/permissions.rb +4 -4
  26. data/app/presenters/decidim/conference_speaker_presenter.rb +0 -4
  27. data/app/presenters/decidim/conferences/admin_log/conference_presenter.rb +0 -1
  28. data/app/presenters/decidim/conferences/conference_stats_presenter.rb +1 -3
  29. data/app/queries/decidim/conferences/admin/conference_speakers.rb +2 -2
  30. data/app/queries/decidim/conferences/conferences_stats_followers_count.rb +14 -0
  31. data/app/queries/decidim/conferences/conferences_stats_participants_count.rb +14 -0
  32. data/app/views/decidim/conferences/admin/{conference_copies → conference_duplicates}/_form.html.erb +3 -3
  33. data/app/views/decidim/conferences/admin/conference_duplicates/new.html.erb +19 -0
  34. data/app/views/decidim/conferences/admin/conference_registrations/index.html.erb +34 -20
  35. data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +51 -22
  36. data/app/views/decidim/conferences/admin/conference_user_roles/index.html.erb +44 -17
  37. data/app/views/decidim/conferences/admin/conferences/_actions.html.erb +108 -33
  38. data/app/views/decidim/conferences/admin/conferences/_conference_row.html.erb +4 -4
  39. data/app/views/decidim/conferences/admin/conferences/_conferences_thead.html.erb +2 -2
  40. data/app/views/decidim/conferences/admin/conferences/_form.html.erb +115 -40
  41. data/app/views/decidim/conferences/admin/conferences/edit.html.erb +0 -8
  42. data/app/views/decidim/conferences/admin/conferences/index.html.erb +2 -2
  43. data/app/views/decidim/conferences/admin/conferences/manage_trash.html.erb +2 -1
  44. data/app/views/decidim/conferences/admin/media_links/index.html.erb +32 -13
  45. data/app/views/decidim/conferences/admin/partners/index.html.erb +33 -14
  46. data/app/views/decidim/conferences/admin/registration_types/index.html.erb +56 -21
  47. data/app/views/decidim/conferences/conference_program/show.html.erb +1 -1
  48. data/app/views/decidim/conferences/conferences/_conference_hero.html.erb +0 -5
  49. data/app/views/decidim/conferences/conferences/show.html.erb +1 -1
  50. data/app/views/layouts/decidim/diploma.html.erb +2 -2
  51. data/config/assets.rb +2 -2
  52. data/config/locales/ar.yml +1 -10
  53. data/config/locales/bg.yml +1 -13
  54. data/config/locales/bs-BA.yml +0 -5
  55. data/config/locales/ca-IT.yml +24 -12
  56. data/config/locales/ca.yml +24 -12
  57. data/config/locales/cs.yml +23 -11
  58. data/config/locales/de.yml +25 -13
  59. data/config/locales/el.yml +1 -10
  60. data/config/locales/en.yml +24 -12
  61. data/config/locales/es-MX.yml +24 -12
  62. data/config/locales/es-PY.yml +24 -12
  63. data/config/locales/es.yml +24 -12
  64. data/config/locales/eu.yml +24 -12
  65. data/config/locales/fi-plain.yml +23 -11
  66. data/config/locales/fi.yml +23 -11
  67. data/config/locales/fr-CA.yml +24 -15
  68. data/config/locales/fr.yml +24 -15
  69. data/config/locales/ga-IE.yml +2 -6
  70. data/config/locales/gl.yml +1 -10
  71. data/config/locales/hu.yml +1 -10
  72. data/config/locales/id-ID.yml +1 -9
  73. data/config/locales/it.yml +1 -10
  74. data/config/locales/ja.yml +25 -13
  75. data/config/locales/lb.yml +1 -7
  76. data/config/locales/lt.yml +1 -10
  77. data/config/locales/lv.yml +1 -10
  78. data/config/locales/nl.yml +1 -10
  79. data/config/locales/no.yml +1 -10
  80. data/config/locales/pl.yml +1 -13
  81. data/config/locales/pt-BR.yml +1 -13
  82. data/config/locales/pt.yml +1 -10
  83. data/config/locales/ro-RO.yml +3 -10
  84. data/config/locales/sk.yml +1 -10
  85. data/config/locales/sl.yml +0 -5
  86. data/config/locales/sr-CS.yml +0 -5
  87. data/config/locales/sv.yml +16 -13
  88. data/config/locales/tr-TR.yml +1 -10
  89. data/config/locales/zh-CN.yml +1 -10
  90. data/config/locales/zh-TW.yml +1 -10
  91. data/db/migrate/20250605094623_remove_hashtag_column_conferences.rb +7 -0
  92. data/lib/decidim/api/conference_registration_type_type.rb +30 -0
  93. data/lib/decidim/api/conference_speaker_type.rb +12 -0
  94. data/lib/decidim/api/conference_type.rb +15 -3
  95. data/lib/decidim/conferences/admin_engine.rb +1 -1
  96. data/lib/decidim/conferences/api.rb +1 -0
  97. data/lib/decidim/conferences/conference_diploma_pdf.rb +1 -1
  98. data/lib/decidim/conferences/engine.rb +5 -3
  99. data/lib/decidim/conferences/participatory_space.rb +14 -0
  100. data/lib/decidim/conferences/seeds.rb +5 -6
  101. data/lib/decidim/conferences/test/factories.rb +2 -2
  102. data/lib/decidim/conferences/version.rb +1 -1
  103. metadata +19 -15
  104. data/app/controllers/decidim/conferences/admin/conference_copies_controller.rb +0 -35
  105. data/app/views/decidim/conferences/admin/conference_copies/new.html.erb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6db2d7011e1e1833c7c2daf06cec7d89bb2477be82ee56b6b549866f0cd51048
4
- data.tar.gz: faf1d8ed82e6792632d119b05b8241f4659af976d5428087c35f70d269f161bd
3
+ metadata.gz: 0b887cd8971831b59eee1f63a2101059c0ea980b297c5b3776cc74ab309bfd84
4
+ data.tar.gz: 6bb90bfa32c0b365910fd1404910992355cc55778cf27c9678c8d382401a458d
5
5
  SHA512:
6
- metadata.gz: 0c69694944b98d42da33468573aa3f24e3c644c169d5b232d486b3577f2c8188d54728e1ffc2d9b13b2e9cfc5c3f640db166d61d65ac7ed87a8ef6f889bac57f
7
- data.tar.gz: fefcb46942129fabeccb62262679bdea34c6ba3bd705799df8836d863afef6a55156bc1f33ff300e35a47fc1964c821b62c7649063c3bf82efc7e2348128b12a
6
+ metadata.gz: 366dee830593889471931933b1c4ebdda1f324b3f819d34a46ffc814671d5743fde99b6461cc3743dd65aff2d51282612d5fd83f1266d7c6a31046252d2eafb0
7
+ data.tar.gz: a061b1609f621df28be8e29f69e3491037637a0fbec22d4cd369d006d6520ec3ebe60507c7543d5515eedc29b85f040f3a2459f2e66edfcfb46dd6e40c8e35bd
@@ -1,3 +1,5 @@
1
1
  <% form.fields_for :settings, form.object.settings do |settings_fields| %>
2
- <%= settings_fields.number_field :max_results, label: %>
2
+ <div class="row column">
3
+ <%= settings_fields.number_field :max_results, label: %>
4
+ </div>
3
5
  <% end %>
@@ -8,7 +8,7 @@ module Decidim
8
8
  class CreateConference < Decidim::Commands::CreateResource
9
9
  fetch_file_attributes :hero_image, :banner_image
10
10
 
11
- fetch_form_attributes :organization, :title, :slogan, :slug, :weight, :hashtag, :description,
11
+ fetch_form_attributes :organization, :title, :slogan, :slug, :weight, :description,
12
12
  :short_description, :objectives, :location, :taxonomizations, :start_date, :end_date,
13
13
  :promoted, :show_statistics, :registrations_enabled, :available_slots, :registration_terms
14
14
 
@@ -3,9 +3,9 @@
3
3
  module Decidim
4
4
  module Conferences
5
5
  module Admin
6
- # A command with all the business logic when copying a new participatory
6
+ # A command with all the business logic when duplicating a new participatory
7
7
  # conference in the system.
8
- class CopyConference < Decidim::Command
8
+ class DuplicateConference < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the params.
@@ -25,25 +25,24 @@ module Decidim
25
25
  return broadcast(:invalid) if form.invalid?
26
26
 
27
27
  Conference.transaction do
28
- copy_conference
29
- copy_conference_attachments
30
- copy_conference_components if @form.copy_components?
28
+ duplicate_conference
29
+ duplicate_conference_attachments
30
+ duplicate_conference_components if @form.duplicate_components?
31
31
  end
32
32
 
33
- broadcast(:ok, @copied_conference)
33
+ broadcast(:ok, @duplicated_conference)
34
34
  end
35
35
 
36
36
  private
37
37
 
38
38
  attr_reader :form
39
39
 
40
- def copy_conference
41
- @copied_conference = Conference.create!(
40
+ def duplicate_conference
41
+ @duplicated_conference = Conference.create!(
42
42
  organization: @conference.organization,
43
43
  title: form.title,
44
44
  slogan: @conference.slogan,
45
45
  slug: form.slug,
46
- hashtag: @conference.hashtag,
47
46
  description: @conference.description,
48
47
  short_description: @conference.short_description,
49
48
  location: @conference.location,
@@ -55,20 +54,20 @@ module Decidim
55
54
  )
56
55
  end
57
56
 
58
- def copy_conference_attachments
57
+ def duplicate_conference_attachments
59
58
  [:hero_image, :banner_image].each do |attribute|
60
59
  next unless @conference.attached_uploader(attribute).attached?
61
60
 
62
- @copied_conference.send(attribute).attach(@conference.send(attribute).blob)
61
+ @duplicated_conference.send(attribute).attach(@conference.send(attribute).blob)
63
62
  end
64
63
  end
65
64
 
66
- def copy_conference_components
65
+ def duplicate_conference_components
67
66
  @conference.components.each do |component|
68
- component_copied = component.dup
69
- component_copied.participatory_space = @copied_conference
70
- component_copied.save
71
- component.manifest.run_hooks(:copy, new_component: component_copied, old_component: component)
67
+ component_duplicated = component.dup
68
+ component_duplicated.participatory_space = @duplicated_conference
69
+ component_duplicated.save
70
+ component.manifest.run_hooks(:duplicate, new_component: component_duplicated, old_component: component)
72
71
  end
73
72
  end
74
73
  end
@@ -8,7 +8,7 @@ module Decidim
8
8
  class UpdateConference < Decidim::Commands::UpdateResource
9
9
  fetch_file_attributes :hero_image, :banner_image
10
10
 
11
- fetch_form_attributes :title, :slogan, :slug, :weight, :hashtag, :description, :short_description,
11
+ fetch_form_attributes :title, :slogan, :slug, :weight, :description, :short_description,
12
12
  :objectives, :location, :start_date, :end_date, :promoted, :show_statistics,
13
13
  :taxonomizations, :registrations_enabled
14
14
 
@@ -75,7 +75,7 @@ module Decidim
75
75
  checksum = Decidim::Conferences::UpcomingConferenceNotificationJob.generate_checksum(resource)
76
76
 
77
77
  Decidim::Conferences::UpcomingConferenceNotificationJob
78
- .set(wait_until: (resource.start_date - 2.days).to_s)
78
+ .set(wait_until: (resource.start_date - 2.days).to_time)
79
79
  .perform_later(resource.id, checksum)
80
80
  end
81
81
 
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ module Admin
6
+ # Controller that allows managing conferences.
7
+ #
8
+ class ConferenceDuplicatesController < Decidim::Conferences::Admin::ApplicationController
9
+ include Concerns::ConferenceAdmin
10
+
11
+ def new
12
+ enforce_permission_to :create, :conference
13
+ @form = form(ConferenceDuplicateForm).from_model(current_conference)
14
+ end
15
+
16
+ def create
17
+ enforce_permission_to :create, :conference
18
+ @form = form(ConferenceDuplicateForm).from_params(params)
19
+
20
+ DuplicateConference.call(@form, current_conference) do
21
+ on(:ok) do
22
+ flash[:notice] = I18n.t("conferences_duplicates.create.success", scope: "decidim.admin")
23
+ redirect_to conferences_path
24
+ end
25
+
26
+ on(:invalid) do
27
+ flash.now[:alert] = I18n.t("conferences_duplicates.create.error", scope: "decidim.admin")
28
+ render :new, status: :unprocessable_entity
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -41,7 +41,7 @@ module Decidim
41
41
 
42
42
  on(:invalid) do
43
43
  flash.now[:alert] = I18n.t("conference_invites.create.error", scope: "decidim.conferences.admin")
44
- render :new
44
+ render :new, status: :unprocessable_entity
45
45
  end
46
46
  end
47
47
  end
@@ -36,7 +36,7 @@ module Decidim
36
36
 
37
37
  on(:invalid) do
38
38
  flash[:alert] = I18n.t("conference_speakers.create.error", scope: "decidim.admin")
39
- render :new
39
+ render :new, status: :unprocessable_entity
40
40
  end
41
41
  end
42
42
  end
@@ -58,7 +58,7 @@ module Decidim
58
58
 
59
59
  on(:invalid) do
60
60
  flash.now[:alert] = I18n.t("conference_speakers.update.error", scope: "decidim.admin")
61
- render :edit
61
+ render :edit, status: :unprocessable_entity
62
62
  end
63
63
  end
64
64
  end
@@ -85,7 +85,7 @@ module Decidim
85
85
 
86
86
  on(:invalid) do
87
87
  flash.now[:alert] = I18n.t("conference_speakers.publish.invalid", scope: "decidim.admin")
88
- render action: "index"
88
+ render action: "index", status: :unprocessable_entity
89
89
  end
90
90
  end
91
91
  end
@@ -101,7 +101,7 @@ module Decidim
101
101
 
102
102
  on(:invalid) do
103
103
  flash.now[:alert] = I18n.t("conference_speakers.unpublish.invalid", scope: "decidim.admin")
104
- render action: "index"
104
+ render action: "index", status: :unprocessable_entity
105
105
  end
106
106
  end
107
107
  end
@@ -35,7 +35,7 @@ module Decidim
35
35
 
36
36
  on(:invalid) do
37
37
  flash.now[:alert] = I18n.t("conferences.create.error", scope: "decidim.admin")
38
- render :new
38
+ render :new, status: :unprocessable_entity
39
39
  end
40
40
  end
41
41
  end
@@ -61,12 +61,12 @@ module Decidim
61
61
 
62
62
  on(:invalid) do
63
63
  flash.now[:alert] = I18n.t("conferences.update.error", scope: "decidim.admin")
64
- render :edit, layout: "decidim/admin/conference"
64
+ render :edit, layout: "decidim/admin/conference", status: :unprocessable_entity
65
65
  end
66
66
  end
67
67
  end
68
68
 
69
- def copy
69
+ def duplicate
70
70
  enforce_permission_to :create, :conference
71
71
  end
72
72
 
@@ -28,7 +28,7 @@ module Decidim
28
28
 
29
29
  on(:invalid) do
30
30
  flash.now[:alert] = I18n.t("conferences.update.error", scope: "decidim.admin")
31
- render :edit
31
+ render :edit, status: :unprocessable_entity
32
32
  end
33
33
  end
34
34
  end
@@ -31,7 +31,7 @@ module Decidim
31
31
 
32
32
  on(:invalid) do
33
33
  flash[:alert] = I18n.t("media_links.create.error", scope: "decidim.admin")
34
- render :new
34
+ render :new, status: :unprocessable_entity
35
35
  end
36
36
  end
37
37
  end
@@ -55,7 +55,7 @@ module Decidim
55
55
 
56
56
  on(:invalid) do
57
57
  flash.now[:alert] = I18n.t("media_links.update.error", scope: "decidim.admin")
58
- render :edit
58
+ render :edit, status: :unprocessable_entity
59
59
  end
60
60
  end
61
61
  end
@@ -32,7 +32,7 @@ module Decidim
32
32
 
33
33
  on(:invalid) do
34
34
  flash[:alert] = I18n.t("partners.create.error", scope: "decidim.admin")
35
- render :new
35
+ render :new, status: :unprocessable_entity
36
36
  end
37
37
  end
38
38
  end
@@ -56,7 +56,7 @@ module Decidim
56
56
 
57
57
  on(:invalid) do
58
58
  flash.now[:alert] = I18n.t("partners.update.error", scope: "decidim.admin")
59
- render :edit
59
+ render :edit, status: :unprocessable_entity
60
60
  end
61
61
  end
62
62
  end
@@ -35,7 +35,7 @@ module Decidim
35
35
 
36
36
  on(:invalid) do
37
37
  flash.now[:alert] = I18n.t("registration_types.create.error", scope: "decidim.admin")
38
- render :new
38
+ render :new, status: :unprocessable_entity
39
39
  end
40
40
  end
41
41
  end
@@ -59,7 +59,7 @@ module Decidim
59
59
 
60
60
  on(:invalid) do
61
61
  flash.now[:alert] = I18n.t("registration_types.update.error", scope: "decidim.admin")
62
- render :edit
62
+ render :edit, status: :unprocessable_entity
63
63
  end
64
64
  end
65
65
  end
@@ -3,10 +3,10 @@
3
3
  module Decidim
4
4
  module Conferences
5
5
  module Admin
6
- # A form object used to copy a conferences from the admin
6
+ # A form object used to duplicate a conferences from the admin
7
7
  # dashboard.
8
8
  #
9
- class ConferenceCopyForm < Form
9
+ class ConferenceDuplicateForm < Form
10
10
  include TranslatableAttributes
11
11
 
12
12
  translatable_attribute :title, String
@@ -14,7 +14,7 @@ module Decidim
14
14
  mimic :conference
15
15
 
16
16
  attribute :slug, String
17
- attribute :copy_components, Boolean
17
+ attribute :duplicate_components, Boolean
18
18
 
19
19
  validates :slug, presence: true, format: { with: Decidim::Conference.slug_format }
20
20
  validates :title, translatable_presence: true
@@ -22,7 +22,6 @@ module Decidim
22
22
 
23
23
  attribute :slug, String
24
24
  attribute :weight, Integer, default: 0
25
- attribute :hashtag, String
26
25
  attribute :promoted, Boolean
27
26
  attribute :hero_image
28
27
  attribute :remove_hero_image, Boolean, default: false
@@ -51,9 +50,6 @@ module Decidim
51
50
  validates :banner_image, passthru: { to: Decidim::Conference }
52
51
  validate :available_slots_greater_than_or_equal_to_registrations_count, if: ->(form) { form.registrations_enabled? && form.available_slots.try(:positive?) }
53
52
 
54
- validates :start_date, presence: true, date: { before_or_equal_to: :end_date }
55
- validates :end_date, presence: true, date: { after_or_equal_to: :start_date }
56
-
57
53
  alias organization current_organization
58
54
 
59
55
  def participatory_space_manifest
@@ -10,6 +10,7 @@ module Decidim
10
10
  # Renders the dates of a conference
11
11
  #
12
12
  def render_date(conference)
13
+ return if conference.start_date.nil? || conference.end_date.nil?
13
14
  return l(conference.start_date, format: :decidim_with_month_name_short) if conference.start_date == conference.end_date
14
15
 
15
16
  "#{l(conference.start_date, format: :decidim_with_month_name_short)} - #{l(conference.end_date, format: :decidim_with_month_name_short)}"
@@ -11,7 +11,7 @@ module Decidim
11
11
  end
12
12
 
13
13
  def self.generate_checksum(conference)
14
- Digest::MD5.hexdigest("#{conference.id}-#{conference.start_date}")
14
+ Digest::SHA256.hexdigest("#{conference.id}-#{conference.start_date}")
15
15
  end
16
16
 
17
17
  private
@@ -94,10 +94,6 @@ module Decidim
94
94
  Decidim::Conferences::AdminLog::ConferencePresenter
95
95
  end
96
96
 
97
- def hashtag
98
- attributes["hashtag"].to_s.delete("#")
99
- end
100
-
101
97
  def to_param
102
98
  slug
103
99
  end
@@ -20,6 +20,10 @@ module Decidim
20
20
 
21
21
  alias participatory_space conference
22
22
 
23
+ def visible?
24
+ conference.registrations_enabled? && published?
25
+ end
26
+
23
27
  def self.log_presenter_class_for(_log)
24
28
  Decidim::Conferences::AdminLog::RegistrationTypePresenter
25
29
  end
@@ -1,7 +1,6 @@
1
1
  import "src/decidim/conferences/admin/conferences"
2
2
  import "src/decidim/conferences/admin/conference_speakers"
3
3
  import "src/decidim/conferences/admin/conference_invite_form"
4
- import "src/decidim/slug_form"
5
4
 
6
5
  // Images
7
6
  require.context("../images", true)
@@ -1,6 +1,6 @@
1
1
  import createFieldDependentInputs from "src/decidim/admin/field_dependent_inputs.component"
2
2
 
3
- $(() => {
3
+ document.addEventListener("turbo:load", () => {
4
4
  const $attendeeType = $('[name="conference_registration_invite[existing_user]"');
5
5
 
6
6
  createFieldDependentInputs({
@@ -1,6 +1,6 @@
1
1
  import createFieldDependentInputs from "src/decidim/admin/field_dependent_inputs.component"
2
2
 
3
- $(() => {
3
+ document.addEventListener("turbo:load", () => {
4
4
  const $conferenceSpeakerType = $("#conference_speaker_existing_user");
5
5
 
6
6
  createFieldDependentInputs({
@@ -1,4 +1,4 @@
1
- $(() => {
1
+ document.addEventListener("turbo:load", () => {
2
2
  const $conferenceScopeEnabled = $("#conference_scopes_enabled");
3
3
  const $conferenceScopeId = $("#conference_scope_id");
4
4
  const $form = $(".edit_conference, .new_conference");
@@ -1,5 +1,5 @@
1
- @import "stylesheets/decidim/conferences/conference.scss";
2
- @import "stylesheets/decidim/conferences/speaker.scss";
3
- @import "stylesheets/decidim/conferences/registration.scss";
4
- @import "stylesheets/decidim/conferences/program.scss";
5
- @import "stylesheets/decidim/conferences/media.scss";
1
+ @use "stylesheets/decidim/conferences/conference";
2
+ @use "stylesheets/decidim/conferences/speaker";
3
+ @use "stylesheets/decidim/conferences/registration";
4
+ @use "stylesheets/decidim/conferences/program";
5
+ @use "stylesheets/decidim/conferences/media";
@@ -51,7 +51,7 @@ module Decidim
51
51
 
52
52
  moderator_action?
53
53
  collaborator_action?
54
- valuator_action?
54
+ evaluator_action?
55
55
  conference_admin_action?
56
56
 
57
57
  permission_action
@@ -248,9 +248,9 @@ module Decidim
248
248
  allow! if permission_action.action == :read || permission_action.action == :preview
249
249
  end
250
250
 
251
- # Valuators can only read components
252
- def valuator_action?
253
- return unless can_manage_conference?(role: :valuator)
251
+ # Evaluators can only read components
252
+ def evaluator_action?
253
+ return unless can_manage_conference?(role: :evaluator)
254
254
 
255
255
  allow! if permission_action.action == :read && permission_action.subject == :component
256
256
  allow! if permission_action.action == :export && permission_action.subject == :component_data
@@ -29,10 +29,6 @@ module Decidim
29
29
  user ? true : false
30
30
  end
31
31
 
32
- def has_tooltip?
33
- false
34
- end
35
-
36
32
  def avatar
37
33
  attached_uploader(:avatar)
38
34
  end
@@ -18,7 +18,6 @@ module Decidim
18
18
  def diff_fields_mapping
19
19
  {
20
20
  description: :i18n,
21
- hashtag: :string,
22
21
  promoted: :boolean,
23
22
  published_at: :date,
24
23
  reference: :string,
@@ -8,9 +8,7 @@ module Decidim
8
8
 
9
9
  private
10
10
 
11
- def participatory_space = __getobj__.fetch(:conference)
12
-
13
- def participatory_space_sym = :conferences
11
+ def scope_entity = __getobj__.fetch(:conference)
14
12
  end
15
13
  end
16
14
  end
@@ -8,7 +8,7 @@ module Decidim
8
8
  # Syntactic sugar to initialize the class and return the queried objects.
9
9
  #
10
10
  # conference_speakers - the initial ConferenceSpeaker relation that needs to be filtered.
11
- # query - query to filter user group names
11
+ # query - query to filter user names
12
12
  def self.for(conference_speakers, query = nil)
13
13
  new(conference_speakers, query).query
14
14
  end
@@ -16,7 +16,7 @@ module Decidim
16
16
  # Initializes the class.
17
17
  #
18
18
  # conference_speakers - the ConferenceSpeaker relation that need to be filtered
19
- # query - query to filter user group names
19
+ # query - query to filter user names
20
20
  def initialize(conference_speakers, query = nil)
21
21
  @conference_speakers = conference_speakers
22
22
  @query = query
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ # This class counts all Followers of a conference
6
+ class ConferencesStatsFollowersCount < Decidim::StatsFollowersCount
7
+ def self.for(participatory_space)
8
+ return 0 unless participatory_space.is_a?(Decidim::Conferences)
9
+
10
+ new(participatory_space).query
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Conferences
5
+ # This class counts unique Participants on a conference
6
+ class ConferencesStatsParticipantsCount < Decidim::StatsParticipantsCount
7
+ def self.for(participatory_space)
8
+ return 0 unless participatory_space.is_a?(Decidim::Conferences)
9
+
10
+ new(participatory_space).query
11
+ end
12
+ end
13
+ end
14
+ end
@@ -6,18 +6,18 @@
6
6
  <div class="row column">
7
7
  <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
8
8
  </div>
9
- <div class="row column slug">
9
+ <div class="row column" data-controller="slug">
10
10
  <%= form.text_field :slug, help_text: t(".slug_help_html", url: decidim_form_slug_url(:conferences, form.object.slug)) %>
11
11
  </div>
12
12
  <div class="row column">
13
13
  <div class="card">
14
14
  <div class="card-divider">
15
- <legend><%= t("conference_copies.new.select", scope: "decidim.admin") %></legend>
15
+ <legend><%= t("conference_duplicates.new.select", scope: "decidim.admin") %></legend>
16
16
  </div>
17
17
  <div class="card-section">
18
18
  <div class="row">
19
19
  <div class="row column">
20
- <%= form.check_box :copy_components %>
20
+ <%= form.check_box :duplicate_components %>
21
21
  </div>
22
22
  </div>
23
23
  </div>
@@ -0,0 +1,19 @@
1
+ <% add_decidim_page_title(t("conference_duplicates.new.title", scope: "decidim.admin")) %>
2
+
3
+ <div class="item_show__header">
4
+ <h1 class="item_show__header-title">
5
+ <%= t("conference_duplicates.new.title", scope: "decidim.admin") %>
6
+ </h1>
7
+ </div>
8
+ <div class="item__edit item__edit-1col">
9
+ <div class="item__edit-form">
10
+ <%= decidim_form_for(@form, url: conference_duplicates_path(current_conference), method: :post, html: { class: "form form-defaults duplicate_conference" }) do |f| %>
11
+ <%= render partial: "form", object: f %>
12
+ <div class="item__edit-sticky">
13
+ <div class="item__edit-sticky-container">
14
+ <%= f.submit t("conference_duplicates.new.duplicate", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
15
+ </div>
16
+ </div>
17
+ <% end %>
18
+ </div>
19
+ </div>