tramway-event 1.12.0.1 → 1.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/decorators/tramway/event/event_decorator.rb +1 -12
- data/app/decorators/tramway/event/events/show/event_decorator.rb +12 -0
- data/app/views/tramway/event/events/_show_page.html.haml +7 -6
- data/app/views/tramway/event/sections/_show_page.html.haml +2 -2
- 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: 544f404ca677177924dc37dbd8663450edf84809af2a9ff829506b59aa0b9c83
|
4
|
+
data.tar.gz: ec912ab9c38d1148f7714505effe8e89db678257e7fbb48c72f21e9235f362ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d74327ad1079f66b9a8909610992efa1107006943839385c625545beb88d51dfff37160089832080f60f11d254341b2173afd163d597b86ba342707befefb78b
|
7
|
+
data.tar.gz: c3f7915b8c11b268201bab669c3442ac753c7abd5d6c2b49b7f41955e5bceb9ca34ad42089fc339809ac8c118e09af26fb0b0c14b3e06ec9139e0864d0310e60
|
@@ -7,17 +7,7 @@ class Tramway::Event::EventDecorator < ::Tramway::Core::ApplicationDecorator
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def show_attributes
|
10
|
-
%i[
|
11
|
-
title
|
12
|
-
duration
|
13
|
-
events_link
|
14
|
-
state
|
15
|
-
created_at
|
16
|
-
photo
|
17
|
-
request_collecting_duration
|
18
|
-
description
|
19
|
-
participants_list
|
20
|
-
]
|
10
|
+
%i[ title duration events_link state created_at photo request_collecting_duration description participants_list ]
|
21
11
|
end
|
22
12
|
|
23
13
|
def show_associations
|
@@ -103,6 +93,5 @@ class Tramway::Event::EventDecorator < ::Tramway::Core::ApplicationDecorator
|
|
103
93
|
def state
|
104
94
|
state_machine_view object, :state
|
105
95
|
end
|
106
|
-
|
107
96
|
alias tagline duration
|
108
97
|
end
|
@@ -50,4 +50,16 @@ class Tramway::Event::Events::Show::EventDecorator < ::Tramway::Core::Applicatio
|
|
50
50
|
social_networks: (object.creator.social_networks.active if object.creator.respond_to?(:social_networks))
|
51
51
|
}
|
52
52
|
end
|
53
|
+
|
54
|
+
def is_past?
|
55
|
+
object.end_date < DateTime.now
|
56
|
+
end
|
57
|
+
|
58
|
+
def is_future?
|
59
|
+
object.begin_date > DateTime.now
|
60
|
+
end
|
61
|
+
|
62
|
+
def is_during?
|
63
|
+
object.begin_date < DateTime.now && object.end_date > DateTime.now
|
64
|
+
end
|
53
65
|
end
|
@@ -12,7 +12,7 @@
|
|
12
12
|
или пишите на email
|
13
13
|
= mail_to @event.responsible_person[:email] || @application.email
|
14
14
|
|
15
|
-
= render 'tramway/landing/
|
15
|
+
= render 'tramway/landing/templates/full_page', block: event, buttons: [(OpenStruct.new(title: t('.registration'), anchor: '#registration') if @event.request_collecting_state == :are_being_right_now)]
|
16
16
|
- content_for :main_image do
|
17
17
|
= request.protocol + request.host_with_port + event.background.url
|
18
18
|
%main.event.show
|
@@ -20,19 +20,20 @@
|
|
20
20
|
- if @event.responsible_person[:social_networks]&.any? || @event.responsible_person[:phone].present? || @event.responsible_person[:email].present?
|
21
21
|
= render 'tramway/landing/blocks/block_types/contacts', block: OpenStruct.new(title: 'Контакты'), social_networks: @event.responsible_person[:social_networks], email: @event.responsible_person[:email], phone: @event.responsible_person[:phone]
|
22
22
|
- if defined? sections_as_features
|
23
|
-
= render 'tramway/landing/
|
23
|
+
= render 'tramway/landing/templates/features_list', collection: sections_as_features
|
24
24
|
.row.description
|
25
25
|
.col
|
26
26
|
!= event.description
|
27
|
-
|
28
|
-
|
27
|
+
- unless @event.is_past?
|
28
|
+
#registration
|
29
|
+
= render 'tramway/event/participants/form', event: event
|
29
30
|
- if defined? sections
|
30
31
|
- sections.each_with_index do |section, index|
|
31
32
|
= render 'tramway/event/sections/show_page', section: section
|
32
33
|
- if index < sections.count - 1
|
33
34
|
%br
|
34
35
|
- if defined? people_as_features
|
35
|
-
= render 'tramway/landing/
|
36
|
+
= render 'tramway/landing/templates/features_list', block: OpenStruct.new(title: "Оргкомитет", description: "", anchor: :organizers), collection: people_as_features, options: { image: { css: { class_name: 'circle' } } }
|
36
37
|
- if defined? ::Tramway::Partner
|
37
38
|
- ::Tramway::Partner::Partnership.partnership_type.values.each do |partnership_type|
|
38
|
-
= render 'tramway/landing/
|
39
|
+
= render 'tramway/landing/templates/features_list', block: OpenStruct.new(title: t("enumerize.tramway/partner/partnership.partnership_type.#{partnership_type}")), collection: partners[partnership_type]
|
@@ -1,2 +1,2 @@
|
|
1
|
-
= render 'tramway/landing/
|
2
|
-
= render 'tramway/landing/
|
1
|
+
= render 'tramway/landing/templates/section_with_image_and_text', block: section
|
2
|
+
= render 'tramway/landing/templates/features_list', collection: section.partakings, options: { image: { css: { class_name: 'circle' } } }
|
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.12.
|
4
|
+
version: 1.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: configus
|