Use a picture format for ticketing
Instead of analyzing image size using the local file, rely on a processed image of the appropriate dimensions. Resolves #1828
This commit is contained in:
parent
e01d849374
commit
710010cb76
3 changed files with 14 additions and 15 deletions
|
|
@ -31,12 +31,7 @@
|
|||
= @user.email
|
||||
.col-md-5.col-md-offset-2.box.well
|
||||
- if @conference.picture?
|
||||
- width = @conference.picture.image[:width]
|
||||
- height = @conference.picture.image[:height]
|
||||
- if 10 * width > 15 * height
|
||||
= image_tag(@conference.picture_url, width: '150')
|
||||
- else
|
||||
= image_tag(@conference.picture_url, height: '100')
|
||||
= image_tag(@conference.picture.ticket.url, class: 'img-responsive')
|
||||
- else
|
||||
= image_tag('/img/osem-logo.png', class: 'img-responsive')
|
||||
%p.text-left
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue