Refactoring lodgings
This commit is contained in:
parent
c0cdf3e6e5
commit
580c6c6ed9
11 changed files with 177 additions and 68 deletions
16
app/views/admin/lodgings/show.html.haml
Normal file
16
app/views/admin/lodgings/show.html.haml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
%h1
|
||||
= @lodging.name
|
||||
- unless @lodging.photo.blank? || @lodging.description.blank? || @lodging.website_link.blank?
|
||||
.div.thumbnail
|
||||
- unless @lodging.photo.blank?
|
||||
= image_tag @lodging.photo(:large), class: 'img-responsive'
|
||||
- unless @lodging.description.blank?
|
||||
.lead.text-center #{ markdown(@lodging.description) }
|
||||
- unless @lodging.website_link.blank?
|
||||
.text-center
|
||||
= link_to 'Go to Website', @lodging.website_link
|
||||
|
||||
= link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, @lodging.id),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
|
||||
= link_to 'Back', admin_conference_lodgings_path(@conference.short_title)
|
||||
Loading…
Add table
Add a link
Reference in a new issue