tramway-event 1.3 → 1.4
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/application_controller.rb +1 -1
- data/app/controllers/tramway/event/events_controller.rb +2 -0
- data/app/decorators/tramway/event/event_decorator.rb +8 -6
- data/app/views/tramway/event/events/show.html.haml +6 -0
- 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: dcc54703252a31a5b2bc9195cbe54223b8ad244d28b7f33ae5fb46c220075fbb
|
4
|
+
data.tar.gz: 9bf2eca69564a9f8ce2879b151f8da58c5a90abda08f67b5324a1f12c5ec22c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec11fd14671032bf0886beda4628ce47a33f29142435609efab56844bc349f1c7211a4974b079eba95e9f952f4d8d814525517f23caad25655b647324bf042b2
|
7
|
+
data.tar.gz: 1af2d5bfad864251ef6bbb9ec034d3cd92eacf4e9fe143e6df075067af41e2874c26580b6b11f9b2ea5084f3c72d2227e0829e2fc056532b9a6ada87ad86b633
|
@@ -6,5 +6,7 @@ class Tramway::Event::EventsController < Tramway::Event::ApplicationController
|
|
6
6
|
@participant_form = ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(request.uuid, @event).new ::Tramway::Event::Participant.new
|
7
7
|
@sections_as_features = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
|
8
8
|
@sections = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s }
|
9
|
+
@footer = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.footer
|
10
|
+
@events = ::Tramway::Event::Event.active.map { |e| ::Tramway::Event::EventDecorator.decorate e }
|
9
11
|
end
|
10
12
|
end
|
@@ -14,13 +14,15 @@ class Tramway::Event::EventDecorator < ::Tramway::Core::ApplicationDecorator
|
|
14
14
|
object.photo
|
15
15
|
end
|
16
16
|
|
17
|
-
def tagline
|
18
|
-
''
|
19
|
-
end
|
20
|
-
|
21
17
|
def duration
|
22
|
-
if object.begin_date.
|
23
|
-
"#{I18n.
|
18
|
+
if object.begin_date.to_date == object.end_date.to_date
|
19
|
+
"#{I18n.l(object.begin_date, format: '%d %B %Y')}"
|
20
|
+
elsif object.begin_date.month == object.end_date.month
|
21
|
+
"#{I18n.t('date.from')} #{I18n.l(object.begin_date, format: '%d')} #{I18n.t('date.to')} #{I18n.l(object.end_date, format: '%d %B %Y')}"
|
22
|
+
else
|
23
|
+
"#{I18n.t('date.from')} #{I18n.l(object.begin_date, format: '%d %B %Y')} #{I18n.t('date.to')} #{I18n.l(object.end_date, format: '%d %B %Y')}"
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
alias tagline duration
|
26
28
|
end
|
@@ -1,4 +1,10 @@
|
|
1
1
|
- content_for :title do
|
2
2
|
= @event.title
|
3
|
+
- content_for :footer_links do
|
4
|
+
%ul
|
5
|
+
- @events.each do |event|
|
6
|
+
%li
|
7
|
+
= link_to event.title, event_path(event)
|
3
8
|
- content_for :body_content do
|
4
9
|
= render 'tramway/event/events/show_page', event: @event, sections: @sections, sections_as_features: @sections_as_features
|
10
|
+
= render "tramway/landing/blocks/block_types/footer", block: @footer
|
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.4'
|
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-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails engine for events
|
14
14
|
email:
|