mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
The single query was producing a tremendously large ActiveRecord allocation. While this isn't nearly as cool as one query, it's still a significant reduction in SQL trips, and now has the bonus of only loading what is actually going to be displayed.
35 lines
1.2 KiB
Text
35 lines
1.2 KiB
Text
- cache [conference, venue, '#splash#header'] do
|
|
#banner
|
|
.container
|
|
.row
|
|
.col-md-8.col-md-offset-2#header
|
|
.row
|
|
.col-md-4
|
|
- if conference.picture?
|
|
= image_tag(conference.picture_url,
|
|
class: 'img-responsive img-center',
|
|
id: 'splash-logo')
|
|
.col-md-8
|
|
%h1
|
|
= conference.title
|
|
%h3
|
|
- if conference.start_date && conference.end_date
|
|
%span.date.text-nowrap
|
|
= date_string(conference.start_date, conference.end_date)
|
|
- if conference.venue
|
|
%span.venue.text-nowrap
|
|
- if venue.website
|
|
= sanitize link_to(venue.name, venue.website)
|
|
- else
|
|
= venue.city
|
|
- if venue.country_name != 'US'
|
|
•
|
|
= venue.country_name
|
|
|
|
- unless conference.description.blank?
|
|
%section#about
|
|
.container
|
|
.row
|
|
.col-md-8.col-md-offset-2
|
|
%h3.text-center
|
|
= markdown(conference.description)
|