tramway-event 1.1 → 1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 384dc18b6aaa234c4d0c80914b1d0226c4d93802afbbab326527ae2bfd3e3131
4
- data.tar.gz: 273138747eab3764f22d6430fd3913ca64da20d49ba35d6cf979a466230da084
3
+ metadata.gz: 59d26d73273e6ca5ae354056b8ddfb3c16d746d75ce7506e33e3d907e90ba51f
4
+ data.tar.gz: e91be86a4e03b116f840b3635c7a6eea8584da7248f5c0e9213a3b4480e5b849
5
5
  SHA512:
6
- metadata.gz: 37d17fcadf7e8cfc40fc85927ba681b3d5e9bdbe4baec13c274124371582693f8a73ec3b186204556b3d0e434a40950489d8e4d5365558609eb4441aab75cf80
7
- data.tar.gz: 60fb871a9ec3a297ad310957d68416951868ff7c5b43c28b2031091c2d4893d31f0034687bbb128c4710a41f5328e3b90b9ee412aff6789298c4995dff43d08d
6
+ metadata.gz: 46a8316a5e8932d31c8a66b1e9bd744a1458b253fd9ba67ee8ae083f7049ae714d5ccbf5ead24f0839211740e027f7f0444f9418f1c72a0a5c08ccc0fd73bbbd
7
+ data.tar.gz: 1d0328ff79d14bdecdc09d66d9cbc844291b020a8cbde3737e108905fca625835ee3f225e3dc8fc170cb7961e64948a21aa55ed616825078b9fad26309a71e1c
@@ -1,5 +1,7 @@
1
1
  @import 'bootstrap'
2
2
  @import 'tramway/core/application'
3
+ @import 'tramway/landing/application'
4
+ @import 'tramway/conference/application'
3
5
 
4
6
  body
5
7
  margin: 0
@@ -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
- @sections = @event.sections.map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
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
- alias text description
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
- = render 'tramway/landing/blocks/templates/features_list', block: OpenStruct.new(title: "Направления IT Way'18", description: "Вы можете выбрать любое из направлений", anchor: :features), collection: @sections
33
- .container
34
- = render 'tramway/event/participants/form'
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
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Event
3
- VERSION = '1.1'
3
+ VERSION = '1.2'
4
4
  end
5
5
  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.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-19 00:00:00.000000000 Z
11
+ date: 2018-09-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email: