Created
December 8, 2014 22:10
-
-
Save davinmsu/485e291871fca9a012b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - offers.each do |offer| | |
| .offer data-id="#{offer.id}" data-hidden="#{offer.hidden?}" | |
| .hidden-title = offer.hiddenTitle | |
| .offer-type class="#{offer.type.class}" = t(offer.type.title) | |
| // реализация интернационализации t() | |
| .imgWrapper data-gallery="#{offer.gallery}" data-rotate="#{offer.rotate?}" data-video="#{offer.video.count if offer.video.exists?}" | |
| .slider | |
| - if offer.images.empty? | |
| .no-image | |
| - else | |
| - offer.images.each do |i| | |
| img src="#{i.thumb.url}" alt="#{i.alt}" data-big-img="#{i.big.url if i.big.exists?}" | |
| h1 = offer.header | |
| .description = offer.description | |
| - unless offer.options.empty? | |
| ul.options | |
| - offer.options.each do |o| | |
| li | |
| - if o.type.exists? | |
| i class="option-icon-#{o.type}" | |
| span = o.value | |
| - unless offer.moreInfo.empty? | |
| ul.more-info | |
| - offer.moreInfo.each do |i| | |
| li = i | |
| // Экшн дополнительного чека на наличие фотографии и общего кол-ва путем обращения на бэк изображений ajax | |
| // этот пункт в темплейте реализовывать считаю нецелесообразным, поскольку это задача джаваскрипта |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment