effective_events 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/effective/events_controller.rb +0 -15
- data/app/datatables/admin/effective_event_registrants_datatable.rb +1 -1
- data/app/datatables/admin/effective_event_registrations_datatable.rb +2 -2
- data/app/datatables/admin/effective_event_tickets_datatable.rb +0 -6
- data/app/datatables/admin/effective_events_datatable.rb +12 -9
- data/app/datatables/effective_event_registrants_datatable.rb +1 -1
- data/app/datatables/effective_events_datatable.rb +1 -5
- data/app/models/concerns/effective_events_event_registration.rb +1 -1
- data/app/views/effective/events/_event.html.haml +37 -17
- data/app/views/effective/events/index.html.haml +5 -8
- data/app/views/effective/events/show.html.haml +9 -13
- data/lib/effective_events/version.rb +1 -1
- metadata +1 -3
- data/app/views/effective/events/_layout.html.haml +0 -1
- data/app/views/effective/events/_spacer.html.haml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 045e735e84e46c1926e1c1a1198a5e4639fe558c358a3a3af71dc7aee3c7be46
|
4
|
+
data.tar.gz: 910822a14b101f247b38a484fa73d51438e202abf74f376579f13b05ae7c3045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cea01d16ec0eac9e8352dae0fb5688b9a58ad5ca7ae8985a9ada5d9615be553e1e0f0a1e56d51d18e0e8bda63a728a66c77571e0db2ca04912ea4d1c9e57798f
|
7
|
+
data.tar.gz: 7293abfe2379e15a2899144910205f4c49debd72eed838bbe2144009e1f66af4a6215b87e48d1eac5aa84697071582ad7932654e057e1de3478bcbf533546d1b
|
data/README.md
CHANGED
@@ -7,21 +7,6 @@ module Effective
|
|
7
7
|
Effective::Event.events(user: current_user, unpublished: unpublished)
|
8
8
|
}
|
9
9
|
|
10
|
-
def index
|
11
|
-
@events ||= resource_scope.published
|
12
|
-
|
13
|
-
@events = @events.paginate(page: params[:page])
|
14
|
-
|
15
|
-
# if params[:search].present?
|
16
|
-
# search = params[:search].permit(EffectiveEvents.permitted_params).delete_if { |k, v| v.blank? }
|
17
|
-
# @events = @events.where(search) if search.present?
|
18
|
-
# end
|
19
|
-
|
20
|
-
EffectiveResources.authorize!(self, :index, Effective::Event)
|
21
|
-
|
22
|
-
@page_title ||= ['Events', (" - Page #{params[:page]}" if params[:page])].compact.join
|
23
|
-
end
|
24
|
-
|
25
10
|
def show
|
26
11
|
@event = resource_scope.find(params[:id])
|
27
12
|
|
@@ -12,8 +12,8 @@ class Admin::EffectiveEventRegistrationsDatatable < Effective::Datatable
|
|
12
12
|
col :event, search: :string
|
13
13
|
col :owner
|
14
14
|
|
15
|
-
col :event_registrants, search: :string
|
16
|
-
col :event_addons, search: :string
|
15
|
+
col :event_registrants, search: :string, visible: false
|
16
|
+
col :event_addons, search: :string, visible: false
|
17
17
|
col :orders, label: 'Order'
|
18
18
|
|
19
19
|
actions_col
|
@@ -25,12 +25,6 @@ module Admin
|
|
25
25
|
col :capacity, visible: false
|
26
26
|
col :capacity_available, visible: false
|
27
27
|
|
28
|
-
col :purchased_event_registrants, label: 'Registrants' do |ticket|
|
29
|
-
ticket.purchased_event_registrants.sort_by(&:last_name).map do |registrant|
|
30
|
-
content_tag(:div, registrant.last_first_name, class: 'col-resource_item')
|
31
|
-
end.join.html_safe
|
32
|
-
end
|
33
|
-
|
34
28
|
actions_col
|
35
29
|
end
|
36
30
|
|
@@ -13,19 +13,21 @@ module Admin
|
|
13
13
|
col :created_at, visible: false
|
14
14
|
col :id, visible: false
|
15
15
|
|
16
|
-
col :title
|
17
|
-
|
16
|
+
col :title do |event|
|
17
|
+
link_to event.title, effective_events.edit_admin_event_path(event)
|
18
|
+
end
|
18
19
|
|
20
|
+
col :slug, visible: false
|
19
21
|
col :draft
|
20
|
-
col :start_at, label: '
|
21
|
-
col :end_at, label: '
|
22
|
+
col :start_at, label: 'Start', visible: false
|
23
|
+
col :end_at, label: 'End', visible: false
|
22
24
|
col :excerpt, visible: false
|
23
25
|
|
24
26
|
col :registration_start_at, label: 'Registration opens', visible: false
|
25
27
|
col :registration_end_at, label: 'Registration closes', visible: false
|
26
28
|
col :early_bird_end_at, label: 'Early bird ends', visible: false
|
27
29
|
|
28
|
-
col :early_bird do |event|
|
30
|
+
col :early_bird, visible: false do |event|
|
29
31
|
if event.early_bird?
|
30
32
|
content_tag(:span, event.early_bird_status, class: 'badge badge-success')
|
31
33
|
else
|
@@ -33,10 +35,11 @@ module Admin
|
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
36
|
-
|
37
|
-
col :
|
38
|
-
col :
|
39
|
-
col :
|
38
|
+
# These show too much information to be useful to admins, rely on the edit screen
|
39
|
+
# col :event_tickets, search: :string
|
40
|
+
# col :event_products, search: :string
|
41
|
+
# col :event_registrants, search: :string
|
42
|
+
# col :event_addons, search: :string
|
40
43
|
|
41
44
|
col :roles, visible: false
|
42
45
|
col :authenticate_user, visible: false
|
@@ -13,11 +13,7 @@ class EffectiveEventsDatatable < Effective::Datatable
|
|
13
13
|
col :start_at, label: 'Date', as: :date
|
14
14
|
|
15
15
|
col :title, label: 'Title' do |event|
|
16
|
-
|
17
|
-
link_to(event.to_s, effective_events.new_event_event_registration_path(event))
|
18
|
-
else
|
19
|
-
event.to_s
|
20
|
-
end
|
16
|
+
link_to(event.to_s, effective_events.event_path(event))
|
21
17
|
end
|
22
18
|
|
23
19
|
col :registration_start_at, visible: false
|
@@ -90,7 +90,7 @@ module EffectiveEventsEventRegistration
|
|
90
90
|
validates :owner, presence: true
|
91
91
|
validates :event, presence: true
|
92
92
|
|
93
|
-
#
|
93
|
+
# Tickets Step
|
94
94
|
validate(if: -> { current_step == :tickets }) do
|
95
95
|
self.errors.add(:event_registrants, "can't be blank") unless present_event_registrants.present?
|
96
96
|
end
|
@@ -1,21 +1,41 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%table.table.effective-events-table
|
4
|
+
%tbody
|
5
|
+
%tr
|
6
|
+
%th Dates
|
7
|
+
%td
|
8
|
+
Starts: #{event.start_at&.strftime('%F %R')}
|
9
|
+
%br
|
10
|
+
Ends: #{event.end_at&.strftime('%F %R')}
|
7
11
|
|
8
|
-
|
9
|
-
|
10
|
-
|
12
|
+
%tr
|
13
|
+
%th Registration Closes
|
14
|
+
%td= event.registration_end_at.strftime('%F %R')
|
11
15
|
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
%tr
|
17
|
+
%th Early Bird
|
18
|
+
%td
|
19
|
+
Status: #{event.early_bird_status}
|
20
|
+
%br
|
21
|
+
Ends: #{event.early_bird_end_at&.strftime('%F %R')}
|
15
22
|
|
16
|
-
|
17
|
-
|
18
|
-
|
23
|
+
%tr
|
24
|
+
%th Tickets
|
25
|
+
%td
|
26
|
+
%ul.pl-3
|
27
|
+
- event.event_tickets.each do |ticket|
|
28
|
+
%li= "#{ticket} (#{price_to_currency(ticket.price)})"
|
19
29
|
|
20
|
-
|
21
|
-
|
30
|
+
- if event.event_products.present?
|
31
|
+
%tr
|
32
|
+
%th Add-ons
|
33
|
+
%td
|
34
|
+
%ul.pl-0
|
35
|
+
- event.event_products.each do |product|
|
36
|
+
%li= "#{product} (#{price_to_currency(product.price)})"
|
37
|
+
|
38
|
+
- if event.body.present?
|
39
|
+
%tr
|
40
|
+
%th Description
|
41
|
+
%td= event.body
|
@@ -1,8 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
=
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
%nav.d-flex.justify-content-center
|
8
|
-
= bootstrap_paginate(@events, per_page: EffectiveEvents.per_page)
|
1
|
+
= card do
|
2
|
+
- if @datatable
|
3
|
+
= render_datatable(@datatable, simple: true)
|
4
|
+
- else
|
5
|
+
%p There are no events open for registration. When there are, we'll show them here.
|
@@ -1,16 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
-
|
4
|
-
.alert.alert-warning This event is sold out.
|
1
|
+
.effective-event
|
2
|
+
- if @event.sold_out?
|
3
|
+
.alert.alert-warning This event is sold out.
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
- if @event.closed?
|
6
|
+
.alert.alert-warning This event is no longer available.
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
- if @event.registerable?
|
9
|
+
.resource-buttons
|
10
|
+
= link_to 'Register', effective_events.new_event_event_registration_path(@event), class: 'btn btn-primary'
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
.event-body.event-content
|
16
|
-
= @event.body
|
12
|
+
= render 'effective/events/event', event: @event
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
@@ -253,8 +253,6 @@ files:
|
|
253
253
|
- app/views/effective/event_registrations/tickets.haml
|
254
254
|
- app/views/effective/events/_dashboard.html.haml
|
255
255
|
- app/views/effective/events/_event.html.haml
|
256
|
-
- app/views/effective/events/_layout.html.haml
|
257
|
-
- app/views/effective/events/_spacer.html.haml
|
258
256
|
- app/views/effective/events/index.html.haml
|
259
257
|
- app/views/effective/events/show.html.haml
|
260
258
|
- app/views/effective/events_mailer/event_registrant_purchased.liquid
|
@@ -1 +0,0 @@
|
|
1
|
-
= yield
|
@@ -1 +0,0 @@
|
|
1
|
-
%hr
|