Move sponsor modal to a generic partial & redesign.
... use for booths also.
This commit is contained in:
parent
b2e1eb5fa9
commit
20e2b4b76b
5 changed files with 58 additions and 52 deletions
21
app/views/conferences/_modal_description.haml
Normal file
21
app/views/conferences/_modal_description.haml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
- 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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue