tramway-event 1.9.14 → 1.9.15

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: d2914e53cfd520f85ea7a3e43b76bfb3d298e386f5dc8a16129e8f9288ddc2f7
4
- data.tar.gz: 606304cb054cdfd32344b2a2ab94210e561e8a7489326a5e9da67256c41b57e2
3
+ metadata.gz: 4d5aedf82a0123d8ba2b62c170ad20733800172841d4ed33f7552d6ff3f2d482
4
+ data.tar.gz: c51145ef689bef660d69278c70af164a444a4c36add2754b6cedb71dade305d9
5
5
  SHA512:
6
- metadata.gz: b534c5d54d203c65beaab5cc4d12fabcf460ba14a880412ce13fc3de2de29d69e49d4496d060274f522a5b7c0230281ddb05e78bb3390786ee07dc76e1ce3c4d
7
- data.tar.gz: 9ccc5d0a5344dba87bb93eff5c7b0ddfe11389d4c4db762b3ad6c5cf08d359a729b04904f2baa12f3b6ad2218c701161b449477d7ab51f2c51265a281c6ae08a
6
+ metadata.gz: 9061344497386d9c10c81e0c03b23eb7775c81d0cb505b8ea37ec0ec058203d95d78673cbc2adb31238e6bb0124412aa0522fd40c949278a14a4fde11a56c256
7
+ data.tar.gz: a92c2d1e1dea7abdee9d0c1764c9c4141729ecb7252b8515bbccb395e350e05e9165c2c7b27b77c9152a908b3312cbe4d1422b2a11c063f9b03791c07ca1f3df
@@ -3,9 +3,31 @@ class Tramway::Event::PartakingDecorator < ::Tramway::Core::ApplicationDecorator
3
3
  def collections
4
4
  [ :all ]
5
5
  end
6
+
7
+ def show_attributes
8
+ [ :part_name, :event_duration, :part_description ]
9
+ end
6
10
  end
7
11
 
12
+ decorate_association :part
13
+
8
14
  def name
9
15
  "#{object.person.first_name} #{object.person.last_name} - #{object.position}"
10
16
  end
17
+
18
+ def part_name
19
+ part.name
20
+ end
21
+
22
+ def event_duration
23
+ if part.respond_to? :duration
24
+ part.duration
25
+ else
26
+ part.event.duration
27
+ end
28
+ end
29
+
30
+ def part_description
31
+ raw part.respond_to?(:description) ? part.description : part.event.description
32
+ end
11
33
  end
@@ -6,6 +6,7 @@ class Tramway::Event::SectionDecorator < ::Tramway::Landing::BlockTypes::Feature
6
6
  end
7
7
 
8
8
  delegate :description, to: :object
9
+ decorate_association :event
9
10
  decorate_association :partakings, decorator: Tramway::Event::PartakingFeatureDecorator
10
11
 
11
12
  def name
@@ -25,6 +26,10 @@ class Tramway::Event::SectionDecorator < ::Tramway::Landing::BlockTypes::Feature
25
26
  end
26
27
 
27
28
  def event_title
28
- object.event.title
29
+ event.title
30
+ end
31
+
32
+ def event_duration
33
+ event.duration
29
34
  end
30
35
  end
@@ -3,4 +3,6 @@ class Tramway::Event::Partaking < ::Tramway::Core::ApplicationRecord
3
3
  enumerize :part_type, in: [ 'Tramway::Event::Event', 'Tramway::Event::Section' ]
4
4
 
5
5
  belongs_to :person, class_name: 'Tramway::Event::Person'
6
+
7
+ search_by :position, person: [:first_name, :last_name, :description]
6
8
  end
@@ -47,5 +47,5 @@ class Tramway::Event::Participant < ::Tramway::Event::ApplicationRecord
47
47
  scope :without_answer, -> { where participation_state: :without_answer }
48
48
  scope :reserved, -> { where participation_state: :reserved }
49
49
 
50
- pg_search_scope :search, against: [:values]
50
+ search_by :values
51
51
  end
@@ -36,6 +36,10 @@ ru:
36
36
  position: Позиция на странице мероприятия
37
37
  tramway/event/participant_form_field:
38
38
  title: Название (в Tramway название Поля анкеты - это ключ для выборки пользователей. Если вы измените ключ к выборке пользователей, то все пользователи, получившие данные по предыдущему ключу по этой выборке показываться не будут)
39
+ tramway/event/partaking:
40
+ part_name: Мероприятие
41
+ event_duration: Дата мероприятия
42
+ part_description: Описание
39
43
  cases:
40
44
  tramway/event/event:
41
45
  plural: мероприятия
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Event
3
- VERSION = '1.9.14'
3
+ VERSION = '1.9.15'
4
4
  end
5
5
  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.14
4
+ version: 1.9.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-23 00:00:00.000000000 Z
11
+ date: 2019-07-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email:
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.7.7
111
+ rubygems_version: 2.7.6
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Rails engine for events