decidim-conferences 0.20.1 → 0.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/assets/images/decidim/conferences/conference.svg +1 -3
- data/app/cells/decidim/conferences/conference_m/footer.erb +1 -1
- data/app/cells/decidim/conferences/conference_m_cell.rb +4 -0
- data/app/cells/decidim/conferences/conference_speaker/show.erb +2 -2
- data/app/cells/decidim/conferences/content_blocks/highlighted_conferences/show.erb +9 -10
- data/app/cells/decidim/conferences/media_link/show.erb +2 -2
- data/app/cells/decidim/conferences/partner_cell.rb +1 -1
- data/app/cells/decidim/conferences/photo/show.erb +3 -5
- data/app/cells/decidim/conferences/photo_cell.rb +2 -2
- data/app/cells/decidim/conferences/photos_list/show.erb +1 -1
- data/app/cells/decidim/conferences/registration_type/join_conference.erb +1 -1
- data/app/cells/decidim/conferences/registration_type_cell.rb +2 -2
- data/app/commands/decidim/conferences/admin/create_conference.rb +3 -3
- data/app/commands/decidim/conferences/admin/create_conference_admin.rb +2 -1
- data/app/commands/decidim/conferences/admin/create_partner.rb +9 -9
- data/app/commands/decidim/conferences/admin/notify_role_assigned_to_conference.rb +22 -0
- data/app/commands/decidim/conferences/admin/update_conference.rb +13 -6
- data/app/commands/decidim/conferences/admin/update_conference_admin.rb +2 -1
- data/app/controllers/concerns/decidim/conferences/admin/filterable.rb +27 -0
- data/app/controllers/decidim/conferences/admin/conferences_controller.rb +4 -5
- data/app/events/decidim/conferences/conference_role_assigned_event.rb +30 -0
- data/app/forms/decidim/conferences/admin/conference_form.rb +5 -2
- data/app/forms/decidim/conferences/admin/conference_speaker_form.rb +12 -1
- data/app/forms/decidim/conferences/admin/diploma_form.rb +6 -2
- data/app/forms/decidim/conferences/admin/partner_form.rb +16 -1
- data/app/jobs/decidim/conferences/admin/send_conference_diploma_job.rb +1 -1
- data/app/models/decidim/conference.rb +28 -1
- data/app/models/decidim/conference_speaker.rb +5 -2
- data/app/models/decidim/conference_user_role.rb +1 -1
- data/app/models/decidim/conferences/media_link.rb +3 -0
- data/app/models/decidim/conferences/partner.rb +5 -1
- data/app/models/decidim/conferences/registration_type.rb +3 -0
- data/app/permissions/decidim/conferences/permissions.rb +9 -0
- data/app/presenters/decidim/conferences/conference_stats_presenter.rb +1 -1
- data/app/types/decidim/conferences/conference_media_link_type.rb +19 -0
- data/app/types/decidim/conferences/conference_partner_type.rb +20 -0
- data/app/types/decidim/conferences/conference_speaker_type.rb +24 -0
- data/app/types/decidim/conferences/conference_type.rb +45 -0
- data/app/views/decidim/conferences/_order_by_conferences.html.erb +1 -1
- data/app/views/decidim/conferences/admin/conference_invites/index.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +2 -2
- data/app/views/decidim/conferences/admin/conferences/index.html.erb +6 -3
- data/app/views/decidim/conferences/conference_program/_program_item.html.erb +6 -4
- data/app/views/decidim/conferences/conference_program/show.html.erb +6 -6
- data/app/views/decidim/conferences/conference_speakers/index.html.erb +1 -1
- data/app/views/decidim/conferences/conferences/_partners.html.erb +1 -1
- data/app/views/decidim/conferences/conferences/_promoted_conference.html.erb +3 -3
- data/app/views/decidim/conferences/conferences/show.html.erb +7 -13
- data/app/views/decidim/conferences/media/index.html.erb +3 -3
- data/app/views/decidim/conferences/registration_types/index.html.erb +1 -1
- data/app/views/layouts/decidim/_conference_hero.html.erb +4 -8
- data/app/views/layouts/decidim/_conferences_nav.html.erb +2 -2
- data/app/views/layouts/decidim/admin/conference.html.erb +2 -2
- data/app/views/layouts/decidim/conference.html.erb +4 -5
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/bg-BG.yml +7 -0
- data/config/locales/bg.yml +7 -0
- data/config/locales/ca.yml +10 -0
- data/config/locales/cs.yml +20 -10
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +9 -0
- data/config/locales/el.yml +580 -0
- data/config/locales/en.yml +10 -0
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +10 -0
- data/config/locales/es-PY.yml +10 -0
- data/config/locales/es.yml +10 -0
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/fi-plain.yml +10 -0
- data/config/locales/fi.yml +14 -4
- data/config/locales/fr-CA.yml +581 -0
- data/config/locales/fr.yml +10 -0
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +4 -0
- data/config/locales/is.yml +1 -0
- data/config/locales/it.yml +169 -159
- data/config/locales/ja-JP.yml +575 -0
- data/config/locales/ja.yml +576 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +584 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +10 -0
- data/config/locales/no.yml +12 -3
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +203 -193
- data/config/locales/pt-BR.yml +1 -1
- data/config/locales/pt.yml +238 -229
- data/config/locales/ro-RO.yml +536 -0
- data/config/locales/sk-SK.yml +585 -0
- data/config/locales/sk.yml +585 -0
- data/config/locales/sl.yml +42 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +19 -0
- data/config/locales/sv.yml +25 -15
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +576 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20200320105913_index_foreign_keys_in_decidim_conferences.rb +7 -0
- data/db/migrate/20200320105914_index_foreign_keys_in_decidim_conferences_conference_invites.rb +7 -0
- data/db/migrate/20200320105915_index_foreign_keys_in_decidim_conferences_conference_registrations.rb +7 -0
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/lib/decidim/conferences/admin_engine.rb +1 -0
- data/lib/decidim/conferences/participatory_space.rb +19 -12
- data/lib/decidim/conferences/test/factories.rb +19 -3
- data/lib/decidim/conferences/version.rb +1 -1
- metadata +57 -13
- data/app/views/decidim/conferences/conference_widgets/show.html.erb +0 -11
@@ -26,7 +26,18 @@ module Decidim
|
|
26
26
|
validates :full_name, presence: true, unless: proc { |object| object.existing_user }
|
27
27
|
validates :user, presence: true, if: proc { |object| object.existing_user }
|
28
28
|
validates :position, :affiliation, presence: true
|
29
|
-
validates :avatar,
|
29
|
+
validates :avatar, passthru: {
|
30
|
+
to: Decidim::ConferenceSpeaker,
|
31
|
+
with: {
|
32
|
+
# The speaker gets its organization context through the conference
|
33
|
+
# object which is why we need to create a dummy conference in order
|
34
|
+
# to pass the correct organization context to the file upload
|
35
|
+
# validators.
|
36
|
+
conference: lambda do |form|
|
37
|
+
Decidim::Conference.new(organization: form.current_organization)
|
38
|
+
end
|
39
|
+
}
|
40
|
+
}
|
30
41
|
validate :personal_url_format
|
31
42
|
|
32
43
|
def personal_url
|
@@ -7,6 +7,8 @@ module Decidim
|
|
7
7
|
# from the admin dashboard
|
8
8
|
#
|
9
9
|
class DiplomaForm < Form
|
10
|
+
include Decidim::HasUploadValidations
|
11
|
+
|
10
12
|
mimic :conference
|
11
13
|
|
12
14
|
attribute :main_logo
|
@@ -16,8 +18,10 @@ module Decidim
|
|
16
18
|
|
17
19
|
validates :signature_name, :sign_date, :main_logo, :signature, presence: true
|
18
20
|
|
19
|
-
validates :main_logo,
|
20
|
-
validates :signature,
|
21
|
+
validates :main_logo, passthru: { to: Decidim::Conference }
|
22
|
+
validates :signature, passthru: { to: Decidim::Conference }
|
23
|
+
|
24
|
+
alias organization current_organization
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
@@ -5,6 +5,8 @@ module Decidim
|
|
5
5
|
module Admin
|
6
6
|
# A form object used to create conference members from the admin dashboard.
|
7
7
|
class PartnerForm < Form
|
8
|
+
include Decidim::HasUploadValidations
|
9
|
+
|
8
10
|
mimic :conference_partner
|
9
11
|
|
10
12
|
attribute :name, String
|
@@ -15,11 +17,24 @@ module Decidim
|
|
15
17
|
attribute :remove_logo
|
16
18
|
|
17
19
|
validates :name, :partner_type, presence: true, if: ->(form) { form.logo.present? }
|
18
|
-
validates :logo,
|
20
|
+
validates :logo, passthru: {
|
21
|
+
to: Decidim::Conferences::Partner,
|
22
|
+
with: {
|
23
|
+
# The partner gets its organization context through the conference
|
24
|
+
# object which is why we need to create a dummy conference in order
|
25
|
+
# to pass the correct organization context to the file upload
|
26
|
+
# validators.
|
27
|
+
conference: lambda do |form|
|
28
|
+
Decidim::Conference.new(organization: form.current_organization)
|
29
|
+
end
|
30
|
+
}
|
31
|
+
}
|
19
32
|
validate :link_format
|
20
33
|
validates :weight, numericality: { greater_than_or_equal_to: 0 }
|
21
34
|
validates :partner_type, inclusion: { in: Decidim::Conferences::Partner::TYPES }
|
22
35
|
|
36
|
+
alias organization current_organization
|
37
|
+
|
23
38
|
def link
|
24
39
|
return if super.blank?
|
25
40
|
|
@@ -11,7 +11,7 @@ module Decidim
|
|
11
11
|
return unless confirmed_registrations.any?
|
12
12
|
|
13
13
|
confirmed_registrations.each do |registration_confirmed|
|
14
|
-
SendConferenceDiplomaMailer.diploma(conference, registration_confirmed.user).
|
14
|
+
SendConferenceDiplomaMailer.diploma(conference, registration_confirmed.user).deliver_later
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -10,13 +10,17 @@ module Decidim
|
|
10
10
|
include Decidim::HasAttachmentCollections
|
11
11
|
include Decidim::Participable
|
12
12
|
include Decidim::Publicable
|
13
|
-
include Decidim::
|
13
|
+
include Decidim::ScopableParticipatorySpace
|
14
14
|
include Decidim::Followable
|
15
15
|
include Decidim::HasReference
|
16
16
|
include Decidim::Traceable
|
17
17
|
include Decidim::Loggable
|
18
18
|
include Decidim::ParticipatorySpaceResourceable
|
19
19
|
include Decidim::Searchable
|
20
|
+
include Decidim::HasUploadValidations
|
21
|
+
include Decidim::TranslatableResource
|
22
|
+
|
23
|
+
translatable_fields :title, :slogan, :short_description, :description, :objectives, :registration_terms
|
20
24
|
|
21
25
|
belongs_to :organization,
|
22
26
|
foreign_key: "decidim_organization_id",
|
@@ -51,9 +55,16 @@ module Decidim
|
|
51
55
|
validates :slug, uniqueness: { scope: :organization }
|
52
56
|
validates :slug, presence: true, format: { with: Decidim::Conference.slug_format }
|
53
57
|
|
58
|
+
validates_upload :hero_image
|
54
59
|
mount_uploader :hero_image, Decidim::HeroImageUploader
|
60
|
+
|
61
|
+
validates_upload :banner_image
|
55
62
|
mount_uploader :banner_image, Decidim::HomepageImageUploader
|
63
|
+
|
64
|
+
validates_upload :main_logo
|
56
65
|
mount_uploader :main_logo, Decidim::Conferences::DiplomaUploader
|
66
|
+
|
67
|
+
validates_upload :signature
|
57
68
|
mount_uploader :signature, Decidim::Conferences::DiplomaUploader
|
58
69
|
|
59
70
|
searchable_fields({
|
@@ -116,5 +127,21 @@ module Decidim
|
|
116
127
|
|
117
128
|
end_date < Date.current
|
118
129
|
end
|
130
|
+
|
131
|
+
def user_roles(role_name = nil)
|
132
|
+
roles = Decidim::ConferenceUserRole.where(conference: self)
|
133
|
+
return roles if role_name.blank?
|
134
|
+
|
135
|
+
roles.where(role: role_name)
|
136
|
+
end
|
137
|
+
|
138
|
+
def attachment_context
|
139
|
+
:admin
|
140
|
+
end
|
141
|
+
|
142
|
+
# Allow ransacker to search for a key in a hstore column (`title`.`en`)
|
143
|
+
ransacker :title do |parent|
|
144
|
+
Arel::Nodes::InfixOperation.new("->>", parent.table[:title], Arel::Nodes.build_quoted(I18n.locale.to_s))
|
145
|
+
end
|
119
146
|
end
|
120
147
|
end
|
@@ -6,16 +6,19 @@ module Decidim
|
|
6
6
|
class ConferenceSpeaker < ApplicationRecord
|
7
7
|
include Decidim::Traceable
|
8
8
|
include Decidim::Loggable
|
9
|
+
include Decidim::HasUploadValidations
|
10
|
+
include Decidim::TranslatableResource
|
11
|
+
|
12
|
+
translatable_fields :position, :affiliation, :short_bio
|
9
13
|
|
10
14
|
belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::User", optional: true
|
11
15
|
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
|
12
16
|
has_many :conference_speaker_conference_meetings, dependent: :destroy
|
13
17
|
has_many :conference_meetings, through: :conference_speaker_conference_meetings, foreign_key: "conference_speaker_id", class_name: "Decidim::ConferenceMeeting"
|
14
18
|
|
15
|
-
validates :avatar, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_avatar_size } }
|
16
|
-
|
17
19
|
default_scope { order(full_name: :asc, created_at: :asc) }
|
18
20
|
|
21
|
+
validates_avatar
|
19
22
|
mount_uploader :avatar, Decidim::AvatarUploader
|
20
23
|
|
21
24
|
delegate :organization, to: :conference
|
@@ -11,7 +11,7 @@ module Decidim
|
|
11
11
|
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference", optional: true
|
12
12
|
alias participatory_space conference
|
13
13
|
|
14
|
-
ROLES = %w(admin collaborator moderator).freeze
|
14
|
+
ROLES = %w(admin collaborator moderator valuator).freeze
|
15
15
|
validates :role, inclusion: { in: ROLES }, uniqueness: { scope: [:user, :conference] }
|
16
16
|
validate :user_and_conference_same_organization
|
17
17
|
|
@@ -6,6 +6,9 @@ module Decidim
|
|
6
6
|
class MediaLink < ApplicationRecord
|
7
7
|
include Decidim::Traceable
|
8
8
|
include Decidim::Loggable
|
9
|
+
include Decidim::TranslatableResource
|
10
|
+
|
11
|
+
translatable_fields :title
|
9
12
|
|
10
13
|
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
|
11
14
|
|
@@ -6,15 +6,19 @@ module Decidim
|
|
6
6
|
class Partner < ApplicationRecord
|
7
7
|
include Decidim::Traceable
|
8
8
|
include Decidim::Loggable
|
9
|
+
include Decidim::HasUploadValidations
|
9
10
|
|
10
11
|
TYPES = %w(main_promotor collaborator).freeze
|
11
12
|
|
12
13
|
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
|
13
|
-
validates :logo, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_avatar_size } }
|
14
14
|
|
15
15
|
default_scope { order(partner_type: :desc, weight: :asc) }
|
16
|
+
|
17
|
+
validates_avatar :logo
|
16
18
|
mount_uploader :logo, Decidim::Conferences::PartnerLogoUploader
|
17
19
|
|
20
|
+
delegate :organization, to: :conference
|
21
|
+
|
18
22
|
alias participatory_space conference
|
19
23
|
|
20
24
|
def self.log_presenter_class_for(_log)
|
@@ -7,6 +7,9 @@ module Decidim
|
|
7
7
|
include Decidim::Publicable
|
8
8
|
include Decidim::Traceable
|
9
9
|
include Decidim::Loggable
|
10
|
+
include Decidim::TranslatableResource
|
11
|
+
|
12
|
+
translatable_fields :title, :description
|
10
13
|
|
11
14
|
belongs_to :conference, foreign_key: "decidim_conference_id", class_name: "Decidim::Conference"
|
12
15
|
has_many :conference_meeting_registration_types, dependent: :destroy
|
@@ -51,6 +51,7 @@ module Decidim
|
|
51
51
|
|
52
52
|
moderator_action?
|
53
53
|
collaborator_action?
|
54
|
+
valuator_action?
|
54
55
|
conference_admin_action?
|
55
56
|
|
56
57
|
permission_action
|
@@ -252,6 +253,14 @@ module Decidim
|
|
252
253
|
allow! if permission_action.action == :read || permission_action.action == :preview
|
253
254
|
end
|
254
255
|
|
256
|
+
# Valuators can only read components
|
257
|
+
def valuator_action?
|
258
|
+
return unless can_manage_conference?(role: :valuator)
|
259
|
+
|
260
|
+
allow! if permission_action.action == :read && permission_action.subject == :component
|
261
|
+
allow! if permission_action.action == :export && permission_action.subject == :component_data
|
262
|
+
end
|
263
|
+
|
255
264
|
# Process admins can eprform everything *inside* that conference. They cannot
|
256
265
|
# create a conference or perform actions on conference groups or other
|
257
266
|
# conferences.
|
@@ -38,7 +38,7 @@ module Decidim
|
|
38
38
|
|
39
39
|
def render_stats_data(component_manifest, name, data, index)
|
40
40
|
safe_join([
|
41
|
-
index.zero? ? manifest_icon(component_manifest) : " / ".html_safe,
|
41
|
+
index.zero? ? manifest_icon(component_manifest, role: "img", "aria-hidden": true) : " / ".html_safe,
|
42
42
|
content_tag(:span, "#{number_with_delimiter(data)} " + I18n.t(name, scope: "decidim.conferences.statistics"),
|
43
43
|
class: "#{name} process_stats-text")
|
44
44
|
])
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
# This type represents a conference.
|
6
|
+
ConferenceMediaLinkType = GraphQL::ObjectType.define do
|
7
|
+
name "ConferenceMediaLink"
|
8
|
+
description "A conference media link"
|
9
|
+
|
10
|
+
field :id, !types.ID, "Internal ID for this media link"
|
11
|
+
field :title, Decidim::Core::TranslatedFieldType, "Title for this media link"
|
12
|
+
field :link, types.String, "URL for this media link"
|
13
|
+
field :date, Decidim::Core::DateType, "Relevant date for the media link"
|
14
|
+
field :weight, types.Int, "Order of appearance in which it should be presented"
|
15
|
+
field :createdAt, Decidim::Core::DateTimeType, "The time this entry was created", property: :created_at
|
16
|
+
field :updatedAt, Decidim::Core::DateTimeType, "The time this entry was updated", property: :updated_at
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
# This type represents a conference.
|
6
|
+
ConferencePartnerType = GraphQL::ObjectType.define do
|
7
|
+
name "ConferencePartner"
|
8
|
+
description "A conference partner"
|
9
|
+
|
10
|
+
field :id, !types.ID, "ID of the resource"
|
11
|
+
field :name, types.String, "Partner name"
|
12
|
+
field :partnerType, types.String, "Partner type", property: :partner_type
|
13
|
+
field :weight, types.Int, "Order of appearance in which it should be presented"
|
14
|
+
field :link, types.String, "Relevant URL for this partner"
|
15
|
+
field :logo, types.String, "Link to the partner's logo"
|
16
|
+
field :createdAt, Decidim::Core::DateTimeType, "The time this partner was created", property: :created_at
|
17
|
+
field :updatedAt, Decidim::Core::DateTimeType, "The time this partner was updated", property: :updated_at
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
# This type represents a conference.
|
6
|
+
ConferenceSpeakerType = GraphQL::ObjectType.define do
|
7
|
+
name "ConferenceSpeaker"
|
8
|
+
description "A conference speaker"
|
9
|
+
|
10
|
+
field :id, !types.ID, "Internal ID of the speaker"
|
11
|
+
field :fullName, types.String, "Full name of the speaker", property: :full_name
|
12
|
+
field :position, Decidim::Core::TranslatedFieldType, "Position of the speaker in the conference"
|
13
|
+
field :affiliation, Decidim::Core::TranslatedFieldType, "Affiliation of the speaker"
|
14
|
+
field :twitterHandle, types.String, "Twitter handle", property: :twitter_handle
|
15
|
+
field :shortBio, Decidim::Core::TranslatedFieldType, "Short biography of the speaker", property: :short_bio
|
16
|
+
field :personalUrl, types.String, "Personal URL of the speaker", property: :personal_url
|
17
|
+
field :avatar, types.String, "Avatar of the speaker"
|
18
|
+
field :user, Decidim::Core::UserType, "Decidim user corresponding to this speaker", property: :user
|
19
|
+
|
20
|
+
field :createdAt, Decidim::Core::DateTimeType, "The time this member was created ", property: :created_at
|
21
|
+
field :updatedAt, Decidim::Core::DateTimeType, "The time this member was updated", property: :updated_at
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Conferences
|
5
|
+
# This type represents a conference.
|
6
|
+
ConferenceType = GraphQL::ObjectType.define do
|
7
|
+
interfaces [
|
8
|
+
-> { Decidim::Core::ParticipatorySpaceInterface },
|
9
|
+
-> { Decidim::Core::ScopableInterface },
|
10
|
+
-> { Decidim::Core::AttachableInterface }
|
11
|
+
]
|
12
|
+
|
13
|
+
name "Conference"
|
14
|
+
description "A conference"
|
15
|
+
|
16
|
+
field :id, !types.ID, "Internal ID for this conference"
|
17
|
+
field :shortDescription, Decidim::Core::TranslatedFieldType, "The short description of this conference", property: :short_description
|
18
|
+
field :description, Decidim::Core::TranslatedFieldType, "The description of this conference"
|
19
|
+
field :slug, types.String, "The slug of this conference"
|
20
|
+
field :hashtag, types.String, "The hashtag for this conference"
|
21
|
+
field :slogan, Decidim::Core::TranslatedFieldType, "The slogan of the conference"
|
22
|
+
field :location, types.String, "The location of this conference"
|
23
|
+
field :createdAt, Decidim::Core::DateTimeType, "The time this conference was created", property: :created_at
|
24
|
+
field :updatedAt, Decidim::Core::DateTimeType, "The time this conference was updated", property: :updated_at
|
25
|
+
field :publishedAt, Decidim::Core::DateTimeType, "The time this conference was published", property: :published_at
|
26
|
+
field :reference, types.String, "Reference prefix for this conference"
|
27
|
+
|
28
|
+
field :heroImage, types.String, "The hero image for this conference", property: :hero_image
|
29
|
+
field :bannerImage, types.String, "The banner image for this conference", property: :banner_image
|
30
|
+
field :promoted, types.Boolean, "If this conference is promoted (therefore in the homepage)"
|
31
|
+
field :objectives, Decidim::Core::TranslatedFieldType, "The objectives of the conference"
|
32
|
+
field :showStatistics, types.Boolean, "If this conference shows the statistics", property: :show_statistics
|
33
|
+
field :startDate, Decidim::Core::DateType, "The date this conference starts", property: :start_date
|
34
|
+
field :endDate, Decidim::Core::DateType, "The date this conference ends", property: :end_date
|
35
|
+
field :registrationsEnabled, types.Boolean, "If the registrations are enabled in this conference", property: :registrations_enabled
|
36
|
+
field :availableSlots, types.Int, "The number of available slots in this conference", property: :available_slots
|
37
|
+
field :registrationTerms, Decidim::Core::TranslatedFieldType, "The registration terms of this conference", property: :registration_terms
|
38
|
+
|
39
|
+
field :speakers, types[Decidim::Conferences::ConferenceSpeakerType], "List of speakers in this conference"
|
40
|
+
field :partners, types[Decidim::Conferences::ConferencePartnerType], "List of partners in this conference"
|
41
|
+
field :categories, types[Decidim::Core::CategoryType], "List of categories in this conference"
|
42
|
+
field :mediaLinks, types[Decidim::Conferences::ConferenceMediaLinkType], "List of media links in this conference", property: :media_links
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<div class="row collapse order-by">
|
2
|
-
<
|
2
|
+
<h3 class="order-by__text section-heading"><%= t("conferences.order_by_conferences.conferences", scope: "layouts.decidim", count: collection.count) %></h3>
|
3
3
|
</div>
|
@@ -26,8 +26,8 @@
|
|
26
26
|
<%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
|
27
27
|
<%= hidden_field_tag :state, @state %>
|
28
28
|
<div class="input-group-button">
|
29
|
-
<button type="submit" class="button
|
30
|
-
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
29
|
+
<button type="submit" class="button">
|
30
|
+
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
31
31
|
</button>
|
32
32
|
</div>
|
33
33
|
</div>
|
@@ -5,8 +5,8 @@
|
|
5
5
|
<div class="input-group">
|
6
6
|
<%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
|
7
7
|
<div class="input-group-button">
|
8
|
-
<button type="submit" class="button
|
9
|
-
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
8
|
+
<button type="submit" class="button">
|
9
|
+
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
10
10
|
</button>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -1,17 +1,18 @@
|
|
1
|
-
<div class="card" id="conferences">
|
1
|
+
<div class="card with-overflow" id="conferences">
|
2
2
|
<div class="card-divider">
|
3
3
|
<h2 class="card-title">
|
4
4
|
<%= t "decidim.admin.titles.conferences" %>
|
5
5
|
<%= link_to t("actions.new_conference", scope: "decidim.admin"), new_conference_path, class: "button tiny button--title" if allowed_to? :create, :conference %>
|
6
6
|
</h2>
|
7
7
|
</div>
|
8
|
+
<%= admin_filter_selector %>
|
8
9
|
<div class="card-section">
|
9
10
|
<div class="table-scroll">
|
10
11
|
<table class="table-list">
|
11
12
|
<thead>
|
12
13
|
<tr>
|
13
14
|
<th><%= t("models.conference.fields.title", scope: "decidim.admin") %></th>
|
14
|
-
<th><%= t("models.conference.fields.created_at", scope: "decidim.admin") %></th>
|
15
|
+
<th><%= sort_link(query, :created_at, t("models.conference.fields.created_at", scope: "decidim.admin"), default_order: :desc) %></th>
|
15
16
|
<th class="table-list__actions"><%= t("models.conference.fields.published", scope: "decidim.admin") %></th>
|
16
17
|
<th></th>
|
17
18
|
</tr>
|
@@ -22,11 +23,13 @@
|
|
22
23
|
<td>
|
23
24
|
<% if conference.promoted? %>
|
24
25
|
<span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.conference.fields.promoted", scope: "decidim.admin") %>">
|
25
|
-
<%= icon "star" %>
|
26
|
+
<%= icon "star", aria_label: t("models.conference.fields.promoted", scope: "decidim.admin"), role: "img" %>
|
26
27
|
</span>
|
27
28
|
<% end %>
|
28
29
|
<% if allowed_to? :update, :conference, conference: conference %>
|
29
30
|
<%= link_to translated_attribute(conference.title), edit_conference_path(conference) %><br>
|
31
|
+
<% elsif allowed_to? :read, :component, conference: conference %>
|
32
|
+
<%= link_to translated_attribute(conference.title), components_path(conference) %><br>
|
30
33
|
<% elsif allowed_to? :preview, :conference, conference: conference %>
|
31
34
|
<%= link_to translated_attribute(conference.title), decidim_conferences.conference_path(conference) %><br>
|
32
35
|
<% elsif allowed_to? :read, :moderation, conference: conference %>
|
@@ -8,10 +8,12 @@
|
|
8
8
|
<ul class="tabs buttons__row" id="conference-row-<%= seed %>-tabs" data-tabs>
|
9
9
|
<% categories.each_with_index do |category, i| %>
|
10
10
|
<li class="tabs-title<%= " is-active" if i == 0 %>">
|
11
|
-
<!-- Wrap
|
12
|
-
<
|
13
|
-
<
|
14
|
-
|
11
|
+
<!-- Wrap the anchor inside a div to keep correct button styling -->
|
12
|
+
<div>
|
13
|
+
<a href="#conference-row-<%= seed %>-tab<%= i %>" class="button button--shadow tiny hollow">
|
14
|
+
<%= category.present? ? translated_attribute(category.name) : "other" %>
|
15
|
+
</a>
|
16
|
+
</div>
|
15
17
|
</li>
|
16
18
|
<% end %>
|
17
19
|
</ul>
|