tramway-event 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/tramway/event/events/show.css.sass +2 -0
- data/app/controllers/tramway/event/events_controller.rb +2 -1
- data/app/decorators/tramway/event/section_decorator.rb +11 -0
- data/app/decorators/tramway/event/section_feature_decorator.rb +8 -1
- data/app/views/tramway/event/events/show.html.haml +8 -5
- data/lib/tramway/event/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59d26d73273e6ca5ae354056b8ddfb3c16d746d75ce7506e33e3d907e90ba51f
|
4
|
+
data.tar.gz: e91be86a4e03b116f840b3635c7a6eea8584da7248f5c0e9213a3b4480e5b849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46a8316a5e8932d31c8a66b1e9bd744a1458b253fd9ba67ee8ae083f7049ae714d5ccbf5ead24f0839211740e027f7f0444f9418f1c72a0a5c08ccc0fd73bbbd
|
7
|
+
data.tar.gz: 1d0328ff79d14bdecdc09d66d9cbc844291b020a8cbde3737e108905fca625835ee3f225e3dc8fc170cb7961e64948a21aa55ed616825078b9fad26309a71e1c
|
@@ -6,6 +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
|
-
@
|
9
|
+
@sections_as_features = @event.sections.map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
|
10
|
+
@sections = @event.sections.map { |s| ::Tramway::Event::SectionDecorator.decorate s }
|
10
11
|
end
|
11
12
|
end
|
@@ -4,4 +4,15 @@ class Tramway::Event::SectionDecorator < ::Tramway::Core::ApplicationDecorator
|
|
4
4
|
[ :all ]
|
5
5
|
end
|
6
6
|
end
|
7
|
+
|
8
|
+
delegate :title, to: :object
|
9
|
+
delegate :description, to: :object
|
10
|
+
|
11
|
+
def background
|
12
|
+
object.photo
|
13
|
+
end
|
14
|
+
|
15
|
+
def anchor
|
16
|
+
"section-#{object.id}"
|
17
|
+
end
|
7
18
|
end
|
@@ -2,9 +2,16 @@ class ::Tramway::Event::SectionFeatureDecorator < ::Tramway::Core::ApplicationDe
|
|
2
2
|
delegate :icon, to: :object
|
3
3
|
delegate :title, to: :object
|
4
4
|
delegate :description, to: :object
|
5
|
-
|
5
|
+
|
6
|
+
def text
|
7
|
+
object.description.scan(/<strong>.*?<\/strong>/).join(' ')
|
8
|
+
end
|
6
9
|
|
7
10
|
def image
|
8
11
|
object.photo.small.url
|
9
12
|
end
|
13
|
+
|
14
|
+
def anchor
|
15
|
+
"section-#{object.id}"
|
16
|
+
end
|
10
17
|
end
|
@@ -2,8 +2,6 @@
|
|
2
2
|
= @event.title
|
3
3
|
- content_for :body_content do
|
4
4
|
= stylesheet_link_tag 'tramway/event/events/show'
|
5
|
-
|
6
|
-
|
7
5
|
- if params[:flash] == 'success'
|
8
6
|
.alert.alert-success{role: "alert"}
|
9
7
|
%button.close{"aria-label" => "Close", "data-dismiss" => "alert", type: "button"}
|
@@ -29,6 +27,11 @@
|
|
29
27
|
или пишите на email
|
30
28
|
= mail_to 'kalashnikov@ulmic.ru'
|
31
29
|
= render 'tramway/landing/blocks/templates/full_page', block: @event, buttons: []
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
%main
|
31
|
+
.container
|
32
|
+
= render 'tramway/landing/blocks/templates/features_list', block: OpenStruct.new(title: "Направления IT Way'18", description: "Вы можете выбрать любое из направлений", anchor: :features), collection: @sections_as_features
|
33
|
+
%hr
|
34
|
+
= render 'tramway/event/participants/form'
|
35
|
+
%hr
|
36
|
+
- @sections.each do |section|
|
37
|
+
= render 'tramway/landing/blocks/templates/section_with_image_and_text', block: section
|
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.2'
|
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-09-
|
11
|
+
date: 2018-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails engine for events
|
14
14
|
email:
|