FIXUP fragment caching issues

This commit is contained in:
James Mason 2017-11-29 15:29:06 -08:00
parent 5fb09f398a
commit 754d201b01
7 changed files with 36 additions and 31 deletions

View file

@ -12,7 +12,6 @@ class ConferencesController < ApplicationController
@conference = Conference.unscoped.eager_load(
:organization,
:splashpage,
:venue,
:registration_period,
:tickets,
:confirmed_tracks,
@ -26,6 +25,7 @@ class ConferencesController < ApplicationController
:sponsors,
:call_for_sponsors,
:contact,
venue: [:commercial],
highlighted_events: [:speakers],
sponsorship_levels: [:sponsors]
).order(

View file

@ -13,5 +13,3 @@
- else
.caption
%h3.text-center= booth.title
- content_for :modals do
= render 'modal_description', object: booth

View file

@ -1,21 +1,22 @@
- content_for :modals do
.modal.fade{ id: "modal-#{object.class.name.downcase}-#{object.id}" }
.modal-dialog
.modal-content
.modal-header
%button.close{ data: { dismiss: 'modal' } }
%i.fa.fa-close
%h3.modal-title
= object.try(:title) || object.try(:name)
.modal-body
%p.logo
= link_to object.website_url || '#', target: '_blank' do
- img_classes = ['img-responsive center-block']
- if object.is_a? Sponsor
- img_classes << ['img-sponsor',
"img-sponsor-#{object.sponsorship_level.position}"]
= image_tag get_logo(object), class: img_classes
%p.description
= object.description
.modal-footer
= link_to nil, object.website_url, target: '_blank'
- cache [object, '#modal'] do
.modal.fade{ id: "modal-#{object.class.name.downcase}-#{object.id}" }
.modal-dialog
.modal-content
.modal-header
%button.close{ data: { dismiss: 'modal' } }
%i.fa.fa-close
%h3.modal-title
= object.try(:title) || object.try(:name)
.modal-body
%p.logo
= link_to object.website_url || '#', target: '_blank' do
- img_classes = ['img-responsive center-block']
- if object.is_a? Sponsor
- img_classes << ['img-sponsor',
"img-sponsor-#{object.sponsorship_level.position}"]
= image_tag get_logo(object), class: img_classes
%p.description
= object.description
.modal-footer
= link_to nil, object.website_url, target: '_blank'

View file

@ -31,3 +31,7 @@
= link_to(conference_schedule_path(conference.short_title),
class: 'btn btn-success btn-lg') do
Full Schedule
- conference.confirmed_booths.each do |booth|
- content_for :modals do
= render 'modal_description', object: booth

View file

@ -21,8 +21,6 @@
class: ['img-responsive', 'img-sponsor',
"img-sponsor-#{sponsorship_level.position}"],
title: sponsor.name
- content_for :modals do
= render 'modal_description', object: sponsor
- if conference.call_for_sponsors.try(:open?)
.row
@ -31,3 +29,7 @@
Want to sponsor?
= link_to(sponsorship_mailto(conference)) do
Contact us!
- conference.sponsors.each do |sponsor|
- content_for :modals do
= render 'modal_description', object: sponsor

View file

@ -2,11 +2,11 @@
%li
%a.smoothscroll{ href: '#venue' } Venue
- cache [conference.venue, conference.venue.commercial, '#splash#venue'] do
%section#venue
- if conference.venue.location?
= render '/conferences/venue_map', conference: conference
- else
%section#venue
- if conference.venue.location?
= render '/conferences/venue_map', conference: conference
- else
- cache [conference.venue, conference.venue.commercial, '#splash#venue'] do
.container
.row
.col-md-6

View file

@ -43,5 +43,5 @@
You can run, copy, distribute, study, change and improve it.
The source code and the developers are on
=link_to "github.", "https://github.com/openSUSE/osem"
= content_for(:script_body)
= yield :script_body
= piwik_tracking_tag