Added lodging to splash view
This commit is contained in:
parent
4cc039b358
commit
c1063645da
13 changed files with 53 additions and 5 deletions
|
|
@ -10,7 +10,8 @@ class Conference < ActiveRecord::Base
|
|||
:difficulty_levels_attributes, :use_difficulty_levels,
|
||||
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
|
||||
:media_id, :media_type, :color, :description,
|
||||
:registration_description, :ticket_description
|
||||
:registration_description, :ticket_description,
|
||||
:lodging_description
|
||||
|
||||
has_paper_trail
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
class Lodging < ActiveRecord::Base
|
||||
attr_accessible :name, :description, :photo
|
||||
attr_accessible :name, :description, :photo, :website_link
|
||||
belongs_to :venue
|
||||
has_attached_file :photo,
|
||||
styles: { thumb: '100x100>', large: '300x300>' }
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_description, hint: 'This description will appear in registration segment of the splash'
|
||||
= f.input :ticket_description, hint: 'This will appear in the Tickets segment of the splash'
|
||||
|
||||
= f.input :lodging_description, hint: 'This will appear in the lodging segement of the splash'
|
||||
= f.inputs :name => "Media" do
|
||||
- if !@conference.logo.blank?
|
||||
= image_tag @conference.logo(:thumb)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
of what they are offering, about types of rooms, prices and address' %>
|
||||
<%= image_tag f.object.photo(:thumb) if !f.object.photo.blank? %>
|
||||
<%= f.input :photo %>
|
||||
<%= f.input :website_link %>
|
||||
<%= remove_association_link :lodging, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@
|
|||
%li
|
||||
%b
|
||||
= link_to 'Visit Venue Website', @conference.venue.website, target: '_blank'
|
||||
- if @conference.venue
|
||||
- unless @conference.venue.lodgings.empty?
|
||||
= render 'lodging'
|
||||
|
||||
|
||||
:javascript
|
||||
|
|
|
|||
17
app/views/conference/_lodging.html.haml
Normal file
17
app/views/conference/_lodging.html.haml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
%div.row.col-md-12
|
||||
%h2 Lodgings
|
||||
-unless @conference.lodging_description.blank?
|
||||
%p.lead
|
||||
= @conference.lodging_description
|
||||
|
||||
%div.row
|
||||
- @conference.venue.lodgings.each do |r|
|
||||
%div.col-md-3.thumbnail
|
||||
-unless r.photo.blank?
|
||||
= image_tag r.photo(:large), class: 'img-responsive'
|
||||
-unless r.name.blank?
|
||||
%h4 #{ r.name }
|
||||
-unless r.description.blank?
|
||||
%p.text-left #{ r.description }
|
||||
- unless r.website_link.blank?
|
||||
= link_to 'Go to Website', r.website_link
|
||||
Loading…
Add table
Add a link
Reference in a new issue