tramway-event 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/tramway/event/events_controller.rb +2 -2
- data/app/forms/tramway/event/section_form.rb +3 -2
- data/app/views/tramway/event/events/show.html.haml +1 -1
- data/lib/tramway/event/generators/install_generator.rb +1 -0
- data/lib/tramway/event/generators/templates/add_position_to_tramway_event_sections.rb +5 -0
- data/lib/tramway/event/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12871505e7bc517e14e48ef7699850fb07c79fa3286302bbb4c31e2fa822e3f8
|
4
|
+
data.tar.gz: 740e8dc55922dd36a39622fea9c4bd0586b93e7e1f2ca34e08ce085082caaac5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d9cb29b912cd9c6f15873658abcf7cd3b321b7570f4d59178aeb9e186d53c2753461833ad4a164fd27f5ef6d89cd9e4308ba17f811fe3dc30f7d3b62a15a70
|
7
|
+
data.tar.gz: bb23299cbd182e11e597258e72e7c3e72c004a24fae2ba0b9d2ea63475c215defcc25823f14924e0a7a4d11e49afa5238b02c63225c8068b70a291b1cdeea8ce
|
@@ -6,7 +6,7 @@ class Tramway::Event::EventsController < Tramway::Event::ApplicationController
|
|
6
6
|
class_name = "ParticipantExtendedForm#{request.uuid.gsub('-', '')}"
|
7
7
|
form_class = ::Tramway::Core::ExtendableForm.new(class_name, *@event.participant_form_fields.inputs_list.map(&:title).map(&:to_sym))
|
8
8
|
@participant_form = form_class.new ::Tramway::Event::Participant.new
|
9
|
-
@sections_as_features = @event.sections.map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
|
10
|
-
@sections = @event.sections.map { |s| ::Tramway::Event::SectionDecorator.decorate s }
|
9
|
+
@sections_as_features = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
|
10
|
+
@sections = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s }
|
11
11
|
end
|
12
12
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Tramway::Event::SectionForm < ::Tramway::Core::ApplicationForm
|
2
|
-
properties :event, :title, :description, :photo, :icon
|
2
|
+
properties :event, :title, :description, :photo, :icon, :position
|
3
3
|
association :event
|
4
4
|
|
5
5
|
def initialize(object)
|
@@ -8,7 +8,8 @@ class Tramway::Event::SectionForm < ::Tramway::Core::ApplicationForm
|
|
8
8
|
description: :ckeditor,
|
9
9
|
event: :association,
|
10
10
|
photo: :file,
|
11
|
-
icon: :string
|
11
|
+
icon: :string,
|
12
|
+
position: :numeric
|
12
13
|
end
|
13
14
|
end
|
14
15
|
end
|
@@ -32,7 +32,7 @@
|
|
32
32
|
= render 'tramway/landing/blocks/templates/features_list', block: OpenStruct.new(title: "Направления IT Way'18", description: "Вы можете выбрать любое из направлений", anchor: :features), collection: @sections_as_features
|
33
33
|
%hr
|
34
34
|
= render 'tramway/event/participants/form'
|
35
|
-
%
|
35
|
+
%br
|
36
36
|
- @sections.each_with_index do |section, index|
|
37
37
|
= render 'tramway/landing/blocks/templates/section_with_image_and_text', block: section
|
38
38
|
- if index < @sections.count - 1
|
@@ -23,6 +23,7 @@ module Tramway::Event::Generators
|
|
23
23
|
migration_template 'add_position_to_tramway_event_participant_form_fields.rb', 'db/migrate/add_position_to_tramway_event_participant_form_fields.rb'
|
24
24
|
migration_template 'create_tramway_event_sections.rb', 'db/migrate/create_tramway_event_sections.rb'
|
25
25
|
migration_template 'add_icon_to_tramway_event_sections.rb', 'db/migrate/add_icon_to_tramway_event_sections.rb'
|
26
|
+
migration_template 'add_position_to_tramway_event_sections.rb', 'db/migrate/add_position_to_tramway_event_sections.rb'
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- lib/tramway/event/generators/templates/add_options_to_tramway_event_participant_form_fields.rb
|
61
61
|
- lib/tramway/event/generators/templates/add_photo_to_tramway_event_events.rb
|
62
62
|
- lib/tramway/event/generators/templates/add_position_to_tramway_event_participant_form_fields.rb
|
63
|
+
- lib/tramway/event/generators/templates/add_position_to_tramway_event_sections.rb
|
63
64
|
- lib/tramway/event/generators/templates/create_tramway_event_events.rb
|
64
65
|
- lib/tramway/event/generators/templates/create_tramway_event_participant_form_fields.rb
|
65
66
|
- lib/tramway/event/generators/templates/create_tramway_event_participants.rb
|