tramway-conference 1.8.14.1 → 1.9

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: c0784bb7db064d62dce0b7ddd09b2df4d9213291a13131c4108284b9e1ae3db6
4
- data.tar.gz: 4ba800e7f46504e0474d1ef6e9a4be48126e3d33b63003dcfbf3c9b5d61c54b3
3
+ metadata.gz: 2beb2a282e77105cb33153396363229a90413e699be4a6287fa092c464a1e781
4
+ data.tar.gz: 0b5ac36dde1cec6ad6fb214ec615c5be41baf9864f588edbce203bac3cc4ae57
5
5
  SHA512:
6
- metadata.gz: 0d83cfe6bb83da29adc6897ba8da50ae4bee964ab7394a4abd028ddca7794692dfc2244b7578e2850dc69c29d1f67d1c89373d6c071a2ffa13a23d12662daf54
7
- data.tar.gz: 7a216da66f7d5be4e6e6978c807a6b31d5dee14cdee3453aa6781e2bdfaec2e11946ccb2285bb458964d4473ea47bb4d15bbb3eefe0577458d71c17dec5e7d73
6
+ metadata.gz: f58d3cfb99da0c890c5b4c82a573c4712ec4226cd90340dce4a17827ae592b731279b00cebb77282807bb8491d143adcfeaeecfe84f300db159b87fb229eb591
7
+ data.tar.gz: a7a8592462e2a36274408af6cd387add76eb06d10eda544ed00b0319f35c7ef52fdd8d027ef47ba3bb7c4dc03123f747ec7413884c10e9864623b49d28e6014e
@@ -12,6 +12,9 @@ class Tramway::Conference::Web::WelcomeController < ::Tramway::Conference::Appli
12
12
  actual_events = ::Tramway::Event::EventLinkDecorator.decorate ::Tramway::Event::Event.active.actual.order :begin_date
13
13
  @links = actual_events + past_events_links
14
14
  main_event = ::Tramway::Event::Event.main_event&.last
15
+ @close_events = ::Tramway::Event::Event.actual.map do |event|
16
+ ::Tramway::Event::EventAsPageWithButtonDecorator.decorate event
17
+ end
15
18
  if main_event.present?
16
19
  @main_event = ::Tramway::Event::Events::Show::EventDecorator.decorate main_event
17
20
  @sections_as_features = main_event.sections.active.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
@@ -0,0 +1,33 @@
1
+ class Tramway::Event::EventAsPageWithButtonDecorator < Tramway::Event::EventDecorator
2
+ def anchor
3
+ "event_#{object.id}"
4
+ end
5
+
6
+ delegate :photo, to: :object
7
+ delegate :title, to: :object
8
+ alias background photo
9
+
10
+ def description
11
+ if object.short_description.present?
12
+ content_tag :div do
13
+ concat duration
14
+ concat content_tag :br
15
+ concat object.short_description
16
+ end
17
+ else
18
+ duration
19
+ end
20
+ end
21
+
22
+ def button
23
+ content_tag :div do
24
+ content_tag(
25
+ :a,
26
+ href: ::Tramway::Event::Engine.routes.url_helpers.event_path(object.id),
27
+ class: 'btn btn-primary'
28
+ ) do
29
+ 'Регистрация'
30
+ end
31
+ end
32
+ end
33
+ end
@@ -27,6 +27,16 @@
27
27
 
28
28
  - @collection_news = @news
29
29
 
30
+ %br
31
+ .container
32
+ .row-fluid
33
+ %h1.text-center
34
+ Ближайшие мероприятия
35
+ - @close_events.each do |event|
36
+ .container
37
+ .row-fluid
38
+ = render 'tramway/landing/blocks/templates/section_with_image_and_text', block: event
39
+
30
40
  - if @main_event.present?
31
41
  - content_for :main_image do
32
42
  = request.protocol + request.host_with_port + @main_event.background.url
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Conference
5
- VERSION = '1.8.14.1'
5
+ VERSION = '1.9'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-conference
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.14.1
4
+ version: '1.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Korotin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-01-29 00:00:00.000000000 Z
12
+ date: 2020-02-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Engine for Conference web sites
15
15
  email:
@@ -29,6 +29,7 @@ files:
29
29
  - app/controllers/tramway/conference/application_controller.rb
30
30
  - app/controllers/tramway/conference/web/welcome_controller.rb
31
31
  - app/decorators/tramway/conference/unity_decorator.rb
32
+ - app/decorators/tramway/event/event_as_page_with_button_decorator.rb
32
33
  - app/forms/tramway/conference/unity_form.rb
33
34
  - app/helpers/tramway/conference/application_helper.rb
34
35
  - app/helpers/tramway/conference/web/welcome_helper.rb