trusty-festivity-extension 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/festivity_events_controller.rb +2 -1
- data/app/models/festivity_event_list.rb +3 -2
- data/app/views/festivity_events/_event_list.html.haml +59 -58
- data/festivity_extension.rb +1 -0
- data/lib/trusty-festivity-extension.rb +1 -1
- data/trusty-festivity-extension.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODcyMWZmMTZkNGUyNDhjZWE3YmI0Y2M2MmVhNzZhYzJjYzliZmI1ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzZiZmVlODhiNjM0M2ZhZTQyNDIyNTVmMjAwM2ExMDI5NjJjNzQ4ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjczYzlhMzMwZDkzNmM0OWYwOGE5NjRkYjdhODc4ODdkYjk0ZWMzZjc1N2Uy
|
10
|
+
ZWU4M2FlZGNhYmQ3NTE4MTdlYmU1NTIwOGVjZjRkNTU3YTQ2NzUyMTA0ZGJm
|
11
|
+
NzJhZTFmZWRjYjJmOGY5MjU3MzAyMTc3ZDI3ODkyYTEzMTFlNDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Nzk0YzI2MjgxOWEyMWRjZWUxYmViMDg4MjZkMjhhMDdjZWJlYmYzNjJlMDdm
|
14
|
+
OTQwMWQzOWM0MTU1OWVhZDU3MWQ2NTkzMmM4OWQwZmI5MTVmZTI4N2RlYjA1
|
15
|
+
MDg4MDJiMmVjZjY4OThmMjE0OWY2NjYzZjRmYjViOThlYWQxN2Y=
|
@@ -3,7 +3,8 @@ class FestivityEventsController < ApplicationController
|
|
3
3
|
no_login_required
|
4
4
|
trusty_layout 'base'
|
5
5
|
|
6
|
-
|
6
|
+
caches_action :index, cache_path: proc { |c| c.params.except(:_).merge(format: request.xhr?)}
|
7
|
+
caches_action :show
|
7
8
|
|
8
9
|
def index
|
9
10
|
order_by = params[:sort] ? params[:sort] : "start_date"
|
@@ -80,7 +80,7 @@ class FestivityEventList
|
|
80
80
|
def self.parse_criteria(criteria)
|
81
81
|
event_ids = event_ids_for_dates(criteria[:dates]) if criteria[:dates]
|
82
82
|
where_clause = "site_id = #{ Page.current_site.id}"
|
83
|
-
where_clause += " AND event_id IN (#{event_ids.join(",")})" if event_ids
|
83
|
+
where_clause += " AND event_id IN (#{event_ids.join(",")})" if event_ids.present?
|
84
84
|
where_clause += " AND #{parse_categories(criteria[:categories].split(","))}" if criteria[:categories]
|
85
85
|
where_clause
|
86
86
|
end
|
@@ -95,4 +95,5 @@ class FestivityEventList
|
|
95
95
|
end
|
96
96
|
|
97
97
|
|
98
|
-
end
|
98
|
+
end
|
99
|
+
|
@@ -1,62 +1,63 @@
|
|
1
1
|
#event-list-items
|
2
|
-
- @events
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
.event-list-item__photo.col-xs-12.col-sm-4
|
7
|
-
.photo
|
8
|
-
= link_to event_path(event.id) do
|
9
|
-
%img.img-responsive{ src: "#{event.image}"}
|
10
|
-
- if event.featured_item
|
11
|
-
.event_list-item__photo-featured-item
|
12
|
-
Featured Event!
|
13
|
-
.event-list-item__info.col-xs-12.col-sm-8
|
14
|
-
= link_to event_path(event.id) do
|
15
|
-
%h2
|
16
|
-
= event.title
|
17
|
-
%h3
|
18
|
-
%span.strong
|
19
|
-
= event.header
|
20
|
-
%span.light
|
21
|
-
= event.sub_header
|
2
|
+
- cache(@events) do
|
3
|
+
- @events.each do |event|
|
4
|
+
- cache(event) do
|
5
|
+
.row.event-list-item{class: event.id, data:{ genre: event.categories.first.id, date: event.performances.first.start_date, location: event.locations.first.id} }
|
22
6
|
%hr
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
7
|
+
.event-list-item__photo.col-xs-12.col-sm-4
|
8
|
+
.photo
|
9
|
+
= link_to event_path(event.id) do
|
10
|
+
%img.img-responsive{ src: "#{event.image}"}
|
11
|
+
- if event.featured_item
|
12
|
+
.event_list-item__photo-featured-item
|
13
|
+
Featured Event!
|
14
|
+
.event-list-item__info.col-xs-12.col-sm-8
|
15
|
+
= link_to event_path(event.id) do
|
16
|
+
%h2
|
17
|
+
= event.title
|
18
|
+
%h3
|
19
|
+
%span.strong
|
20
|
+
= event.header
|
21
|
+
%span.light
|
22
|
+
= event.sub_header
|
23
|
+
%hr
|
34
24
|
%p
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
25
|
+
- if event.locations.count == 1
|
26
|
+
- event_location = event.locations.first
|
27
|
+
=link_to location_path(id: event_location.slug) do
|
28
|
+
= event_location.title
|
29
|
+
@
|
30
|
+
=link_to area_path(id: event_location.area_slug) do
|
31
|
+
= event_location.area_title
|
32
|
+
- else
|
33
|
+
Multiple Locations
|
34
|
+
- if event.performances.count > 1
|
40
35
|
%p
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
%
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
-
|
62
|
-
= link_to "
|
36
|
+
Multiple dates and times
|
37
|
+
%button.btn.btn-sm.btn-default.btn-popover{type: "button", data: {content: date_time_popover(event.performances), html: "true", placement:"top", toggle: "popover"}, title:"All Dates and Times"}
|
38
|
+
Show all
|
39
|
+
- else
|
40
|
+
- event.performances.each do |perf|
|
41
|
+
%p
|
42
|
+
= perf.start_date.strftime("%A, %B %d")
|
43
|
+
= ", "
|
44
|
+
= perf.start_date.strftime("%I:%M%p").downcase
|
45
|
+
= " - "
|
46
|
+
= perf.end_date.strftime('%I:%M%p').downcase
|
47
|
+
%hr
|
48
|
+
%p
|
49
|
+
.event-list-item__info_short_description
|
50
|
+
-# category = event.categories.first
|
51
|
+
-# %a.strong(href='#')
|
52
|
+
= category.name
|
53
|
+
%span
|
54
|
+
= event.short_description.html_safe
|
55
|
+
%p
|
56
|
+
.event-list-item__button-group
|
57
|
+
= link_to "Details", event_path(event.id), class: 'btn event-list-item__btn'
|
58
|
+
- unless event.buy_url.blank?
|
59
|
+
= link_to "Tickets", "#{event.buy_url}", class: 'btn event-list-item__btn', target: '_blank'
|
60
|
+
-#%button.btn.event-list-item__btn{href: "", data: {toggle:"modal", target:"#share-modal"}, type: "button"}
|
61
|
+
Share
|
62
|
+
- unless event.locations.first.directions_url.blank?
|
63
|
+
= link_to "Directions", "#{event.locations.first.directions_url}", class: 'btn event-list-item__btn', target: '_blank'
|
data/festivity_extension.rb
CHANGED
@@ -8,6 +8,7 @@ class FestivityExtension < TrustyCms::Extension
|
|
8
8
|
|
9
9
|
def activate
|
10
10
|
require 'fog'
|
11
|
+
require 'actionpack/action_caching'
|
11
12
|
admin.page.edit.add(:form, "festivity_includes", :before => 'edit_page_parts')
|
12
13
|
admin.page.edit.add(:form, "festivity_featured_image_fields", :after => 'edit_page_parts')
|
13
14
|
admin.page.edit.add(:form, "festivity_base_fields", :after => 'edit_page_parts')
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_dependency "trusty-layouts-extension" , "~> 2.0"
|
30
30
|
s.add_dependency "trusty-rad-social-extension" , "~> 2.0"
|
31
31
|
s.add_dependency "trusty-multi-site-extension" , "~> 2.0"
|
32
|
+
s.add_dependency 'actionpack-action_caching' , '~> 1.1.1'
|
32
33
|
s.add_dependency 'dalli-elasticache' ,'~> 0.1.2'
|
33
34
|
|
34
35
|
s.add_dependency 'trusty_google_custom_search'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trusty-festivity-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Sipple
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trusty-cms
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '2.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: actionpack-action_caching
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.1.1
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.1.1
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: dalli-elasticache
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|