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 +4 -4
- data/README.md +14 -0
- data/app/decorators/tramway/event/event_decorator.rb +2 -2
- data/app/decorators/tramway/event/participant_decorator.rb +1 -1
- data/app/forms/tramway/event/participant_form.rb +1 -1
- data/app/forms/tramway/event/participant_form_field_form.rb +1 -0
- data/app/views/tramway/event/events/show.html.haml +0 -2
- data/config/initializers/tramway.rb +4 -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: c249109b5116699d48174ff4b48b57d6d584fef2232f9a658285f2f893cec805
|
4
|
+
data.tar.gz: b295724487ae1f0a637aea4a7aa11b37c38037105cafdc044a43220bc2220557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(:
|
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
|
@@ -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
|
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-
|
11
|
+
date: 2020-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails engine for events
|
14
14
|
email:
|