tramway-event 1.9.27 → 1.9.27.5

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: 254c506135da94272d3b29c64e8433408899887d076f9ddf90c500575fce39bc
4
- data.tar.gz: ccf6e8f67d7305b19d57c262a7375d7f6cee0c7a22e8f38a2f9040ff67dceff5
3
+ metadata.gz: c249109b5116699d48174ff4b48b57d6d584fef2232f9a658285f2f893cec805
4
+ data.tar.gz: b295724487ae1f0a637aea4a7aa11b37c38037105cafdc044a43220bc2220557
5
5
  SHA512:
6
- metadata.gz: 5511a2b01b04e1fcc82970f02eb620f94f3cdade6679841846400597b2647c6a61dde2fd5a3299b7da5e640d1c74bed105085dd48789efd87caee00c50a77d36
7
- data.tar.gz: a5d4093e097bbf6c56a37e6151f7723ae4bf83d907f35313df0794208c2452038fa462ecb436ba5b7e3859546c0ba1e9d6137fc37d40a4949ca5f6a18285ceef
6
+ metadata.gz: 990511a6a9c9eade64d987c9d131d34164353e938e516512d3af1ae7e5da81c54ffa15f2f92b628ad2c72b986da9550a00510c6554f0bd6bd32d540d9a856d07
7
+ data.tar.gz: cf4c2a0ede66ef23017c4f1fbbe52d35cb5954490da5e96ac36fc7fa175c5dfa0309454289ed228141693b7803b096253457092066ab5b04ceda1b70d571edea
data/README.md CHANGED
@@ -27,6 +27,13 @@ rails db:migrate
27
27
 
28
28
  #### 4. Then make `tramway-landing` installation. [How-to](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/README.md#installation)
29
29
 
30
+ Versions table
31
+
32
+ | tramway-event | tramway-landing |
33
+ | ------------- | --------------- |
34
+ | < 1.9.27.1 | 1.x |
35
+ | >= 1.9.27.2 | 2.x |
36
+
30
37
  #### 5. Add events to admin panel
31
38
 
32
39
  *config/initializers/tramway.rb*
@@ -41,6 +48,13 @@ Tramway::Admin.set_available_models ::Tramway::Event::Event, ::Tramway::Event::P
41
48
  mount Tramway::Event::Engine, at: '/'
42
49
  ```
43
50
 
51
+ ## How-to
52
+
53
+ ### Create event
54
+
55
+ English docs coming soon...
56
+ [На русском](https://github.com/ulmic/tramway-dev/tree/develop/tramway-event/docs/russian)
57
+
44
58
  ## Contributing
45
59
  Contribution directions go here.
46
60
 
@@ -74,8 +74,8 @@ class Tramway::Event::EventDecorator < ::Tramway::Core::ApplicationDecorator
74
74
 
75
75
  def events_link
76
76
  event_link = Tramway::Event::Engine.routes.url_helpers.event_path object
77
- event_url = ['molodoy.online', event_link].join
78
- content_tag(:div) do
77
+ event_url = ['http://molodoy.online', event_link].join
78
+ content_tag(:pre) do
79
79
  id = "event#{object.id}"
80
80
  concat link_to event_url, event_url, id: id
81
81
  concat copy_to_clipboard id
@@ -44,7 +44,7 @@ class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorat
44
44
  object.event.title
45
45
  end)
46
46
  end)
47
- object.event.participant_form_fields.map do |field|
47
+ object.event.participant_form_fields.active.map do |field|
48
48
  hash = if field.options.is_a?(Hash)
49
49
  field.options
50
50
  else
@@ -11,8 +11,8 @@ class Tramway::Event::ParticipantForm < ::Tramway::Core::ApplicationForm
11
11
  ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(
12
12
  SecureRandom.hex,
13
13
  object.event,
14
+ participation_state_event: :default,
14
15
  comment: :string,
15
- participation_state_event: :string
16
16
  ).new object
17
17
  else
18
18
  super(object).tap do |obj|
@@ -18,6 +18,7 @@ class Tramway::Event::ParticipantFormFieldForm < ::Tramway::Core::ExtendedApplic
18
18
 
19
19
  def submit(params)
20
20
  super(params).tap do
21
+ model.options = {} if model.options == ''
21
22
  model.options&.merge! list_field: (params[:list_field] == '1').to_s
22
23
  model.save
23
24
  end
@@ -1,7 +1,5 @@
1
1
  - content_for :title do
2
2
  = @event.title
3
- - content_for :head_content do
4
- = javascript_include_tag 'tramway/event/application'
5
3
  - content_for :footer_links do
6
4
  %ul
7
5
  - @events.each do |event|
@@ -11,3 +11,7 @@
11
11
  ::Tramway::Admin.set_notificable_queries new_participants: lambda { |current_user|
12
12
  ::Tramway::Event::Participant.active.where(participation_state: :requested).send "#{current_user.role}_scope", current_user.id
13
13
  }
14
+
15
+ ::Tramway::Landing.head_content = lambda do
16
+ javascript_include_tag 'tramway/event/application'
17
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '1.9.27'
5
+ VERSION = '1.9.27.5'
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.27
4
+ version: 1.9.27.5
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-01-28 00:00:00.000000000 Z
11
+ date: 2020-01-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email: