tramway-event 1.9.27.6 → 1.9.28.4
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/event_decorator.rb +1 -0
- data/app/decorators/tramway/event/participant_decorator.rb +1 -1
- data/app/decorators/tramway/event/{participant_xlsx_decorator.rb → participant_xls_decorator.rb} +10 -2
- data/app/forms/{tramway → admin/tramway}/event/event_form.rb +3 -2
- data/app/forms/{tramway → admin/tramway}/event/partaking_form.rb +1 -1
- data/app/forms/{tramway → admin/tramway}/event/participant_form.rb +1 -1
- data/app/forms/{tramway → admin/tramway}/event/participant_form_field_form.rb +1 -1
- data/app/forms/{tramway → admin/tramway}/event/person_form.rb +1 -1
- data/app/forms/{tramway → admin/tramway}/event/place_form.rb +1 -1
- data/app/forms/{tramway → admin/tramway}/event/section_form.rb +1 -1
- data/app/models/tramway/event/event.rb +1 -1
- data/config/locales/models.yml +1 -0
- data/lib/tramway/event/generators/install_generator.rb +2 -1
- data/lib/tramway/event/generators/templates/add_short_description_to_tramway_event_events.rb +7 -0
- data/lib/tramway/event/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c67bc155b83f7cbba7a4de8635d9ac44dc90e493bc14bcb9e5bc9579a3d5044
|
4
|
+
data.tar.gz: aa06f7d84bc5d0f81693278ec4ffc015eb6c9b0cba8aefab5de06d0f227feb7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52a81fe64f947ae5cd71c661b9a82fbf7bd625c40d7d9dc246951db5350c1dcd47d3cd9cd79edd2e4b012886c29626ecc35bd2aaa1e7a779865a4836272c881c
|
7
|
+
data.tar.gz: de60ed038290c8b289504bf049ed551dec05f4ec346d519c143b81e96899e42f579507e5aa584013fff3b34f8f654368c884341673288bcf2eb93bcdd33bd57a
|
@@ -4,7 +4,7 @@ class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorat
|
|
4
4
|
include HTMLTagsHelpers
|
5
5
|
class << self
|
6
6
|
def collections
|
7
|
-
%i[requested waiting prev_approved without_answer approved rejected reserved
|
7
|
+
%i[all requested waiting prev_approved without_answer approved rejected reserved]
|
8
8
|
end
|
9
9
|
|
10
10
|
def list_attributes
|
data/app/decorators/tramway/event/{participant_xlsx_decorator.rb → participant_xls_decorator.rb}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Tramway::Event::
|
3
|
+
class Tramway::Event::ParticipantXlsDecorator < Tramway::Export::Xls::ApplicationDecorator
|
4
4
|
class << self
|
5
5
|
def columns
|
6
6
|
%i[full_name email phone organization event].map do |attribute|
|
@@ -9,23 +9,31 @@ class Tramway::Event::ParticipantXlsxDecorator < Tramway::Export::Xlsx::Applicat
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def filename
|
12
|
-
'participants.
|
12
|
+
'participants.xls'
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
def full_name
|
17
|
+
return unless object.values
|
18
|
+
|
17
19
|
"#{object.values['Фамилия'] || object.values['Фамилия ']} #{object.values['Имя'] || object.values['Имя ']}"
|
18
20
|
end
|
19
21
|
|
20
22
|
def email
|
23
|
+
return unless object.values
|
24
|
+
|
21
25
|
object.values['Email']
|
22
26
|
end
|
23
27
|
|
24
28
|
def phone
|
29
|
+
return unless object.values
|
30
|
+
|
25
31
|
object.values['Телефон']
|
26
32
|
end
|
27
33
|
|
28
34
|
def organization
|
35
|
+
return unless object.values
|
36
|
+
|
29
37
|
object.values['Место работы/ Учебное заведение']
|
30
38
|
end
|
31
39
|
|
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Tramway::Event::EventForm < ::Tramway::Core::ApplicationForm
|
3
|
+
class Admin::Tramway::Event::EventForm < ::Tramway::Core::ApplicationForm
|
4
4
|
properties :title, :description, :begin_date, :end_date, :photo, :status,
|
5
|
-
:request_collecting_begin_date, :request_collecting_end_date
|
5
|
+
:request_collecting_begin_date, :request_collecting_end_date, :short_description
|
6
6
|
|
7
7
|
def initialize(object)
|
8
8
|
super(object).tap do
|
9
9
|
form_properties title: :string,
|
10
|
+
short_description: :text,
|
10
11
|
description: :ckeditor,
|
11
12
|
begin_date: :date_picker,
|
12
13
|
end_date: :date_picker,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Tramway::Event::PartakingForm < ::Tramway::Core::ApplicationForm
|
3
|
+
class Admin::Tramway::Event::PartakingForm < ::Tramway::Core::ApplicationForm
|
4
4
|
properties :part_id, :part_type, :person_id, :position
|
5
5
|
associations :person, :part
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Tramway::Event::ParticipantFormFieldForm < ::Tramway::Core::ExtendedApplicationForm
|
3
|
+
class Admin::Tramway::Event::ParticipantFormFieldForm < ::Tramway::Core::ExtendedApplicationForm
|
4
4
|
properties :title, :description, :field_type, :options, :position, :list_field
|
5
5
|
association :event
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Tramway::Event::SectionForm < ::Tramway::Core::ApplicationForm
|
3
|
+
class Admin::Tramway::Event::SectionForm < ::Tramway::Core::ApplicationForm
|
4
4
|
properties :event, :title, :description, :photo, :icon, :position
|
5
5
|
association :event
|
6
6
|
|
@@ -14,7 +14,7 @@ class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
|
|
14
14
|
enumerize :status, default: :common, in: %i[common main]
|
15
15
|
|
16
16
|
scope :main_event, -> { active.where(status: :main) }
|
17
|
-
scope :actual, -> { where
|
17
|
+
scope :actual, -> { order(:begin_date).where('end_date > ?', DateTime.now) }
|
18
18
|
scope :past, -> { where 'end_date < ?', DateTime.now }
|
19
19
|
|
20
20
|
def request_collecting_state
|
data/config/locales/models.yml
CHANGED
@@ -46,7 +46,8 @@ module Tramway::Event::Generators
|
|
46
46
|
:add_description_to_tramway_event_people,
|
47
47
|
|
48
48
|
:create_tramway_event_places,
|
49
|
-
:create_tramway_event_events_places
|
49
|
+
:create_tramway_event_events_places,
|
50
|
+
:add_short_description_to_tramway_event_events
|
50
51
|
]
|
51
52
|
migrations.each do |migration|
|
52
53
|
migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
|
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.9.
|
4
|
+
version: 1.9.28.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails engine for events
|
14
14
|
email:
|
@@ -35,19 +35,19 @@ files:
|
|
35
35
|
- app/decorators/tramway/event/partaking_feature_decorator.rb
|
36
36
|
- app/decorators/tramway/event/participant_decorator.rb
|
37
37
|
- app/decorators/tramway/event/participant_form_field_decorator.rb
|
38
|
-
- app/decorators/tramway/event/
|
38
|
+
- app/decorators/tramway/event/participant_xls_decorator.rb
|
39
39
|
- app/decorators/tramway/event/person_decorator.rb
|
40
40
|
- app/decorators/tramway/event/place_decorator.rb
|
41
41
|
- app/decorators/tramway/event/section_decorator.rb
|
42
42
|
- app/decorators/tramway/event/section_feature_decorator.rb
|
43
|
-
- app/forms/tramway/event/event_form.rb
|
44
|
-
- app/forms/tramway/event/partaking_form.rb
|
43
|
+
- app/forms/admin/tramway/event/event_form.rb
|
44
|
+
- app/forms/admin/tramway/event/partaking_form.rb
|
45
|
+
- app/forms/admin/tramway/event/participant_form.rb
|
46
|
+
- app/forms/admin/tramway/event/participant_form_field_form.rb
|
47
|
+
- app/forms/admin/tramway/event/person_form.rb
|
48
|
+
- app/forms/admin/tramway/event/place_form.rb
|
49
|
+
- app/forms/admin/tramway/event/section_form.rb
|
45
50
|
- app/forms/tramway/event/participant_extended_form_creator.rb
|
46
|
-
- app/forms/tramway/event/participant_form.rb
|
47
|
-
- app/forms/tramway/event/participant_form_field_form.rb
|
48
|
-
- app/forms/tramway/event/person_form.rb
|
49
|
-
- app/forms/tramway/event/place_form.rb
|
50
|
-
- app/forms/tramway/event/section_form.rb
|
51
51
|
- app/helpers/tramway/event/application_helper.rb
|
52
52
|
- app/jobs/tramway/event/application_job.rb
|
53
53
|
- app/mailers/tramway/event/application_mailer.rb
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/tramway/event/generators/templates/add_position_to_tramway_event_participant_form_fields.rb
|
83
83
|
- lib/tramway/event/generators/templates/add_position_to_tramway_event_sections.rb
|
84
84
|
- lib/tramway/event/generators/templates/add_request_period_to_tramway_event_events.rb
|
85
|
+
- lib/tramway/event/generators/templates/add_short_description_to_tramway_event_events.rb
|
85
86
|
- lib/tramway/event/generators/templates/add_state_to_tramway_event_partakings.rb
|
86
87
|
- lib/tramway/event/generators/templates/add_status_to_tramway_event_events.rb
|
87
88
|
- lib/tramway/event/generators/templates/create_tramway_event_events.rb
|