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 +4 -4
- data/app/controllers/tramway/conference/web/welcome_controller.rb +3 -0
- data/app/decorators/tramway/event/event_as_page_with_button_decorator.rb +33 -0
- data/app/views/tramway/conference/web/welcome/index.html.haml +10 -0
- data/lib/tramway/conference/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2beb2a282e77105cb33153396363229a90413e699be4a6287fa092c464a1e781
|
|
4
|
+
data.tar.gz: 0b5ac36dde1cec6ad6fb214ec615c5be41baf9864f588edbce203bac3cc4ae57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
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.
|
|
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-
|
|
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
|