decidim-meetings 0.27.5 → 0.27.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/meetings/highlighted_meetings_for_component/show.erb +2 -2
- data/app/cells/decidim/meetings/meeting_s_cell.rb +1 -1
- data/app/controllers/decidim/meetings/widgets_controller.rb +11 -1
- data/app/helpers/decidim/meetings/directory/application_helper.rb +1 -1
- data/app/packs/src/decidim/meetings/poll.component.js +27 -0
- data/app/permissions/decidim/meetings/permissions.rb +10 -0
- data/app/views/decidim/meetings/admin/agenda/_form.html.erb +1 -1
- data/app/views/decidim/meetings/layouts/live_event.html.erb +1 -1
- data/app/views/decidim/meetings/meetings/_meeting_agenda.html.erb +2 -2
- data/app/views/decidim/meetings/meetings/show.html.erb +3 -1
- data/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb +13 -9
- data/app/views/decidim/meetings/polls/answers/_single_option.html.erb +8 -8
- data/app/views/decidim/meetings/polls/questions/_published_question.html.erb +2 -2
- data/config/locales/bg.yml +105 -0
- data/config/locales/ca.yml +4 -4
- data/config/locales/de.yml +1 -1
- data/config/locales/es.yml +4 -4
- data/config/locales/fi-plain.yml +2 -0
- data/config/locales/fi.yml +3 -1
- data/config/locales/fr-CA.yml +2 -0
- data/config/locales/fr.yml +2 -0
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/hu.yml +4 -0
- data/config/locales/ja.yml +8 -1
- data/config/locales/pl.yml +46 -0
- data/config/locales/pt-BR.yml +50 -0
- data/config/locales/sv.yml +1 -0
- data/decidim-meetings.gemspec +36 -0
- data/lib/decidim/meetings/engine.rb +1 -1
- data/lib/decidim/meetings/test/factories.rb +68 -30
- data/lib/decidim/meetings/version.rb +1 -1
- metadata +22 -21
- data/config/environment.rb +0 -3
data/config/locales/pl.yml
CHANGED
@@ -14,11 +14,14 @@ pl:
|
|
14
14
|
meeting:
|
15
15
|
address: Adres
|
16
16
|
available_slots: Dostępne miejsca na to spotkanie
|
17
|
+
customize_registration_email: Dostosuj maila rejestracji
|
17
18
|
decidim_category_id: Kategoria
|
18
19
|
decidim_scope_id: Zakres
|
19
20
|
decidim_user_group_id: Grupa użytkowników
|
20
21
|
description: Opis
|
22
|
+
end_time: Czas zakończenia
|
21
23
|
id: Numer ID
|
24
|
+
iframe_embed_type: Typ osadzenia Iframe
|
22
25
|
location: Miejsce
|
23
26
|
location_hints: Wskazówki co do miejsca
|
24
27
|
online_meeting_url: Adres URL spotkania online
|
@@ -296,6 +299,8 @@ pl:
|
|
296
299
|
registration_url_help: 'Link: zezwól użytkownikom na korzystanie z usługi zewnętrznej, której używasz do rejestracji'
|
297
300
|
select_a_meeting_type: Wybierz typ spotkania
|
298
301
|
select_a_registration_type: Wybierz typ rejestracji
|
302
|
+
select_an_iframe_access_level: Wybierz poziom dostępu do iframe
|
303
|
+
show_embedded_iframe_help: 'Tylko kilka usług pozwala na osadzanie się w spotkaniu lub wydarzeniu na żywo z następujących domen: %{domains}'
|
299
304
|
index:
|
300
305
|
title: Spotkania
|
301
306
|
new:
|
@@ -368,21 +373,38 @@ pl:
|
|
368
373
|
value_types:
|
369
374
|
organizer_presenter:
|
370
375
|
not_found: 'Nie znaleziono organizatora w bazie danych (ID: %{id})'
|
376
|
+
questionnaire:
|
377
|
+
update: "%{user_name} zaktualizował(a) kwestionariusz spotkania %{meeting_name}"
|
371
378
|
application_helper:
|
379
|
+
filter_category_values:
|
380
|
+
all: Wszystkie
|
381
|
+
filter_meeting_space_values:
|
382
|
+
all: Wszystkie
|
372
383
|
filter_scope_values:
|
373
384
|
all: Wszystkie
|
385
|
+
calendar:
|
386
|
+
meeting_to_event:
|
387
|
+
read_more: Przeczytaj więcej o tym spotkaniu
|
374
388
|
calendar_modal:
|
375
389
|
calendar_url: Adres URL kalendarza
|
376
390
|
close_window: Zamknij okno
|
391
|
+
copy_calendar_url: Kopiuj
|
392
|
+
copy_calendar_url_clarification: Skopiuj adres URL kalendarza do schowka
|
393
|
+
copy_calendar_url_copied: Skopiowano!
|
377
394
|
copy_calendar_url_description: Możesz zobaczyć wszystkie opublikowane spotkania w swojej aplikacji kalendarza. Skopiuj i wklej ten adres URL w swoim kalendarzu, używając opcji "Dodaj nowy kalendarz z URL".
|
378
395
|
copy_calendar_url_explanation: Pamiętaj, że eksportujesz wybrane spotkania, ponieważ filtry są włączone. Jeśli chcesz je wyeksportować, najpierw zresetuj wszystkie filtry.
|
396
|
+
copy_calendar_url_message: Link został pomyślnie skopiowany do schowka.
|
379
397
|
export_calendar: Eksportuj kalendarz
|
380
398
|
close_meeting_reminder_mailer:
|
381
399
|
close_meeting_reminder:
|
400
|
+
body: Spotkanie <a href="%{meeting_path}">"%{meeting_title}"</a> oczekuje na zamknięcie. Dodaj raport z spotkania za pomocą przycisku "Zamknij spotkanie".
|
401
|
+
greetings: Pozdrawiamy,<br/>%{organization_name}<br/><a href="%{organization_url}">%{organization_url}</a>
|
402
|
+
hello: Witaj %{username},
|
382
403
|
subject: Teraz możesz zamknąć spotkanie z opublikowaniem raportu na platformie %{organization_name}
|
383
404
|
conference_venues: Sale konferencyjne
|
384
405
|
content_blocks:
|
385
406
|
upcoming_meetings:
|
407
|
+
name: Nadchodzące spotkania
|
386
408
|
upcoming_meetings: Nadchodzące spotkania
|
387
409
|
view_all_meetings: Pokaż wszystkie
|
388
410
|
directory:
|
@@ -390,9 +412,23 @@ pl:
|
|
390
412
|
index:
|
391
413
|
meetings: Spotkania
|
392
414
|
space_type: Przestrzeń partycypacyjna
|
415
|
+
iframe_access_level:
|
416
|
+
all: Wszyscy odwiedzający
|
417
|
+
registered: Zarejestrowani uczestnicy tego spotkania
|
418
|
+
signed_in: Tylko zalogowani uczestnicy
|
419
|
+
iframe_embed_type:
|
420
|
+
embed_in_meeting_page: Osadź na stronie spotkania
|
421
|
+
none: Żaden
|
422
|
+
open_in_live_event_page: Otwórz stronę wydarzenia na żywo (z opcjonalnymi ankietami)
|
423
|
+
open_in_new_tab: Otwórz odnośnik w nowej zakładce
|
393
424
|
last_activity:
|
394
425
|
meeting_updated_at_html: "<span>Spotkanie zaktualizowane o %{link}</span>"
|
395
426
|
new_meeting_at_html: "<span>Nowe spotkanie %{link}</span>"
|
427
|
+
layouts:
|
428
|
+
live_event:
|
429
|
+
administrate: Administruj
|
430
|
+
close: zamknij
|
431
|
+
questions: Pytania
|
396
432
|
mailer:
|
397
433
|
invite_join_meeting_mailer:
|
398
434
|
invite:
|
@@ -412,6 +448,7 @@ pl:
|
|
412
448
|
add_to_calendar: Dodaj do kalendarza
|
413
449
|
apple: Dodaj do kalendarza Apple
|
414
450
|
close_window: Zamknij okno
|
451
|
+
full_details_html: Aby uzyskać pełne szczegóły, przejdź do %{link}
|
415
452
|
google: Dodaj do kalendarza Google
|
416
453
|
outlook: Dodaj do kalendarza Outlook
|
417
454
|
count:
|
@@ -441,11 +478,14 @@ pl:
|
|
441
478
|
origin_values:
|
442
479
|
all: Wszystkie
|
443
480
|
official: Oficjalny
|
481
|
+
participants: Uczestnicy
|
482
|
+
user_groups: Grupy
|
444
483
|
scope: Zakres
|
445
484
|
search: Szukaj
|
446
485
|
type: Typ
|
447
486
|
type_values:
|
448
487
|
all: Wszystko
|
488
|
+
hybrid: Hybrydowe
|
449
489
|
in_person: Osobiście
|
450
490
|
online: Online
|
451
491
|
filters_small_view:
|
@@ -465,8 +505,14 @@ pl:
|
|
465
505
|
select_a_category: Wybierz kategorię
|
466
506
|
select_a_meeting_type: Wybierz typ spotkania
|
467
507
|
select_a_registration_type: Wybierz typ rejestracji
|
508
|
+
select_an_iframe_access_level: Wybierz poziom dostępu iframe
|
509
|
+
show_embedded_iframe_help: 'Tylko kilka usług pozwala na osadzanie się w spotkaniu lub wydarzeniu na żywo z następujących domen: %{domains}'
|
468
510
|
index:
|
511
|
+
click_here: Zobacz wszystkie spotkania
|
469
512
|
new_meeting: Nowe spotkanie
|
513
|
+
see_all: Zobacz wszystkie spotkania
|
514
|
+
see_all_withdrawn: Zobacz wszystkie wycofane spotkania
|
515
|
+
text_banner: Oglądasz listę spotkań wycofanych przez ich autorów. %{go_back_link}.
|
470
516
|
meeting_minutes:
|
471
517
|
related_information: Powiązana informacja
|
472
518
|
meetings:
|
data/config/locales/pt-BR.yml
CHANGED
@@ -19,6 +19,8 @@ pt-BR:
|
|
19
19
|
decidim_scope_id: Âmbito
|
20
20
|
decidim_user_group_id: Grupo de usuários
|
21
21
|
description: Descrição
|
22
|
+
end_time: Data Final
|
23
|
+
id: ID
|
22
24
|
iframe_embed_type: Tipo de incorporação iframe
|
23
25
|
location: Localização
|
24
26
|
location_hints: Dicas de localização
|
@@ -29,11 +31,26 @@ pt-BR:
|
|
29
31
|
registration_email_custom_content: Registro de conteúdo personalizado do e-mail
|
30
32
|
registration_form_enabled: Formulário de inscrição ativado
|
31
33
|
registration_terms: Termos de registro
|
34
|
+
registration_type: Tipo de Registro
|
32
35
|
registration_url: URL de Registro
|
33
36
|
registrations_enabled: Registos habilitados
|
37
|
+
reserved_slots: Slots reservados para esta reunião
|
38
|
+
start_time: Data Inicial
|
34
39
|
title: Título
|
35
40
|
transparent: Transparente
|
36
41
|
type_of_meeting: Tipo
|
42
|
+
meeting_agenda:
|
43
|
+
title: Título
|
44
|
+
visible: Visível
|
45
|
+
meeting_agenda_items:
|
46
|
+
description: Descrição
|
47
|
+
duration: Duração
|
48
|
+
title: Título
|
49
|
+
meeting_registration_invite:
|
50
|
+
email: E-mail
|
51
|
+
name: Nome
|
52
|
+
validate_registration_code:
|
53
|
+
code: Código
|
37
54
|
errors:
|
38
55
|
models:
|
39
56
|
meeting:
|
@@ -73,9 +90,31 @@ pt-BR:
|
|
73
90
|
admin:
|
74
91
|
filters:
|
75
92
|
meetings:
|
93
|
+
category_id_eq:
|
94
|
+
label: Categoria
|
95
|
+
closed_at_present:
|
96
|
+
label: Estado
|
97
|
+
values:
|
98
|
+
'false': Aberto
|
99
|
+
'true': Fechado
|
100
|
+
is_upcoming_true:
|
101
|
+
label: Encontro
|
102
|
+
values:
|
103
|
+
'false': Passado
|
104
|
+
'true': Próximos
|
105
|
+
scope_id_eq:
|
106
|
+
label: Escopo
|
107
|
+
with_any_origin:
|
108
|
+
label: Origem
|
109
|
+
values:
|
110
|
+
official: Oficial
|
111
|
+
participants: Participante
|
112
|
+
user_group: Grupo de Usuários
|
76
113
|
with_any_type:
|
114
|
+
label: Tipo de reunião
|
77
115
|
values:
|
78
116
|
hybrid: Híbrido
|
117
|
+
in_person: Presencialmente
|
79
118
|
online: Virtual
|
80
119
|
meeting_copies:
|
81
120
|
create:
|
@@ -88,6 +127,7 @@ pt-BR:
|
|
88
127
|
components:
|
89
128
|
meetings:
|
90
129
|
actions:
|
130
|
+
comment: Comentário
|
91
131
|
join: Junte-se
|
92
132
|
name: Reuniões
|
93
133
|
settings:
|
@@ -242,7 +282,9 @@ pt-BR:
|
|
242
282
|
select_user: Selecionar usuário
|
243
283
|
index:
|
244
284
|
filter:
|
285
|
+
accepted: Aceitou
|
245
286
|
all: Tudo
|
287
|
+
rejected: Rejeitado
|
246
288
|
sent: Enviado
|
247
289
|
filter_by: Filtrar por
|
248
290
|
invite_attendee: Convidar participante
|
@@ -355,6 +397,8 @@ pt-BR:
|
|
355
397
|
application_helper:
|
356
398
|
filter_category_values:
|
357
399
|
all: Todos
|
400
|
+
filter_meeting_space_values:
|
401
|
+
all: Todos
|
358
402
|
filter_scope_values:
|
359
403
|
all: Tudo
|
360
404
|
calendar:
|
@@ -481,6 +525,7 @@ pt-BR:
|
|
481
525
|
select_an_iframe_access_level: Por favor, selecione um nível de acesso iframe
|
482
526
|
show_embedded_iframe_help: 'Apenas alguns serviços permitem incorporar na reunião ou evento ao vivo dos seguintes domínios: %{domains}'
|
483
527
|
index:
|
528
|
+
click_here: Ver todas reuniões
|
484
529
|
new_meeting: Nova reunião
|
485
530
|
see_all: Veja todas as reuniões
|
486
531
|
see_all_withdrawn: Veja todas as reuniões retiradas
|
@@ -508,7 +553,11 @@ pt-BR:
|
|
508
553
|
join: Participe da reunião
|
509
554
|
leave: Cancelar registro
|
510
555
|
leave_confirmation: Tem certeza de que deseja cancelar seu cadastro para esta reunião?
|
556
|
+
link_available_soon: Link disponível em breve
|
557
|
+
link_closed: O link para participar da reunião estará disponível alguns minutos antes de iniciar
|
558
|
+
live_event: Esta reunião está acontecendo agora
|
511
559
|
meeting_minutes: Atas de Reunião
|
560
|
+
micro_camera_permissions_warning: Quando você clicar no botão abaixo, serão solicitadas permissões de microfone e/ou câmera e participará na videoconferência
|
512
561
|
no_slots_available: Não há slots disponíveis
|
513
562
|
organizations: Organizações participantes
|
514
563
|
registration_code_help_text: Seu código de registro
|
@@ -543,6 +592,7 @@ pt-BR:
|
|
543
592
|
fields:
|
544
593
|
closed: Fechadas
|
545
594
|
end_time: Data final
|
595
|
+
id: ID
|
546
596
|
map: Mapa
|
547
597
|
official_meeting: Reunião oficial
|
548
598
|
start_time: Data de início
|
data/config/locales/sv.yml
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
+
|
5
|
+
# Maintain your gem's version:
|
6
|
+
require "decidim/meetings/version"
|
7
|
+
|
8
|
+
# Describe your gem and declare its dependencies:
|
9
|
+
Gem::Specification.new do |s|
|
10
|
+
s.version = Decidim::Meetings.version
|
11
|
+
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
12
|
+
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
13
|
+
s.license = "AGPL-3.0"
|
14
|
+
s.homepage = "https://github.com/decidim/decidim"
|
15
|
+
s.required_ruby_version = "~> 3.0.0"
|
16
|
+
|
17
|
+
s.name = "decidim-meetings"
|
18
|
+
s.summary = "Decidim meetings module"
|
19
|
+
s.description = "A meetings component for decidim's participatory spaces."
|
20
|
+
|
21
|
+
s.files = Dir.chdir(__dir__) do
|
22
|
+
`git ls-files -z`.split("\x0").select do |f|
|
23
|
+
(File.expand_path(f) == __FILE__) ||
|
24
|
+
f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
s.add_dependency "decidim-core", Decidim::Meetings.version
|
29
|
+
s.add_dependency "decidim-forms", Decidim::Meetings.version
|
30
|
+
s.add_dependency "icalendar", "~> 2.5"
|
31
|
+
|
32
|
+
s.add_development_dependency "decidim-admin", Decidim::Meetings.version
|
33
|
+
s.add_development_dependency "decidim-assemblies", Decidim::Meetings.version
|
34
|
+
s.add_development_dependency "decidim-dev", Decidim::Meetings.version
|
35
|
+
s.add_development_dependency "decidim-participatory_processes", Decidim::Meetings.version
|
36
|
+
end
|
@@ -57,7 +57,7 @@ module Decidim
|
|
57
57
|
# meeting for the given participatory space.
|
58
58
|
Decidim.view_hooks.register(:upcoming_meeting_for_card, priority: Decidim::ViewHooks::LOW_PRIORITY) do |view_context|
|
59
59
|
published_components = Decidim::Component.where(participatory_space: view_context.current_participatory_space).published
|
60
|
-
upcoming_meeting = Decidim::Meetings::Meeting.where(component: published_components).published.upcoming.order(:start_time, :end_time).first
|
60
|
+
upcoming_meeting = Decidim::Meetings::Meeting.where(component: published_components).not_hidden.except_withdrawn.published.upcoming.order(:start_time, :end_time).first
|
61
61
|
|
62
62
|
next unless upcoming_meeting
|
63
63
|
|
@@ -6,9 +6,12 @@ require "decidim/participatory_processes/test/factories"
|
|
6
6
|
|
7
7
|
FactoryBot.define do
|
8
8
|
factory :meeting_component, parent: :component do
|
9
|
-
|
9
|
+
transient do
|
10
|
+
skip_injection { false }
|
11
|
+
end
|
12
|
+
name { generate_component_name(participatory_space.organization.available_locales, :meetings, skip_injection: skip_injection) }
|
10
13
|
manifest_name { :meetings }
|
11
|
-
participatory_space { create(:participatory_process, :with_steps, organization: organization) }
|
14
|
+
participatory_space { create(:participatory_process, :with_steps, organization: organization, skip_injection: skip_injection) }
|
12
15
|
|
13
16
|
trait :with_creation_enabled do
|
14
17
|
settings do
|
@@ -20,10 +23,14 @@ FactoryBot.define do
|
|
20
23
|
end
|
21
24
|
|
22
25
|
factory :meeting, class: "Decidim::Meetings::Meeting" do
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
26
|
+
transient do
|
27
|
+
skip_injection { false }
|
28
|
+
end
|
29
|
+
|
30
|
+
title { generate_localized_title(:meeting_title, skip_injection: skip_injection) }
|
31
|
+
description { generate_localized_description(:meeting_description, skip_injection: skip_injection) }
|
32
|
+
location { generate_localized_description(:meeting_location, skip_injection: skip_injection) }
|
33
|
+
location_hints { generate_localized_description(:meeting_location_hints, skip_injection: skip_injection) }
|
27
34
|
address { Faker::Lorem.sentence(word_count: 3) }
|
28
35
|
latitude { Faker::Address.latitude }
|
29
36
|
longitude { Faker::Address.longitude }
|
@@ -33,10 +40,10 @@ FactoryBot.define do
|
|
33
40
|
transparent { true }
|
34
41
|
questionnaire { build(:questionnaire) }
|
35
42
|
registration_form_enabled { true }
|
36
|
-
registration_terms {
|
43
|
+
registration_terms { generate_localized_description(:meeting_registration_terms, skip_injection: skip_injection) }
|
37
44
|
registration_type { :on_this_platform }
|
38
45
|
type_of_meeting { :in_person }
|
39
|
-
component { build(:
|
46
|
+
component { build(:meeting_component) }
|
40
47
|
iframe_access_level { :all }
|
41
48
|
iframe_embed_type { :none }
|
42
49
|
|
@@ -71,7 +78,7 @@ FactoryBot.define do
|
|
71
78
|
end
|
72
79
|
|
73
80
|
trait :not_official do
|
74
|
-
author { create(:user, organization: component.organization) if component }
|
81
|
+
author { create(:user, organization: component.organization, skip_injection: skip_injection) if component }
|
75
82
|
end
|
76
83
|
|
77
84
|
trait :with_services do
|
@@ -82,7 +89,7 @@ FactoryBot.define do
|
|
82
89
|
end
|
83
90
|
|
84
91
|
after(:build) do |meeting, evaluator|
|
85
|
-
meeting.services = evaluator.services || build_list(:service, 2, meeting: meeting)
|
92
|
+
meeting.services = evaluator.services || build_list(:service, 2, meeting: meeting, skip_injection: evaluator.skip_injection)
|
86
93
|
end
|
87
94
|
end
|
88
95
|
|
@@ -90,15 +97,15 @@ FactoryBot.define do
|
|
90
97
|
|
91
98
|
trait :user_group_author do
|
92
99
|
author do
|
93
|
-
create(:user, organization: component.organization) if component
|
100
|
+
create(:user, organization: component.organization, skip_injection: skip_injection) if component
|
94
101
|
end
|
95
102
|
user_group do
|
96
|
-
create(:user_group, :verified, organization: component.organization, users: [author]) if component
|
103
|
+
create(:user_group, :verified, organization: component.organization, users: [author], skip_injection: skip_injection) if component
|
97
104
|
end
|
98
105
|
end
|
99
106
|
|
100
107
|
trait :closed do
|
101
|
-
closing_report { generate_localized_title }
|
108
|
+
closing_report { generate_localized_title(:meeting_closing_report, skip_injection: skip_injection) }
|
102
109
|
attendees_count { rand(50) }
|
103
110
|
contributions_count { rand(50) }
|
104
111
|
attending_organizations { Array.new(3) { Faker::TvShows::GameOfThrones.house }.join(", ") }
|
@@ -117,7 +124,7 @@ FactoryBot.define do
|
|
117
124
|
registrations_enabled { true }
|
118
125
|
available_slots { 10 }
|
119
126
|
reserved_slots { 4 }
|
120
|
-
registration_terms { generate_localized_title }
|
127
|
+
registration_terms { generate_localized_title(:meeting_registration_terms, skip_injection: skip_injection) }
|
121
128
|
end
|
122
129
|
|
123
130
|
trait :past do
|
@@ -170,41 +177,53 @@ FactoryBot.define do
|
|
170
177
|
end
|
171
178
|
|
172
179
|
factory :registration, class: "Decidim::Meetings::Registration" do
|
180
|
+
transient do
|
181
|
+
skip_injection { false }
|
182
|
+
end
|
173
183
|
meeting
|
174
184
|
user
|
175
185
|
end
|
176
186
|
|
177
187
|
factory :agenda, class: "Decidim::Meetings::Agenda" do
|
188
|
+
transient do
|
189
|
+
skip_injection { false }
|
190
|
+
end
|
178
191
|
meeting
|
179
|
-
title { generate_localized_title }
|
192
|
+
title { generate_localized_title(:meeting_agenda_title, skip_injection: skip_injection) }
|
180
193
|
visible { true }
|
181
194
|
|
182
195
|
trait :with_agenda_items do
|
183
|
-
after(:create) do |agenda,
|
184
|
-
create_list(:agenda_item, 2, :with_children, agenda: agenda)
|
196
|
+
after(:create) do |agenda, evaluator|
|
197
|
+
create_list(:agenda_item, 2, :with_children, agenda: agenda, skip_injection: evaluator.skip_injection)
|
185
198
|
end
|
186
199
|
end
|
187
200
|
end
|
188
201
|
|
189
202
|
factory :agenda_item, class: "Decidim::Meetings::AgendaItem" do
|
203
|
+
transient do
|
204
|
+
skip_injection { false }
|
205
|
+
end
|
190
206
|
agenda
|
191
|
-
title { generate_localized_title }
|
192
|
-
description {
|
207
|
+
title { generate_localized_title(:meeting_agenda_item_title, skip_injection: skip_injection) }
|
208
|
+
description { generate_localized_description(:meeting_agenda_item_description, skip_injection: skip_injection) }
|
193
209
|
duration { 15 }
|
194
210
|
position { 0 }
|
195
211
|
|
196
212
|
trait :with_parent do
|
197
|
-
parent { create(:agenda_item, agenda: agenda) }
|
213
|
+
parent { create(:agenda_item, agenda: agenda, skip_injection: skip_injection) }
|
198
214
|
end
|
199
215
|
|
200
216
|
trait :with_children do
|
201
217
|
after(:create) do |agenda_item, evaluator|
|
202
|
-
create_list(:agenda_item, 2, parent: agenda_item, agenda: evaluator.agenda)
|
218
|
+
create_list(:agenda_item, 2, parent: agenda_item, agenda: evaluator.agenda, skip_injection: evaluator.skip_injection)
|
203
219
|
end
|
204
220
|
end
|
205
221
|
end
|
206
222
|
|
207
223
|
factory :invite, class: "Decidim::Meetings::Invite" do
|
224
|
+
transient do
|
225
|
+
skip_injection { false }
|
226
|
+
end
|
208
227
|
meeting
|
209
228
|
user
|
210
229
|
sent_at { 1.day.ago }
|
@@ -221,31 +240,41 @@ FactoryBot.define do
|
|
221
240
|
end
|
222
241
|
|
223
242
|
factory :service, class: "Decidim::Meetings::Service" do
|
243
|
+
transient do
|
244
|
+
skip_injection { false }
|
245
|
+
end
|
224
246
|
meeting
|
225
|
-
title { generate_localized_title }
|
226
|
-
description {
|
247
|
+
title { generate_localized_title(:meeting_service_title, skip_injection: skip_injection) }
|
248
|
+
description { generate_localized_description(:meeting_service_description, skip_injection: skip_injection) }
|
227
249
|
end
|
228
250
|
|
229
251
|
factory :poll, class: "Decidim::Meetings::Poll" do
|
252
|
+
transient do
|
253
|
+
skip_injection { false }
|
254
|
+
end
|
230
255
|
meeting
|
231
256
|
end
|
232
257
|
|
233
258
|
factory :meetings_poll_questionnaire, class: "Decidim::Meetings::Questionnaire" do
|
234
|
-
|
259
|
+
transient do
|
260
|
+
skip_injection { false }
|
261
|
+
end
|
262
|
+
questionnaire_for { build(:poll, skip_injection: skip_injection) }
|
235
263
|
end
|
236
264
|
|
237
265
|
factory :meetings_poll_question, class: "Decidim::Meetings::Question" do
|
238
266
|
transient do
|
267
|
+
skip_injection { false }
|
239
268
|
options { [] }
|
240
269
|
end
|
241
270
|
|
242
|
-
body { generate_localized_title }
|
271
|
+
body { generate_localized_title(:meeting_poll_question_body, skip_injection: skip_injection) }
|
243
272
|
position { 0 }
|
244
273
|
status { 0 }
|
245
274
|
question_type { Decidim::Meetings::Question::QUESTION_TYPES.first }
|
246
275
|
questionnaire factory: :meetings_poll_questionnaire
|
247
276
|
answer_options do
|
248
|
-
Array.new(3).collect { build(:meetings_poll_answer_option, question: nil) }
|
277
|
+
Array.new(3).collect { build(:meetings_poll_answer_option, question: nil, skip_injection: skip_injection) }
|
249
278
|
end
|
250
279
|
|
251
280
|
trait :unpublished do
|
@@ -262,18 +291,27 @@ FactoryBot.define do
|
|
262
291
|
end
|
263
292
|
|
264
293
|
factory :meetings_poll_answer, class: "Decidim::Meetings::Answer" do
|
294
|
+
transient do
|
295
|
+
skip_injection { false }
|
296
|
+
end
|
265
297
|
questionnaire factory: :meetings_poll_questionnaire
|
266
|
-
question { create(:meetings_poll_question, questionnaire: questionnaire) }
|
267
|
-
user { create(:user, organization: questionnaire.questionnaire_for.organization) }
|
298
|
+
question { create(:meetings_poll_question, questionnaire: questionnaire, skip_injection: skip_injection) }
|
299
|
+
user { create(:user, organization: questionnaire.questionnaire_for.organization, skip_injection: skip_injection) }
|
268
300
|
end
|
269
301
|
|
270
302
|
factory :meetings_poll_answer_option, class: "Decidim::Meetings::AnswerOption" do
|
271
|
-
|
303
|
+
transient do
|
304
|
+
skip_injection { false }
|
305
|
+
end
|
306
|
+
question { create(:meetings_poll_question, skip_injection: skip_injection) }
|
272
307
|
body { generate_localized_title }
|
273
308
|
end
|
274
309
|
|
275
310
|
factory :meetings_poll_answer_choice, class: "Decidim::Meetings::AnswerChoice" do
|
311
|
+
transient do
|
312
|
+
skip_injection { false }
|
313
|
+
end
|
276
314
|
answer factory: :meetings_poll_answer
|
277
|
-
answer_option { create(:meetings_poll_answer_option, question: answer.question) }
|
315
|
+
answer_option { create(:meetings_poll_answer_option, question: answer.question, skip_injection: skip_injection) }
|
278
316
|
end
|
279
317
|
end
|