tramway-event 1.9.30 → 1.9.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccbba9d4e213e01b03e1d8b447d3ecc7c999dc13e32b5902c76bc1a6422bba39
4
- data.tar.gz: 1ac5580d257ffa32f36ca9bab2e28ac85fa9ae5a0c29bfaef4d8bc163b6a1ca2
3
+ metadata.gz: 5934677a7693e129263e003d40fb0c32a5b192ca2473ce970ab8204cf4c11222
4
+ data.tar.gz: 5fb809b1cf2495b2a6cb6230cbcebf975c0f87f1535cc7c66ed958eb5d0d5b3f
5
5
  SHA512:
6
- metadata.gz: 73bd1a360e798f16ed21c4708fcb411b3a207a2e67fb220a0ec234ce7f317b8966f40ec2a12bbb5a3858f975f443217d2e80d867e2d2b6c835a54548c2d0f20a
7
- data.tar.gz: 1d7e7c7a06dbd0fd4a0531d7eb959619591a6bd5213fa22a171eb922393cfa2e8aa34528b8a4882957ca89146edf66aa0ea70126b2646ba1a5032ea09a245a80
6
+ metadata.gz: 82a328caebddab43227e1f8908b091312f41914676ecb859ec5b6ecaa6010ced39f8f1afc38f869894a16cecaa36cc10e38edf326fd65efb9ff74781215b7aa5
7
+ data.tar.gz: 9185026a5b04a10c4efd9aed97b09d18210205e7199ae388105300e1a524547b49d09b9eeb2bec6fce242b71224d24fc8175fe483abab94fa555d45cee1a4df9
@@ -47,4 +47,11 @@ class Tramway::Event::Events::Show::EventDecorator < ::Tramway::Core::Applicatio
47
47
  end
48
48
 
49
49
  alias tagline duration
50
+
51
+ def responsible_person
52
+ {
53
+ phone: (object.creator.phone if object.creator&.phone&.present?),
54
+ email: (object.creator.email if object.creator&.email&.present?)
55
+ }
56
+ end
50
57
  end
@@ -7,9 +7,9 @@
7
7
  %hr/
8
8
  %p.mb-0
9
9
  По всем вопросам обращайтесь по телефону
10
- = tel_tag @application.phone
10
+ = tel_tag @event.responsible_person[:phone] || @application.phone
11
11
  или пишите на email
12
- = mail_to @application.email
12
+ = mail_to @event.responsible_person[:email] || @application.email
13
13
  - if params[:flash] == 'error'
14
14
  .alert.alert-danger{ role: "alert" }
15
15
  %button.close{"aria-label" => "Close", "data-dismiss" => "alert", type: "button"}
@@ -19,9 +19,9 @@
19
19
  %hr/
20
20
  %p.mb-0
21
21
  Если ошибка повторяется или не отображается, обращайтесь по телефону
22
- = tel_tag @application.phone
22
+ = tel_tag @event.responsible_person[:phone] || @application.phone
23
23
  или пишите на email
24
- = mail_to @application.email
24
+ = mail_to @event.responsible_person[:email] || @application.email
25
25
  - if request.path == ::Tramway::Event::Engine.routes.url_helpers.event_path(event.id)
26
26
  = render 'tramway/landing/blocks/templates/full_page', block: event, buttons: [OpenStruct.new(title: t('.registration'), anchor: '#registration')]
27
27
  - content_for :main_image do
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '1.9.30'
5
+ VERSION = '1.9.31'
6
6
  end
7
7
  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.9.30
4
+ version: 1.9.31
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-02-17 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: configus