tramway-event 1.4 → 1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/decorators/tramway/event/person_decorator.rb +13 -0
- data/app/forms/tramway/event/person_form.rb +16 -0
- data/app/models/tramway/event/person.rb +5 -0
- data/config/initializers/tramway.rb +1 -0
- data/config/locales/models.yml +4 -0
- data/lib/tramway/event/generators/install_generator.rb +17 -10
- data/lib/tramway/event/generators/templates/create_tramway_event_people.rb +12 -0
- data/lib/tramway/event/generators/templates/create_tramway_event_people_sections.rb +10 -0
- data/lib/tramway/event/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 282da529cbfd14070a3056924a6ed6e277d41f3166f5c121193847963fbca059
|
4
|
+
data.tar.gz: 8f10fa805fcc1809072bc3061b38dcd0401103607d1f1199fa46a5cc2882369c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04b16cf9695f7d9f0d00306feeab66f5db0b257854d4822ea3bb5031ddeefae5fb3b20656fc48f0acc1d6600176bc413398d57db7085801e0f0a4ce67beddc41
|
7
|
+
data.tar.gz: 3170d6c32b48a811ec70a57b9b11eeeaa343979da769a32f722f439212dae0b997a318b75601c4cbaf884102d63840f8bd09e8ca0629580a0c68d4a72d926769
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Tramway::Event::PersonForm < ::Tramway::Core::ApplicationForm
|
2
|
+
properties :first_name, :last_name, :photo, :sections
|
3
|
+
|
4
|
+
def initialize(object)
|
5
|
+
super(object).tap do
|
6
|
+
form_properties first_name: :string,
|
7
|
+
last_name: :string,
|
8
|
+
photo: :file,
|
9
|
+
sections: :selectize
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def sections=(value)
|
14
|
+
model.sections = ::Tramway::Event::Section.where id: value.split(',')
|
15
|
+
end
|
16
|
+
end
|
data/config/locales/models.yml
CHANGED
@@ -5,6 +5,7 @@ ru:
|
|
5
5
|
tramway/event/participant: Участник
|
6
6
|
tramway/event/participant_form_field: Поле анкеты
|
7
7
|
tramway/event/section: Секция
|
8
|
+
tramway/event/person: Член команды
|
8
9
|
attributes:
|
9
10
|
tramway/event/event:
|
10
11
|
title: Название
|
@@ -24,3 +25,6 @@ ru:
|
|
24
25
|
tramway/event/participant_form_field:
|
25
26
|
plural: поля анкеты
|
26
27
|
genitive: поле анкеты
|
28
|
+
tramway/event/person:
|
29
|
+
genitive: профиль члена команды
|
30
|
+
plural: Команда
|
@@ -15,16 +15,23 @@ module Tramway::Event::Generators
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def copy_migrations
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
migrations = [
|
19
|
+
:create_tramway_event_events,
|
20
|
+
:add_photo_to_tramway_event_events,
|
21
|
+
:create_tramway_event_participant_form_fields,
|
22
|
+
:create_tramway_event_participants,
|
23
|
+
:add_options_to_tramway_event_participant_form_fields,
|
24
|
+
:add_position_to_tramway_event_participant_form_fields,
|
25
|
+
:create_tramway_event_sections,
|
26
|
+
:add_icon_to_tramway_event_sections,
|
27
|
+
:add_position_to_tramway_event_sections,
|
28
|
+
:add_status_to_tramway_event_events,
|
29
|
+
:create_tramway_event_people,
|
30
|
+
:create_tramway_event_people_sections
|
31
|
+
]
|
32
|
+
migrations.each do |migration|
|
33
|
+
migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
|
34
|
+
end
|
28
35
|
end
|
29
36
|
end
|
30
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.5'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails engine for events
|
14
14
|
email:
|
@@ -31,12 +31,14 @@ files:
|
|
31
31
|
- app/decorators/tramway/event/event_link_decorator.rb
|
32
32
|
- app/decorators/tramway/event/participant_decorator.rb
|
33
33
|
- app/decorators/tramway/event/participant_form_field_decorator.rb
|
34
|
+
- app/decorators/tramway/event/person_decorator.rb
|
34
35
|
- app/decorators/tramway/event/section_decorator.rb
|
35
36
|
- app/decorators/tramway/event/section_feature_decorator.rb
|
36
37
|
- app/forms/tramway/event/event_form.rb
|
37
38
|
- app/forms/tramway/event/participant_extended_form_creator.rb
|
38
39
|
- app/forms/tramway/event/participant_form.rb
|
39
40
|
- app/forms/tramway/event/participant_form_field_form.rb
|
41
|
+
- app/forms/tramway/event/person_form.rb
|
40
42
|
- app/forms/tramway/event/section_form.rb
|
41
43
|
- app/helpers/tramway/event/application_helper.rb
|
42
44
|
- app/jobs/tramway/event/application_job.rb
|
@@ -45,6 +47,7 @@ files:
|
|
45
47
|
- app/models/tramway/event/event.rb
|
46
48
|
- app/models/tramway/event/participant.rb
|
47
49
|
- app/models/tramway/event/participant_form_field.rb
|
50
|
+
- app/models/tramway/event/person.rb
|
48
51
|
- app/models/tramway/event/section.rb
|
49
52
|
- app/views/tramway/event/events/_show_page.html.haml
|
50
53
|
- app/views/tramway/event/events/show.html.haml
|
@@ -67,6 +70,8 @@ files:
|
|
67
70
|
- lib/tramway/event/generators/templates/create_tramway_event_events.rb
|
68
71
|
- lib/tramway/event/generators/templates/create_tramway_event_participant_form_fields.rb
|
69
72
|
- lib/tramway/event/generators/templates/create_tramway_event_participants.rb
|
73
|
+
- lib/tramway/event/generators/templates/create_tramway_event_people.rb
|
74
|
+
- lib/tramway/event/generators/templates/create_tramway_event_people_sections.rb
|
70
75
|
- lib/tramway/event/generators/templates/create_tramway_event_sections.rb
|
71
76
|
- lib/tramway/event/version.rb
|
72
77
|
homepage: https://github.com/ulmic/tramway-event
|