effective_events 0.5.1 → 0.5.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07372f571e5614f2d5d37dacde18ea6b7b57bdec70422e246cad42191c7892fa
|
4
|
+
data.tar.gz: 18e33f7886fc3802be2c013cb6b95f07b51b86926b15bbda239f19431db21a32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93e60338d150cfff0fa2543b6c822851e8c6a86468bcf3387eb0fada440a079a5428d8aa597107d2f5483ff8eb822f4f5dcaa2261008d74ae8de3dede84439be
|
7
|
+
data.tar.gz: 668cd366a81fe3b46a988343b725c1bd0bbb9aed30b851dc16627aedf0e667062eb1e64bf9265faeeb6989ed92108914809858cf426733d4e22cb685d2fc9b6f
|
@@ -4,11 +4,13 @@ class EffectiveEventsDatatable < Effective::Datatable
|
|
4
4
|
# Upcoming should be first here, so when displayed as a simple datatable on the dashboard they only see upcoming events
|
5
5
|
scope :upcoming
|
6
6
|
scope :registerable
|
7
|
+
scope :external
|
7
8
|
scope :all
|
8
9
|
end
|
9
10
|
|
10
11
|
datatable do
|
11
|
-
order :
|
12
|
+
order :start_at
|
13
|
+
|
12
14
|
col :id, visible: false
|
13
15
|
|
14
16
|
col :start_at, label: 'Date', as: :date
|
@@ -63,7 +63,7 @@ module Effective
|
|
63
63
|
timestamps
|
64
64
|
end
|
65
65
|
|
66
|
-
scope :sorted, -> { order(
|
66
|
+
scope :sorted, -> { order(start_at: :desc) }
|
67
67
|
scope :deep, -> { includes(:event_registrants, :event_tickets) }
|
68
68
|
|
69
69
|
scope :published, -> { where(draft: false).where(arel_table[:published_at].lt(Time.zone.now)) }
|
@@ -79,6 +79,7 @@ module Effective
|
|
79
79
|
|
80
80
|
# Doesnt consider sold out yet
|
81
81
|
scope :registerable, -> { published.not_closed.with_tickets }
|
82
|
+
scope :external, -> { published.where(external_registration: true) }
|
82
83
|
|
83
84
|
scope :paginate, -> (page: nil, per_page: nil) {
|
84
85
|
page = (page || 1).to_i
|
@@ -88,7 +89,7 @@ module Effective
|
|
88
89
|
}
|
89
90
|
|
90
91
|
scope :events, -> (user: nil, category: nil, unpublished: false) {
|
91
|
-
scope = all.deep
|
92
|
+
scope = all.deep
|
92
93
|
|
93
94
|
if defined?(EffectiveRoles) && EffectiveEvents.use_effective_roles
|
94
95
|
scope = scope.for_role(user&.roles)
|
@@ -113,8 +114,9 @@ module Effective
|
|
113
114
|
validates :published_at, presence: true, unless: -> { draft? }
|
114
115
|
validates :start_at, presence: true
|
115
116
|
validates :end_at, presence: true
|
116
|
-
|
117
|
-
validates :
|
117
|
+
|
118
|
+
validates :registration_start_at, presence: true, unless: -> { external_registration? }
|
119
|
+
validates :registration_end_at, presence: true, unless: -> { external_registration? }
|
118
120
|
validates :external_registration_url, presence: true, if: -> { external_registration? }
|
119
121
|
|
120
122
|
validate(if: -> { start_at && end_at }) do
|
@@ -204,8 +206,8 @@ module Effective
|
|
204
206
|
event.slug = event.slug + '-copy'
|
205
207
|
event.draft = true
|
206
208
|
|
207
|
-
event.
|
208
|
-
event.
|
209
|
+
event.rich_text_body = rich_text_body
|
210
|
+
event.rich_text_excerpt = rich_text_excerpt
|
209
211
|
end
|
210
212
|
end
|
211
213
|
|
@@ -27,18 +27,20 @@
|
|
27
27
|
%strong Event Date:
|
28
28
|
= effective_events_event_schedule(@event)
|
29
29
|
|
30
|
-
|
31
|
-
%
|
32
|
-
|
30
|
+
- if @event.registration_start_at.present?
|
31
|
+
%li
|
32
|
+
%strong Registration Opens:
|
33
|
+
= @event.registration_start_at.strftime("%b %d, %Y %I:%M%P")
|
33
34
|
|
34
35
|
- if @event.early_bird_end_at.present?
|
35
36
|
%li
|
36
37
|
%strong Early Bird Rate Ends:
|
37
38
|
= @event.early_bird_end_at.strftime("%b %d, %Y %I:%M%P")
|
38
39
|
|
39
|
-
|
40
|
-
%
|
41
|
-
|
40
|
+
- if @event.registration_end_at.present?
|
41
|
+
%li
|
42
|
+
%strong Registration Closes:
|
43
|
+
= @event.registration_end_at.strftime('%F %R')
|
42
44
|
|
43
45
|
- if @event.event_tickets.present?
|
44
46
|
%li
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|