effective_events 0.18.0 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/effective/events_controller.rb +8 -4
- data/app/datatables/admin/effective_events_datatable.rb +3 -4
- data/app/helpers/effective_events_helper.rb +18 -2
- data/app/models/effective/event.rb +1 -1
- data/app/models/effective/event_search.rb +1 -1
- data/app/views/admin/events/_form_content.html.haml +1 -1
- data/app/views/admin/events/_form_event.html.haml +8 -8
- data/app/views/effective/event_registrations/_event_tickets.html.haml +1 -1
- data/app/views/effective/event_registrations/_layout.html.haml +1 -1
- data/app/views/effective/events/_event.html.haml +11 -7
- data/app/views/effective/events/_form.html.haml +3 -3
- data/app/views/effective/events/_layout.html.haml +1 -1
- data/app/views/effective/events/_sidebar.html.haml +6 -0
- data/app/views/effective/events/index.html.haml +15 -21
- data/app/views/effective/events/show.html.haml +48 -56
- data/config/effective_events.rb +1 -1
- data/config/locales/effective_events.en.yml +1 -1
- data/lib/effective_events/version.rb +1 -1
- metadata +3 -3
- data/app/views/effective/events/_categories.html.haml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebbe0c4c6c8266a3068883cf636eb167748f5f5be86fd2f25870390579821b85
|
4
|
+
data.tar.gz: 304f0d1e83f7387f5a8357e01d55353e7f63b3bed9e495a7edee2bf287680b37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a29ad6c4a465b750511f03d8bffca8cb50dc77464d7d732fb352b3cc6f250455a3166941b1fff684428a2130bf2e1c2f313add1fd3d34b613da96f7cde6f94
|
7
|
+
data.tar.gz: 9a3d8e707e1f56f8ec11f9b089dbfb1b9f5d7bfd29b523a48cbd3790e1cbaf65a7b55c104ed5a2bdc055d8965a3a05a3be87799d3f2d437c2509663216a90029
|
@@ -8,7 +8,12 @@ module Effective
|
|
8
8
|
}
|
9
9
|
|
10
10
|
def index
|
11
|
-
|
11
|
+
if event_category.present?
|
12
|
+
@page_title = event_category
|
13
|
+
@event_category = event_category
|
14
|
+
else
|
15
|
+
@page_title ||= view_context.events_name_label
|
16
|
+
end
|
12
17
|
EffectiveResources.authorize!(self, :index, Effective::Event)
|
13
18
|
|
14
19
|
# Sometimes we just display a Datatable for the events
|
@@ -34,9 +39,8 @@ module Effective
|
|
34
39
|
if EffectiveResources.authorized?(self, :admin, :effective_events)
|
35
40
|
flash.now[:warning] = [
|
36
41
|
'Hi Admin!',
|
37
|
-
('You are viewing a hidden event.' if @event.draft?),
|
38
|
-
'
|
39
|
-
("<a href='#{effective_events.edit_admin_event_path(@event)}' class='alert-link'>edit event settings</a>.")
|
42
|
+
('You are viewing a hidden event. ' if @event.draft?),
|
43
|
+
("<a href='#{effective_events.edit_admin_event_path(@event)}' class='alert-link'>Edit this event</a>.")
|
40
44
|
].compact.join(' ')
|
41
45
|
end
|
42
46
|
|
@@ -22,8 +22,8 @@ module Admin
|
|
22
22
|
|
23
23
|
col :draft?, as: :boolean, visible: false
|
24
24
|
col :published?, as: :boolean
|
25
|
-
col :published_start_at
|
26
|
-
col :published_end_at
|
25
|
+
col :published_start_at, as: "Published start"
|
26
|
+
col :published_end_at, as: "Published end"
|
27
27
|
|
28
28
|
col :start_at, label: 'Start', visible: false
|
29
29
|
col :end_at, label: 'End', visible: false
|
@@ -47,8 +47,7 @@ module Admin
|
|
47
47
|
# col :event_registrants, search: :string
|
48
48
|
# col :event_addons, search: :string
|
49
49
|
|
50
|
-
col :allow_blank_registrants
|
51
|
-
|
50
|
+
col :allow_blank_registrants, visible: false
|
52
51
|
col :roles, visible: false
|
53
52
|
col :authenticate_user, visible: false
|
54
53
|
|
@@ -1,9 +1,25 @@
|
|
1
1
|
module EffectiveEventsHelper
|
2
|
+
|
3
|
+
# Events
|
4
|
+
def events_name_label
|
5
|
+
et('effective_events.name')
|
6
|
+
end
|
7
|
+
|
8
|
+
# Event
|
9
|
+
def event_label
|
10
|
+
et(Effective::Event)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Events
|
14
|
+
def events_label
|
15
|
+
ets(Effective::Event)
|
16
|
+
end
|
17
|
+
|
2
18
|
def effective_events_event_schedule(event)
|
3
19
|
if event.start_at.beginning_of_day == event.end_at.beginning_of_day
|
4
|
-
"#{event.start_at.strftime("%
|
20
|
+
"#{event.start_at.strftime("%A, %B %d, %Y · %l:%M%P")} - #{event.end_at.strftime("%l:%M%P")}"
|
5
21
|
else
|
6
|
-
"#{event.start_at.strftime("%
|
22
|
+
"#{event.start_at.strftime("%A, %B %d, %Y")} - #{event.end_at.strftime("%A, %B %d, %Y")}"
|
7
23
|
end
|
8
24
|
end
|
9
25
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
= effective_form_with(model: [:admin, event], engine: true) do |f|
|
2
|
-
= f.file_field :file, label: 'Image
|
2
|
+
= f.file_field :file, label: 'Image preview', hint: EffectiveEvents.events_hint_text
|
3
3
|
|
4
4
|
- if defined?(EffectiveArticleEditor)
|
5
5
|
= f.article_editor :rich_text_excerpt, label: 'Excerpt', hint: 'Will be used for the events excerpt on index pages.'
|
@@ -7,7 +7,7 @@
|
|
7
7
|
.col-md-6
|
8
8
|
= f.datetime_field :published_start_at, hint: 'The event will be available starting on this date and time. Leave blank to publish immediately.'
|
9
9
|
.col-md-6
|
10
|
-
= f.datetime_field :published_end_at, hint: 'The event will
|
10
|
+
= f.datetime_field :published_end_at, label: 'Published start', hint: 'The event will not appear on the website after this date and time. Leave blank for no end date.', date_linked: false
|
11
11
|
|
12
12
|
= f.check_box :save_as_draft, label: "Save as a draft. It will not appear on the website and can only be accessed by admin users."
|
13
13
|
|
@@ -19,14 +19,14 @@
|
|
19
19
|
.col
|
20
20
|
- categories = EffectiveEvents.categories
|
21
21
|
- if categories.present?
|
22
|
-
= f.select :category, categories
|
22
|
+
= f.select :category, categories
|
23
23
|
.col
|
24
24
|
- if event.class.respond_to?(:acts_as_tagged?)
|
25
25
|
= render 'effective/tags/fields', f: f
|
26
26
|
|
27
27
|
.row
|
28
|
-
.col-md-6= f.datetime_field :start_at, label: "Event
|
29
|
-
.col-md-6= f.datetime_field :end_at, label: "Event
|
28
|
+
.col-md-6= f.datetime_field :start_at, label: "Event start"
|
29
|
+
.col-md-6= f.datetime_field :end_at, label: "Event end"
|
30
30
|
|
31
31
|
%hr
|
32
32
|
|
@@ -34,10 +34,10 @@
|
|
34
34
|
.col-md-6
|
35
35
|
%h2 Registration
|
36
36
|
%p The online registration and purchase for this event will be available between:
|
37
|
-
= f.datetime_field :registration_start_at, label: "Registration
|
38
|
-
= f.datetime_field :registration_end_at, label: "Registration
|
39
|
-
= f.datetime_field :early_bird_end_at, label: "Early
|
40
|
-
hint: 'Event tickets
|
37
|
+
= f.datetime_field :registration_start_at, label: "Registration start"
|
38
|
+
= f.datetime_field :registration_end_at, label: "Registration end"
|
39
|
+
= f.datetime_field :early_bird_end_at, label: "Early bird end",
|
40
|
+
hint: 'Event tickets are purchased at early bird pricing before this date. After this date, regular pricing applies.'
|
41
41
|
|
42
42
|
= f.check_box :allow_blank_registrants, label: "Yes, allow blank ticket registrations", hint: "Allow event tickets to be purchased without adding a name. The purchaser may return to add names later."
|
43
43
|
|
@@ -1,9 +1,13 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
-
|
4
|
-
= link_to
|
1
|
+
.row.mb-5.effective-events{class: "effective-events-#{event.category.to_s.parameterize}"}
|
2
|
+
- if event.file.present?
|
3
|
+
.col-lg-4
|
4
|
+
= link_to effective_events.event_path(event) do
|
5
|
+
= image_tag url_for(event.file), class: "effective-events-image d-none d-lg-flex align-self-start", alt: event.title, width: "350", height: "220"
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
.col
|
8
|
+
- if event.category.present? && EffectiveEvents.categories.length > 1
|
9
|
+
= link_to(event.category, effective_events.events_path + '/' + event.category.parameterize, class: "badge badge-primary badge-event mb-2 effective-events-#{event.category.parameterize}")
|
10
|
+
|
11
|
+
%h2.effective-events-title= link_to event.title, effective_events.event_path(event)
|
12
|
+
.effective-events-meta= effective_events_event_schedule(event)
|
8
13
|
.effective-events-excerpt= event.excerpt.to_s
|
9
|
-
= link_to "View Event", effective_events.event_path(event), class: 'btn btn-primary'
|
@@ -2,10 +2,10 @@
|
|
2
2
|
- if f.object.term.present?
|
3
3
|
= f.search_field :term, label: 'Term'
|
4
4
|
|
5
|
-
|
5
|
+
= f.radios :category, EffectiveEvents.categories
|
6
6
|
|
7
7
|
- f.object.order ||= Effective::EventSearch::ORDERS.first
|
8
|
-
= f.radios :order, Effective::EventSearch::ORDERS
|
8
|
+
= f.radios :order, Effective::EventSearch::ORDERS
|
9
9
|
|
10
|
-
= f.save('
|
10
|
+
= f.save('Apply Filters', class: 'btn btn-primary btn-search mr-3', name: nil)
|
11
11
|
= link_to 'Reset filters', request.path
|
@@ -1,2 +1,2 @@
|
|
1
|
-
.effective-events
|
1
|
+
.effective-events.mb-3
|
2
2
|
= yield
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.effective-event-sidebar
|
2
|
+
%ul.nav.flex-column{role: 'navigation'}
|
3
|
+
= nav_link_to('All Events', effective_events.events_path, class: "effective-event-all")
|
4
|
+
|
5
|
+
- EffectiveEvents.categories.each do |category|
|
6
|
+
= nav_link_to(category, effective_events.events_path + '/' + category.parameterize, class: "effective-event-#{category.parameterize}")
|
@@ -1,25 +1,19 @@
|
|
1
1
|
= render 'layout' do
|
2
|
+
.row
|
3
|
+
- if EffectiveEvents.categories.length > 1
|
4
|
+
.d-none.d-lg-block.col-lg-3
|
5
|
+
-#= render('effective/events/form', event_search: @event_search)
|
6
|
+
= render('effective/events/sidebar')
|
2
7
|
|
3
|
-
|
4
|
-
|
5
|
-
.mb-4= render('effective/events/categories')
|
6
|
-
.mb-4= render('effective/events/form', event_search: @event_search)
|
7
|
-
|
8
|
-
- results = @event_search.results(page: params[:page])
|
9
|
-
|
10
|
-
- if @event_search.present? && results.length == 0
|
11
|
-
.alert.alert-info.mb-3 There are no results for your search. Please try again.
|
8
|
+
.col
|
9
|
+
%h1.effective-title.mb-4= @page_title
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
.col-md-9
|
21
|
-
-# This renders effective/events/event
|
22
|
-
= render(results)
|
11
|
+
- results = @event_search.results(page: params[:page])
|
12
|
+
- if (@event_search.present? && results.length == 0) || @events.blank?
|
13
|
+
.alert.alert-warning.mb-3
|
14
|
+
There are no active #{events_label.downcase} for this category.
|
15
|
+
- else
|
16
|
+
= render(results) # This renders effective/events/event
|
23
17
|
|
24
|
-
|
25
|
-
|
18
|
+
%nav.d-flex.justify-content-center
|
19
|
+
= bootstrap_paginate(results, per_page: @event_search.per_page)
|
@@ -1,74 +1,66 @@
|
|
1
1
|
= render 'layout' do
|
2
2
|
.effective-event
|
3
3
|
.row
|
4
|
+
- if EffectiveEvents.categories.length > 1
|
5
|
+
.col-lg-3
|
6
|
+
= render('effective/events/sidebar')
|
7
|
+
|
4
8
|
.col
|
5
|
-
%h1.mb-4= @page_title
|
9
|
+
%h1.effective-event-title.mb-4= @page_title
|
10
|
+
|
11
|
+
- if @event.sold_out?
|
12
|
+
.alert.alert-warning.mb-3 This event is sold out.
|
13
|
+
|
14
|
+
- if @event.closed?
|
15
|
+
.alert.alert-warning.mb-3 This event is no longer available.
|
6
16
|
|
7
|
-
.row
|
8
|
-
.col-md-3
|
9
17
|
- if @event.registerable?
|
10
18
|
.register.mb-4
|
11
19
|
- url = @event.external_registration_url.presence || effective_events.new_event_event_registration_path(@event)
|
12
|
-
= link_to 'Register', url, class: 'btn btn-
|
13
|
-
|
14
|
-
%ul.list-unstyled
|
15
|
-
-# Not shown
|
16
|
-
-# %li.mb-3
|
17
|
-
-# %label Published
|
18
|
-
-# %br
|
19
|
-
-# = @event.published_at.strftime("%B %e at %l:%M%P")
|
20
|
-
%li.mb-3
|
21
|
-
%label Event Date
|
22
|
-
%br
|
23
|
-
= effective_events_event_schedule(@event)
|
20
|
+
= link_to 'Register', url, class: 'btn btn-lg btn-primary'
|
24
21
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
%
|
29
|
-
|
30
|
-
|
31
|
-
- if @event.early_bird_end_at.present?
|
32
|
-
%li.mb-3
|
33
|
-
%label Early Bird Rate Ends
|
34
|
-
%br
|
35
|
-
= @event.early_bird_end_at.strftime("%b %d, %Y %I:%M%P")
|
36
|
-
|
37
|
-
- if @event.registration_end_at.present?
|
38
|
-
%li.mb-3
|
39
|
-
%label Registration Closes
|
40
|
-
%br
|
41
|
-
= @event.registration_end_at.strftime("%b %d, %Y %I:%M%P")
|
42
|
-
|
43
|
-
- if @event.event_tickets.present?
|
44
|
-
%ul.list-unstyled
|
45
|
-
- if @event.event_tickets.present?
|
46
|
-
%li
|
47
|
-
%label Tickets
|
22
|
+
.row
|
23
|
+
.col
|
24
|
+
%ul.list-unstyled
|
25
|
+
%li.mb-3
|
26
|
+
%label Date and Time
|
48
27
|
%br
|
49
|
-
|
50
|
-
- @event.event_tickets.each do |ticket|
|
51
|
-
%li= "#{ticket} (#{effective_events_ticket_price(@event, ticket)})"
|
28
|
+
= effective_events_event_schedule(@event)
|
52
29
|
|
53
|
-
|
30
|
+
- if @event.registration_start_at.present?
|
31
|
+
%li.mb-3
|
32
|
+
%label Registration Opens
|
33
|
+
%br
|
34
|
+
= @event.registration_start_at.strftime("%A, %B %d, %Y · %l:%M%P")
|
54
35
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
36
|
+
- if @event.early_bird_end_at.present?
|
37
|
+
%li.mb-3
|
38
|
+
%label Early Bird Rate Ends
|
39
|
+
%br
|
40
|
+
= @event.early_bird_end_at.strftime("%A, %B %d, %Y · %l:%M%P")
|
60
41
|
|
61
|
-
|
62
|
-
|
63
|
-
|
42
|
+
- if @event.registration_end_at.present?
|
43
|
+
%li.mb-3
|
44
|
+
%label Registration Closes
|
45
|
+
%br
|
46
|
+
= @event.registration_end_at.strftime("%A, %B %d, %Y · %l:%M%P")
|
64
47
|
|
65
|
-
|
66
|
-
|
48
|
+
-# .col-md-auto
|
49
|
+
-# - if @event.event_tickets.present?
|
50
|
+
-# %label Tickets
|
51
|
+
-# %br
|
52
|
+
-# %ul
|
53
|
+
-# - @event.event_tickets.each do |ticket|
|
54
|
+
-# %li= "#{ticket} (#{effective_events_ticket_price(@event, ticket)})"
|
67
55
|
|
68
|
-
|
69
|
-
|
70
|
-
|
56
|
+
- if @event.file.present?
|
57
|
+
.col-lg-4
|
58
|
+
= image_tag url_for(@event.file), class: "effective-events-image d-none d-lg-flex align-self-start", alt: @event.title, width: "350", height: "220"
|
59
|
+
|
60
|
+
.py-3
|
71
61
|
|
72
62
|
- if @event.body.present?
|
73
|
-
.
|
63
|
+
.effective-event-body.mb-5
|
74
64
|
= @event.body.to_s
|
65
|
+
|
66
|
+
= link_to("← #{events_name_label}".html_safe, effective_events.events_path, class: "btn btn-secondary my-4")
|
data/config/effective_events.rb
CHANGED
@@ -16,7 +16,7 @@ EffectiveEvents.setup do |config|
|
|
16
16
|
config.categories = ['Events']
|
17
17
|
|
18
18
|
# Hint text for event images attachments
|
19
|
-
config.events_hint_text = '
|
19
|
+
config.events_hint_text = 'Optional. Shown on the events index and event pages. Dimensions are 220px tall and 350px wide.'
|
20
20
|
|
21
21
|
# Validations for Event Registrants
|
22
22
|
# config.event_registrant_required_fields = [:first_name, :last_name, :email, :company]
|
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.18.
|
4
|
+
version: 0.18.2
|
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: 2024-07-
|
11
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -289,11 +289,11 @@ files:
|
|
289
289
|
- app/views/effective/event_registrations/submitted.html.haml
|
290
290
|
- app/views/effective/event_registrations/summary.html.haml
|
291
291
|
- app/views/effective/event_registrations/tickets.html.haml
|
292
|
-
- app/views/effective/events/_categories.html.haml
|
293
292
|
- app/views/effective/events/_dashboard.html.haml
|
294
293
|
- app/views/effective/events/_event.html.haml
|
295
294
|
- app/views/effective/events/_form.html.haml
|
296
295
|
- app/views/effective/events/_layout.html.haml
|
296
|
+
- app/views/effective/events/_sidebar.html.haml
|
297
297
|
- app/views/effective/events/index.html.haml
|
298
298
|
- app/views/effective/events/show.html.haml
|
299
299
|
- app/views/effective/events_mailer/event_registrant_purchased.liquid
|
@@ -1,6 +0,0 @@
|
|
1
|
-
.effective-event-categories
|
2
|
-
%ul.nav.nav-pills{role: 'navigation'}
|
3
|
-
= nav_link_to('All Events', effective_events.events_path, class: "nav-pill-effective-event effective-event-all")
|
4
|
-
|
5
|
-
- EffectiveEvents.categories.each do |category|
|
6
|
-
= nav_link_to(category, effective_events.events_path + '/' + category.parameterize, class: "nav-pill-effective-event effective-event-#{category.parameterize}")
|