trusty-festivity-extension 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +33 -0
  4. data/README.md +2 -0
  5. data/Rakefile +110 -0
  6. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  7. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  8. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  9. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  10. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  11. data/app/assets/images/pct-black.png +0 -0
  12. data/app/assets/images/skins/pghkids/footer.png +0 -0
  13. data/app/assets/images/skins/pghkids/footer_mobile.png +0 -0
  14. data/app/assets/images/skins/pghkids/frog.png +0 -0
  15. data/app/assets/images/skins/pghkids/frog_mobile.png +0 -0
  16. data/app/assets/images/skins/pghkids/header.png +0 -0
  17. data/app/assets/images/skins/pghkids/header_mobile.png +0 -0
  18. data/app/assets/images/skins/pghkids/seafoam.jpg +0 -0
  19. data/app/assets/javascripts/admin/festivity_admin.js +22 -0
  20. data/app/assets/javascripts/admin/pages/ajax_image_uploader.js +29 -0
  21. data/app/assets/javascripts/admin/pages/page_bindings.js +94 -0
  22. data/app/assets/javascripts/admin/pages/performances.js +59 -0
  23. data/app/assets/javascripts/admin/sites/categories.js +74 -0
  24. data/app/assets/javascripts/admin/sites/category_types.js +63 -0
  25. data/app/assets/javascripts/admin/sites/site_bindings.js +4 -0
  26. data/app/assets/javascripts/ajaxupload.js +1 -0
  27. data/app/assets/javascripts/bootstrap-sprockets.js +12 -0
  28. data/app/assets/javascripts/bootstrap.js +2306 -0
  29. data/app/assets/javascripts/bootstrap.min.js +7 -0
  30. data/app/assets/javascripts/bootstrap/affix.js +162 -0
  31. data/app/assets/javascripts/bootstrap/alert.js +94 -0
  32. data/app/assets/javascripts/bootstrap/button.js +116 -0
  33. data/app/assets/javascripts/bootstrap/carousel.js +237 -0
  34. data/app/assets/javascripts/bootstrap/collapse.js +211 -0
  35. data/app/assets/javascripts/bootstrap/dropdown.js +161 -0
  36. data/app/assets/javascripts/bootstrap/modal.js +324 -0
  37. data/app/assets/javascripts/bootstrap/popover.js +113 -0
  38. data/app/assets/javascripts/bootstrap/scrollspy.js +175 -0
  39. data/app/assets/javascripts/bootstrap/tab.js +153 -0
  40. data/app/assets/javascripts/bootstrap/tooltip.js +472 -0
  41. data/app/assets/javascripts/bootstrap/transition.js +59 -0
  42. data/app/assets/javascripts/events/event_list_bindings.js +3 -0
  43. data/app/assets/javascripts/events/filters.js +100 -0
  44. data/app/assets/javascripts/festivity.js +1 -0
  45. data/app/assets/javascripts/festivity_app.js +13 -0
  46. data/app/assets/javascripts/jasny-bootstrap.js +1024 -0
  47. data/app/assets/javascripts/jquery-migrate.js +521 -0
  48. data/app/assets/javascripts/jquery.collapse.js +176 -0
  49. data/app/assets/javascripts/jquery.collapse_cookie_storage.js +37 -0
  50. data/app/assets/javascripts/jquery.collapse_storage.js +56 -0
  51. data/app/assets/javascripts/jquery.inputmask.bundle.min.js +10 -0
  52. data/app/assets/javascripts/lodash.min.js +88 -0
  53. data/app/assets/javascripts/readmore.min.js +11 -0
  54. data/app/assets/javascripts/script.js +22 -0
  55. data/app/assets/javascripts/underscore.js +1545 -0
  56. data/app/assets/stylesheets/_bootstrap-compass.scss +9 -0
  57. data/app/assets/stylesheets/_bootstrap-mincer.scss +19 -0
  58. data/app/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
  59. data/app/assets/stylesheets/_bootstrap.scss +50 -0
  60. data/app/assets/stylesheets/_defaults.scss +6 -0
  61. data/app/assets/stylesheets/_event_filter_bar.scss +78 -0
  62. data/app/assets/stylesheets/_faq.scss +48 -0
  63. data/app/assets/stylesheets/_filter-bar-mobile.scss +32 -0
  64. data/app/assets/stylesheets/_footer.scss +18 -0
  65. data/app/assets/stylesheets/_global.scss +30 -0
  66. data/app/assets/stylesheets/_header.scss +95 -0
  67. data/app/assets/stylesheets/_landing_page.scss +62 -0
  68. data/app/assets/stylesheets/_locations.scss +17 -0
  69. data/app/assets/stylesheets/_media-queries.scss +9 -0
  70. data/app/assets/stylesheets/_mixins.scss +17 -0
  71. data/app/assets/stylesheets/_nav.scss +128 -0
  72. data/app/assets/stylesheets/_normalize.scss +375 -0
  73. data/app/assets/stylesheets/_overrides.scss +11 -0
  74. data/app/assets/stylesheets/_page-template.scss +124 -0
  75. data/app/assets/stylesheets/_related_events.scss +20 -0
  76. data/app/assets/stylesheets/_search-results.scss +20 -0
  77. data/app/assets/stylesheets/_utils.scss +8 -0
  78. data/app/assets/stylesheets/admin/festivity_admin.scss +28 -0
  79. data/app/assets/stylesheets/admin/modules/_category_styles.scss +23 -0
  80. data/app/assets/stylesheets/admin/modules/_form_styles.scss +40 -0
  81. data/app/assets/stylesheets/admin/modules/_list_styles.scss +30 -0
  82. data/app/assets/stylesheets/admin/modules/_variables.scss +3 -0
  83. data/app/assets/stylesheets/bootstrap/_alerts.scss +73 -0
  84. data/app/assets/stylesheets/bootstrap/_badges.scss +67 -0
  85. data/app/assets/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
  86. data/app/assets/stylesheets/bootstrap/_button-groups.scss +243 -0
  87. data/app/assets/stylesheets/bootstrap/_buttons.scss +160 -0
  88. data/app/assets/stylesheets/bootstrap/_carousel.scss +269 -0
  89. data/app/assets/stylesheets/bootstrap/_close.scss +36 -0
  90. data/app/assets/stylesheets/bootstrap/_code.scss +69 -0
  91. data/app/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
  92. data/app/assets/stylesheets/bootstrap/_dropdowns.scss +214 -0
  93. data/app/assets/stylesheets/bootstrap/_forms.scss +570 -0
  94. data/app/assets/stylesheets/bootstrap/_glyphicons.scss +301 -0
  95. data/app/assets/stylesheets/bootstrap/_grid.scss +84 -0
  96. data/app/assets/stylesheets/bootstrap/_input-groups.scss +166 -0
  97. data/app/assets/stylesheets/bootstrap/_jumbotron.scss +50 -0
  98. data/app/assets/stylesheets/bootstrap/_labels.scss +66 -0
  99. data/app/assets/stylesheets/bootstrap/_list-group.scss +124 -0
  100. data/app/assets/stylesheets/bootstrap/_media.scss +61 -0
  101. data/app/assets/stylesheets/bootstrap/_mixins.scss +39 -0
  102. data/app/assets/stylesheets/bootstrap/_modals.scss +148 -0
  103. data/app/assets/stylesheets/bootstrap/_navbar.scss +663 -0
  104. data/app/assets/stylesheets/bootstrap/_navs.scss +244 -0
  105. data/app/assets/stylesheets/bootstrap/_normalize.scss +427 -0
  106. data/app/assets/stylesheets/bootstrap/_pager.scss +54 -0
  107. data/app/assets/stylesheets/bootstrap/_pagination.scss +88 -0
  108. data/app/assets/stylesheets/bootstrap/_panels.scss +265 -0
  109. data/app/assets/stylesheets/bootstrap/_popovers.scss +135 -0
  110. data/app/assets/stylesheets/bootstrap/_print.scss +107 -0
  111. data/app/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
  112. data/app/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
  113. data/app/assets/stylesheets/bootstrap/_responsive-utilities.scss +177 -0
  114. data/app/assets/stylesheets/bootstrap/_scaffolding.scss +150 -0
  115. data/app/assets/stylesheets/bootstrap/_tables.scss +234 -0
  116. data/app/assets/stylesheets/bootstrap/_theme.scss +273 -0
  117. data/app/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
  118. data/app/assets/stylesheets/bootstrap/_tooltip.scss +103 -0
  119. data/app/assets/stylesheets/bootstrap/_type.scss +298 -0
  120. data/app/assets/stylesheets/bootstrap/_utilities.scss +56 -0
  121. data/app/assets/stylesheets/bootstrap/_variables.scss +862 -0
  122. data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
  123. data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
  124. data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +11 -0
  125. data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  126. data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +52 -0
  127. data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  128. data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  129. data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
  130. data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
  131. data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  132. data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  133. data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  134. data/app/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
  135. data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  136. data/app/assets/stylesheets/bootstrap/mixins/_list-group.scss +31 -0
  137. data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  138. data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  139. data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
  140. data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +23 -0
  141. data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  142. data/app/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  143. data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  144. data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  145. data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
  146. data/app/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  147. data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  148. data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  149. data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +11 -0
  150. data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  151. data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  152. data/app/assets/stylesheets/events/_event-list-item.scss +85 -0
  153. data/app/assets/stylesheets/events/_event_template.scss +66 -0
  154. data/app/assets/stylesheets/events/_filter-bar.scss +5 -0
  155. data/app/assets/stylesheets/festivity.scss +35 -0
  156. data/app/assets/stylesheets/skins/pghkids/_events.scss +17 -0
  157. data/app/assets/stylesheets/skins/pghkids/_footer.scss +22 -0
  158. data/app/assets/stylesheets/skins/pghkids/_global.scss +42 -0
  159. data/app/assets/stylesheets/skins/pghkids/_header.scss +27 -0
  160. data/app/assets/stylesheets/skins/pghkids/_home.scss +113 -0
  161. data/app/assets/stylesheets/skins/pghkids/skin.scss +8 -0
  162. data/app/assets/stylesheets/vars/_vars_color.scss +6 -0
  163. data/app/assets/stylesheets/vars/_vars_media-queries.scss +5 -0
  164. data/app/assets/stylesheets/vars/_vars_type.scss +1 -0
  165. data/app/controllers/admin/festivity_categories_controller.rb +31 -0
  166. data/app/controllers/admin/festivity_category_types_controller.rb +31 -0
  167. data/app/controllers/admin/festivity_performances_controller.rb +21 -0
  168. data/app/controllers/festivity_events_controller.rb +71 -0
  169. data/app/controllers/festivity_location_areas_controller.rb +17 -0
  170. data/app/controllers/festivity_locations_controller.rb +19 -0
  171. data/app/controllers/search_controller.rb +17 -0
  172. data/app/helpers/admin/festivity_performances_helper.rb +3 -0
  173. data/app/helpers/admin/snippets_helper.rb +3 -0
  174. data/app/helpers/festivity_events_helper.rb +12 -0
  175. data/app/helpers/festivity_locations_helper.rb +4 -0
  176. data/app/models/festivity_base_page.rb +23 -0
  177. data/app/models/festivity_category.rb +17 -0
  178. data/app/models/festivity_category_type.rb +14 -0
  179. data/app/models/festivity_event_list.rb +90 -0
  180. data/app/models/festivity_event_list/festivity_event.rb +40 -0
  181. data/app/models/festivity_event_list/festivity_event_performance.rb +10 -0
  182. data/app/models/festivity_event_list/festivity_location.rb +15 -0
  183. data/app/models/festivity_event_page.rb +55 -0
  184. data/app/models/festivity_location_area_page.rb +5 -0
  185. data/app/models/festivity_location_page.rb +3 -0
  186. data/app/models/festivity_market_page.rb +3 -0
  187. data/app/models/festivity_page_category.rb +4 -0
  188. data/app/models/festivity_performance.rb +29 -0
  189. data/app/views/admin/pages/_festivity_base_fields.html.haml +75 -0
  190. data/app/views/admin/pages/_festivity_featured_image_fields.html.haml +3 -0
  191. data/app/views/admin/pages/_festivity_includes.html.haml +2 -0
  192. data/app/views/admin/pages/_festivity_location_fields.html.haml +26 -0
  193. data/app/views/admin/pages/partials/_categories.html.haml +18 -0
  194. data/app/views/admin/pages/partials/_category.html.haml +4 -0
  195. data/app/views/admin/pages/partials/_featured_image.html.haml +18 -0
  196. data/app/views/admin/pages/partials/_performance.html.haml +13 -0
  197. data/app/views/admin/pages/partials/_performances.html.haml +11 -0
  198. data/app/views/admin/pages/partials/_performances_table.html.haml +15 -0
  199. data/app/views/admin/sites/_festivity_site_fields.html.haml +26 -0
  200. data/app/views/admin/sites/partials/_category.html.haml +7 -0
  201. data/app/views/admin/sites/partials/_category_popup.html.haml +19 -0
  202. data/app/views/admin/sites/partials/_category_popups.haml +27 -0
  203. data/app/views/admin/sites/partials/_category_section.html.haml +7 -0
  204. data/app/views/admin/sites/partials/_category_types.html.haml +23 -0
  205. data/app/views/admin/sites/partials/_filters.html.haml +25 -0
  206. data/app/views/admin/sites/partials/_new_category.html.haml +3 -0
  207. data/app/views/admin/sites/partials/_new_category_type.html.haml +3 -0
  208. data/app/views/festivity_events/_event_filters.html.haml +39 -0
  209. data/app/views/festivity_events/_event_list.html.haml +62 -0
  210. data/app/views/festivity_events/_filter_bar_mobile.html.haml +22 -0
  211. data/app/views/festivity_events/index.html.haml +34 -0
  212. data/app/views/festivity_events/show.html.haml +152 -0
  213. data/app/views/festivity_location_areas/show.html.haml +29 -0
  214. data/app/views/festivity_locations/show.html.haml +66 -0
  215. data/app/views/header/_meta_tags.html.haml +8 -0
  216. data/app/views/navigation/_subnav_one_column.html.haml +15 -0
  217. data/app/views/navigation/_subnav_three_column.html.haml +7 -0
  218. data/app/views/navigation/_three_column_item.html.haml +11 -0
  219. data/app/views/search/_page.html.haml +1 -0
  220. data/app/views/search/_pagination_links.html.haml +7 -0
  221. data/app/views/search/_result_item.html.haml +6 -0
  222. data/app/views/search/show.html.haml +19 -0
  223. data/config/initializers/pluralizations.rb +0 -0
  224. data/config/initializers/radiant_config.rb +1 -0
  225. data/config/locales/en.yml +16 -0
  226. data/config/routes.rb +14 -0
  227. data/config/trustygems.yml +2 -0
  228. data/db/content/layouts/base.html +174 -0
  229. data/db/content/layouts/normal.html +5 -0
  230. data/db/fixtures/home_pages.yml +40 -0
  231. data/db/fixtures/layouts.yml +2 -0
  232. data/db/fixtures/pages.yml +23 -0
  233. data/db/fixtures/sites.yml +57 -0
  234. data/db/fixtures/users.yml +8 -0
  235. data/db/migrate/200150325136087799_add_event_performances_view.rb +27 -0
  236. data/db/migrate/200150425136087799_update_event_performances_view_with_site.rb +27 -0
  237. data/db/migrate/20150123175758_add_site_fields.rb +15 -0
  238. data/db/migrate/20150127090858995_add_base_event_fields.rb +24 -0
  239. data/db/migrate/20150127091005232_add_market_and_event_fields.rb +29 -0
  240. data/db/migrate/20150204113325731_add_category_types_table.rb +15 -0
  241. data/db/migrate/20150204113427832_add_categories_table.rb +15 -0
  242. data/db/migrate/20150204113510326_add_page_categories_table.rb +12 -0
  243. data/db/migrate/20150226131727777_add_location_page_fields.rb +19 -0
  244. data/db/migrate/20150302135485569_add_performances_table.rb +19 -0
  245. data/db/migrate/20150324135487799_add_indexes.rb +21 -0
  246. data/festivity_extension.rb +25 -0
  247. data/lib/festivity/admin/assets_helper.rb +17 -0
  248. data/lib/festivity/engine.rb +9 -0
  249. data/lib/festivity/extensions/page_extensions.rb +61 -0
  250. data/lib/festivity/extensions/pages_helper_extensions.rb +11 -0
  251. data/lib/festivity/extensions/paperclipped_extensions.rb +22 -0
  252. data/lib/festivity/extensions/site_extensions.rb +40 -0
  253. data/lib/festivity/mixins/not_found.rb +10 -0
  254. data/lib/tags/header_tags.rb +41 -0
  255. data/lib/tags/navigation_tags.rb +55 -0
  256. data/lib/tasks/active_record_utils.rb +35 -0
  257. data/lib/tasks/festivity_extension_tasks.rake +7 -0
  258. data/lib/tasks/setup.rake +101 -0
  259. data/lib/trusty-festivity-extension.rb +8 -0
  260. data/trusty-festivity-extension.gemspec +37 -0
  261. metadata +442 -0
@@ -0,0 +1,15 @@
1
+ class FestivityEventList::FestivityLocation
2
+
3
+ attr_reader :id, :title, :slug, :area_id, :area_title, :area_slug, :directions_url
4
+
5
+ def initialize(location_hash)
6
+ @id = location_hash[:id]
7
+ @title = location_hash[:title]
8
+ @slug = location_hash[:slug]
9
+ @directions_url = location_hash[:directions_url]
10
+ @area_id = location_hash[:area_id]
11
+ @area_title = location_hash[:area_title]
12
+ @area_slug = location_hash[:area_slug]
13
+ end
14
+
15
+ end
@@ -0,0 +1,55 @@
1
+ class FestivityEventPage < FestivityBasePage
2
+ has_many :festivity_performances, foreign_key: :event_page_id
3
+
4
+ def festivity_performances=(performances)
5
+ performances.each do |performance|
6
+ performance_id = performance.delete(:performance_id)
7
+ FestivityPerformance.find(performance_id).update_attributes(performance)
8
+ end
9
+ end
10
+
11
+ def performances
12
+ self.festivity_performances.select {|perf| perf.festivity_location_page && perf.start_date && perf.end_date }
13
+ end
14
+
15
+ def single_location?
16
+ @single_location ||= self.locations.count == 1
17
+ end
18
+
19
+ def locations
20
+ @locations ||= event_locations
21
+ end
22
+
23
+ def can_buy?
24
+ !self.buy_url.empty?
25
+ end
26
+
27
+ def has_social?
28
+ (has_twitter? or has_facebook? or has_homepage? or has_instagram?)
29
+ end
30
+
31
+ def has_twitter?
32
+ !self.artist_twitter.empty?
33
+ end
34
+
35
+ def has_facebook?
36
+ !self.artist_facebook.empty?
37
+ end
38
+
39
+ def has_instagram?
40
+ !self.artist_instagram.empty?
41
+ end
42
+
43
+ def has_homepage?
44
+ !self.artist_homepage.empty?
45
+ end
46
+
47
+ def event_locations
48
+ # Return array of unique locations
49
+ self.performances.
50
+ map{ |performance| performance.festivity_location_page }.
51
+ uniq{ |location| location.id }
52
+ end
53
+
54
+
55
+ end
@@ -0,0 +1,5 @@
1
+ class FestivityLocationAreaPage < Page
2
+ def body
3
+ self.part("body").content.html_safe
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ class FestivityLocationPage < Page
2
+ has_many :festivity_performances, foreign_key: :location_page_id
3
+ end
@@ -0,0 +1,3 @@
1
+ class FestivityMarketPage < FestivityBasePage
2
+
3
+ end
@@ -0,0 +1,4 @@
1
+ class FestivityPageCategory < ActiveRecord::Base
2
+ belongs_to :festivity_category
3
+ belongs_to :page
4
+ end
@@ -0,0 +1,29 @@
1
+ class FestivityPerformance < ActiveRecord::Base
2
+ validates_presence_of :event_page_id
3
+ belongs_to :festivity_event_page, foreign_key: :event_page_id
4
+ belongs_to :festivity_location_page, foreign_key: :location_page_id
5
+
6
+ attr_accessible :start_date, :end_date, :festivity_location_page, :notes
7
+
8
+ def start_date=(date)
9
+ super(parse_date(date))
10
+ end
11
+
12
+ def end_date=(date)
13
+ super(parse_date(date))
14
+ end
15
+
16
+ def festivity_location_page=(location)
17
+ super(FestivityLocationPage.find(location[:id])) unless location[:id].blank?
18
+ end
19
+
20
+ private
21
+
22
+ def parse_date(date)
23
+ time = Time.strptime("#{date}", '%m/%d/%Y %I:%M %p')
24
+ Time.zone.local(time.year, time.month, time.day, time.hour, time.min, time.sec)
25
+ rescue
26
+ nil
27
+ end
28
+
29
+ end
@@ -0,0 +1,75 @@
1
+ - if !@page.is_a?(FestivityBasePage) && @page.id
2
+ .festivity-div.festivity-title
3
+ %h4
4
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
5
+ Page Setup
6
+ %p.festivity-full
7
+ %label{for: "page_short_description"}
8
+ Short Description
9
+ = self.text_area( :page, :short_description, class: "textbox festivity-control", rows: 4)
10
+
11
+ - if @page.is_a?(FestivityBasePage) && @page.id
12
+
13
+ .festivity-div.festivity-title
14
+ %h4
15
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
16
+ Event Setup
17
+ - if @page.status_id == Status[:published].id
18
+ %p.festivity-full
19
+ View page:
20
+ = link_to "http://#{@page.site.base_domain}#{event_path(@page)}" do
21
+ = "http://#{@page.site.base_domain}#{event_path(@page)}"
22
+ %p.festivity-full
23
+ %label{for: "page_short_description"}
24
+ Short Description
25
+ = self.text_area( :page, :short_description, class: "textbox festivity-control", rows: 4)
26
+ %p.festivity-third
27
+ %label{for: "page_header"}
28
+ Header
29
+ = self.text_field( :page, :header, class: "textbox festivity-control")
30
+ %p.festivity-third
31
+ %label{for: "page_sub_header"}
32
+ Subheader
33
+ = self.text_field( :page, :sub_header, class: "textbox festivity-control")
34
+ %p.festivity-third
35
+ %label{for: "page_featured_item"}
36
+ Featured
37
+ = self.check_box( :page, :featured_item, class: "textbox festivity-control")
38
+ %p.festivity-third
39
+ %label{for: "page_buy_url"}
40
+ Buy Tickets URL
41
+ = self.text_field( :page, :buy_url, class: "textbox festivity-control")
42
+
43
+ .festivity-div.festivity-title
44
+ %h4
45
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
46
+ Artist Info
47
+ %p.festivity-third
48
+ %label{for: "page_artist_twitter"}
49
+ Twitter
50
+ = self.text_field(:page, :artist_twitter, class: "textbox festivity-control")
51
+ %p.festivity-third
52
+ %label{for: "page_artist_facebook"}
53
+ Facebook
54
+ = self.text_field(:page, :artist_facebook, class: "textbox festivity-control")
55
+ %p.festivity-third
56
+ %label{for: "page_artist_instagram"}
57
+ Instagram
58
+ = self.text_field(:page, :artist_instagram, class: "textbox festivity-control")
59
+ %p.festivity-third
60
+ %label{for: "page_artist_homepage"}
61
+ Home Page
62
+ = self.text_field(:page, :artist_homepage, class: "textbox festivity-control")
63
+ - if @page.is_a?(FestivityEventPage)
64
+ .festivity-div.festivity-title
65
+ %h4
66
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
67
+ Performances
68
+ = render partial: "admin/pages/partials/performances", locals: {performances: @page.festivity_performances, page_id: @page.id}
69
+
70
+
71
+ .festivity-div.festivity-title
72
+ %h4
73
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
74
+ Categories
75
+ = render partial: 'admin/pages/partials/categories', locals: { :category_types => @page.organization.festivity_active_category_types}
@@ -0,0 +1,3 @@
1
+ .festivity-space
2
+ .festivity-space
3
+ = render partial: 'admin/pages/partials/featured_image'
@@ -0,0 +1,2 @@
1
+ = stylesheet_link_tag 'admin/festivity_admin'
2
+ = javascript_include_tag 'admin/festivity_admin'
@@ -0,0 +1,26 @@
1
+ - if @page.is_a?(FestivityLocationPage) && @page.id
2
+
3
+ .festivity-div.festivity-title
4
+ %h4
5
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
6
+ Location Setup
7
+ %p.festivity-full
8
+ %label{for: "page_festivity_address"}
9
+ Address
10
+ = self.text_field( :page, :festivity_address, class: "textbox festivity-control")
11
+ %p.festivity-third
12
+ %label{for: "page_festivity_city"}
13
+ City
14
+ = self.text_field( :page, :festivity_city, class: "textbox festivity-control")
15
+ %p.festivity-third
16
+ %label{for: "page_festivity_state"}
17
+ State
18
+ = self.text_field( :page, :festivity_state, class: "textbox festivity-control")
19
+ %p.festivity-third
20
+ %label{for: "page_festivity_zip"}
21
+ Zip Code
22
+ = self.text_field( :page, :festivity_zip, class: "textbox festivity-control")
23
+ %p.festivity-full
24
+ %label{for: "page_festivity_directions_url"}
25
+ Directions URL
26
+ = self.text_field( :page, :festivity_directions_url, class: "textbox festivity-control")
@@ -0,0 +1,18 @@
1
+ %div{role: "tabpanel", id: "festivity-filters"}
2
+ %ul.nav.nav-tabs{role: "tablist"}
3
+ - category_types.each do |filter_category|
4
+ %li{role: "presentation"}
5
+ %a{href: "##{filter_category.name.parameterize}", role: "tab", aria: {controls: filter_category.name.parameterize}, data: {toggle: "tab"}}
6
+ = filter_category.name
7
+ .tab-content
8
+ - category_types.each do |filter_category|
9
+ %div{role: "tabpanel", class:"tab-pane", id: filter_category.name.parameterize}
10
+ .festivity-space
11
+ .festivity-full.festivity-list.festivity-div
12
+ %table{:id => "#{filter_category.name.parameterize}-table", :class => "index category-table"}
13
+ - filter_category.parent_categories.each do |parent_category|
14
+ = render partial: "admin/pages/partials/category", locals: {category: parent_category, filter_category: filter_category}
15
+ - parent_category.children.each do |child_category|
16
+ = render partial: "admin/pages/partials/category", locals: {category: child_category, filter_category: filter_category}
17
+
18
+ .festivity-space
@@ -0,0 +1,4 @@
1
+ %tr.page{:class =>"branch", :data => { :tt_branch => category.name.parameterize, :tt_id => category.id, :tt_parent_id => category.parent_id, :tt_page_id => category.id}, :id => "#{filter_category.name.parameterize}_#{category.name.parameterize}"}
2
+ %td
3
+ = check_box_tag "page[festivity_category_ids][]", category.id, @page.festivity_category_ids.include?(category.id), id: dom_id(category)
4
+ = label_tag dom_id(category), category.name
@@ -0,0 +1,18 @@
1
+ .festivity-div.festivity-title
2
+ %h4
3
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
4
+ Featured Image
5
+ .festivity-full
6
+ %p
7
+ .image_icons
8
+ #featured_image_icons
9
+ - if @page.image
10
+ %img{:src => "#{@page.image}", :alt=>""}
11
+ .festivity-space
12
+ %input{:type => "submit", :id => "featured_image_upload", :value => "Upload Featured Image"}
13
+
14
+ %input{:type=>'hidden', :id=> "async_create_asset_path", :value=>"#{admin_async_create_asset_path}"}
15
+ %input{:type=>'hidden', :id=> "auth_token", :value=>"#{form_authenticity_token}"}
16
+ %input{:type=>'hidden', :id=> "page_id", :value=>"#{@page.id}"}
17
+
18
+ .festivity-space
@@ -0,0 +1,13 @@
1
+ %tr
2
+ %td
3
+ = hidden_field_tag "page[festivity_performances][][performance_id]", performance.id, id: "performance_#{performance.id}_id"
4
+ = text_field_tag "page[festivity_performances][][start_date]", format_date(performance.start_date), id: "performance_#{performance.id}_start_date", class: "date_field"
5
+ %td
6
+ = text_field_tag "page[festivity_performances][][end_date]", format_date(performance.end_date), id: "performance_#{performance.id}_end_date", class: "date_field"
7
+ %td
8
+ = select_tag("page[festivity_performances][][festivity_location_page][id]", options_from_collection_for_select(locations, "id", "title", performance.location_page_id), {id: "performance_#{performance.id}_location_page_id", class: "textbox big", prompt: "Select location"})
9
+ %td
10
+ = text_field_tag "page[festivity_performances][][notes]", performance.notes, id: "performance_#{performance.id}_notes", size: 50
11
+ %td
12
+ %a.festivity-delete-performance.fa.fa-minus-circle{href: "#{url_for([:admin, performance])}", id: "festivity-delete-performance-#{performance.id}"}
13
+ Delete
@@ -0,0 +1,11 @@
1
+ - locations = FestivityLocationPage.all
2
+ .festivity-full.festivity-list.festivity-div
3
+ = render partial: 'admin/pages/partials/performances_table', locals: {performances: performances, locations: locations, page_id: page_id}
4
+ .right
5
+ %button{type: "button", id: "add-performance", href: "#{admin_festivity_performances_path}",
6
+ class: "btn btn-default btn-sm cat-type-btn",
7
+ aria: {label: "Left Align"}, data: {id: page_id}}
8
+ %span{class: "fa fa-plus-square fa-lg", aria: {hidden: "true"}}
9
+ &nbsp;
10
+ Add Performance
11
+ .festivity-space
@@ -0,0 +1,15 @@
1
+ %table{:id => "festivity-performances-table", :class => "index performances-table"}
2
+ %thead
3
+ %tr
4
+ %th
5
+ Start Date
6
+ %th
7
+ End Date
8
+ %th
9
+ Location
10
+ %th
11
+ Notes
12
+ %th
13
+ Delete
14
+ - performances.each do |performance|
15
+ = render partial: "admin/pages/partials/performance", locals: {performance: performance, locations: locations}
@@ -0,0 +1,26 @@
1
+ = stylesheet_link_tag 'admin/festivity_admin'
2
+ = javascript_include_tag 'admin/festivity_admin'
3
+
4
+ .festivity-div.festivity-space
5
+ .festivity-div.festivity-title
6
+ %h4
7
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
8
+ Festival Setup
9
+ %p.festivity-full
10
+ %label{for: "site_festivity_festival_name"}
11
+ Festival Name
12
+ = self.text_field( :site, :festivity_festival_name, class: "textbox festivity-control")
13
+ %p.festivity-third
14
+ %label{for: "site_festivity_start_date"}
15
+ Start Date
16
+ = self.text_field :site, :festivity_start_date, :class=> "textbox date festivity-control", :type=>"date", :value => (@site.festivity_start_date ? I18n.localize(@site.festivity_start_date.to_date, :format =>:default) : nil)
17
+ %p.festivity-third
18
+ %label{for: "site_festivity_end_date"}
19
+ End Date
20
+ = self.text_field :site, :festivity_end_date, :class=> "textbox date festivity-control", :type=>"date", :value => (@site.festivity_end_date ? I18n.localize(@site.festivity_end_date.to_date, :format =>:default) : nil)
21
+ %p.festivity-third
22
+ %label{for: "site_festivity_google_api_key"}
23
+ Google Search API Key
24
+ = self.text_field(:site, :festivity_google_api_key, class: "textbox festivity-control")
25
+
26
+ = render partial: 'admin/sites/partials/category_section'
@@ -0,0 +1,7 @@
1
+ %tr.page{:class =>"branch", :data => { :tt_branch => category.name.parameterize, :tt_id => category.id, :tt_parent_id => category.parent_id, :tt_page_id => category.id}, :id => "#{filter_category.name.parameterize}_#{category.name.parameterize}"}
2
+ %td
3
+ %span.fa.fa-angle-right
4
+ = category.name
5
+ .right
6
+ %a.festivity-delete-category.fa.fa-minus-circle{href: "#{url_for([:admin, category])}", id: "festivity-category-#{category.id}", data: { category:filter_category.name.parameterize}}
7
+ Delete
@@ -0,0 +1,19 @@
1
+ %div{id: "add_#{type_id}_popup", class: "popup", :style => "display: none"}
2
+ %div{id: "add_#{type_id}_busy", class: "busy", :style => "display: none"}= image('spinner.gif', :alt => "")
3
+ .popup_title
4
+ = "Add #{type_name}"
5
+ = form_for [:admin, FestivityCategory.new], :html => { :id => "new_#{type_id}" } do |f|
6
+ %p
7
+ %span#category-error.festivity-error
8
+ %label{:for => "#{type_id}_name_field"}
9
+ = type_name
10
+ = f.text_field :name, :id => "#{type_id}_name_field", :maxlength => 100, :style => "width: 15em", :class => "textbox big"
11
+ = hidden_field_tag "#{type_id}_type_id", category_type.id
12
+ %p
13
+ %label{:for => "#{type_id}_parent_id"}
14
+ = "Parent #{type_name}"
15
+ = f.select(:parent_id, options_from_collection_for_select(category_type.parent_categories, "id", "name"), {:include_blank => true}, {:id => "#{type_id}_parent_id", :class => "textbox big"})
16
+ .buttons
17
+ = submit_tag "Add #{type_name}", :id => "add_#{type_id}_button", :class => "button", :data => {:role => "add_category", :category => "#{type_id}", :form => "new_#{type_id}"}
18
+ = t('or')
19
+ = link_to t('cancel'), "javascript:void(0);", :class=>"cancel"
@@ -0,0 +1,27 @@
1
+ - content_for :popups do
2
+
3
+ #popup_window
4
+ .outer
5
+ .content
6
+ #add_category_type_popup.popup{:style => "display: none"}
7
+ #add_category_type_busy.busy{:style => "display: none"}= image('spinner.gif', :alt => "")
8
+ .popup_title
9
+ Add Filter Category
10
+ = form_for [:admin, FestivityCategoryType.new] do |f|
11
+ %p
12
+ %span#category-type-error.festivity-error
13
+ %label{:for => 'type_name_field'}
14
+ Category Type (i.e. Genre)
15
+ = f.text_field :name, :id => 'type_name_field', :maxlength => 100, :style => "width: 15em", :class => "textbox big"
16
+ = hidden_field_tag "type_site_id", @site.id
17
+ %p
18
+ %label{:for => 'type_page_class'}
19
+ Show Type
20
+ = f.select(:page_class, options_from_collection_for_select(FestivityBasePage.descendants.map, "name", "display_name"), {:id => "type_page_class", :class => "textbox big"})
21
+ .buttons
22
+ = submit_tag "Add Filter Category", :id => 'add_type_button', :class => "button"
23
+ = t('or')
24
+ = link_to t('cancel'), "javascript:void(0);", :class=>"cancel"
25
+
26
+ - @site.festivity_active_category_types.each do |category_type|
27
+ = render partial: "admin/sites/partials/category_popup", :locals => { category_type: category_type, type_name: category_type.name, type_id: category_type.name.parameterize}
@@ -0,0 +1,7 @@
1
+ .festivity-space
2
+ .festivity-title
3
+ %h4
4
+ %span{class: "fa fa-wrench fa-lg", aria: {hidden: "true"}}
5
+ Category Setup
6
+ = render partial: 'admin/sites/partials/category_types', :locals => { :category_types => @site.festivity_active_category_types}
7
+ = render partial: 'admin/sites/partials/category_popups'
@@ -0,0 +1,23 @@
1
+ #festivity-category-types.festivity-full
2
+ .festivity-third.left
3
+ %h4
4
+ Filter Categories
5
+ #festivity-types-list.festivity-list.festivity-div
6
+ - category_types.each do |type|
7
+ .festivity-div.list-item
8
+ .left
9
+ = "#{type.name} "
10
+ %span
11
+ = "(#{Object.const_get(type.page_class).display_name})"
12
+ .right
13
+ %a.festivity-type.fa.fa-minus-circle{href: "#{url_for([:admin, type])}", id: "festivity-type-#{type.id}"}
14
+ Delete
15
+ .right
16
+ %button{type: "button", id: "add-cat-type", href: "#add_category_type_popup",
17
+ class: "popup btn btn-default btn-sm cat-type-btn",
18
+ aria: {label: "Left Align"}, data: {toggle: "modal", target: "#add-category-type-form"}}
19
+ %span{class: "fa fa-plus-square fa-lg", aria: {hidden: "true"}}
20
+ &nbsp;
21
+ Add Category
22
+ .festivity-third.right
23
+ = render partial: 'admin/sites/partials/filters', :locals => { :category_types => category_types}