<div itemscope itemtype="http://schema.org/Product" class="book-fullview clearfix"> <meta itemprop="category" content="<?php echo implode('>', array_slice(array_keys($breadcrumbs), 1, count($breadcrumbs) - 2)); ?>"> <meta itemprop="productID" content="isbn:<?php echo $book->isbn; ?>"> <meta itemprop="gtin13" content="<?php echo $book->isbn; ?>"> <meta itemprop="url" content="<?php echo Request::url(); ?>"> <div class="image"> <a href="<?php echo $book->image->url('original'); ?>" data-toggle="lightbox" data-title="<?php echo $book->title; ?>"> <?php echo HTML::image($book->image->url('large'), $book->title, ['itemprop' => 'image', 'class' => 'img-thumbnail']); ?> </a> <ul class="attributes"> <?php if($book->suggested): ?> <li class="suggested"><?php echo trans('website.labels.suggested'); ?></li> <?php endif; ?> <?php if($book->only_for_one_euro): ?> <li class="only-for-one-euro"><?php echo trans('website.labels.only-for-one-euro'); ?></li> <?php elseif($book->bookDiscounts->count()): ?> <li class="discount"><?php echo trans('website.labels.discount'); ?></li> <?php endif; ?> <?php if($book->novelty): ?> <li class="new"><?php echo trans('website.labels.new'); ?></li> <?php endif; ?> </ul> </div> <div class="details clearfix"> <h1 itemprop="name"><?php echo $book->title; ?></h1> <?php if(Sentry::check()): ?> <div data-rating="<?php echo $ratings ? $rating / $ratings : 0; ?>" class="rating"></div> <?php else: ?> <div data-rating="<?php echo $ratings ? $rating / $ratings : 0; ?>" tabindex="0" data-toggle="popover" data-trigger="focus" class="rating"></div> <?php endif; ?> <span class="ratings"><?php echo trans('website.labels.votes-count'); ?> (<span class="count"><?php echo $ratings; ?></span>)</span> <?php if(Sentry::check()): ?> <?php echo Form::open(['id' => 'rating', 'route' => 'book-rating', 'secure' => true]); ?> <?php echo Form::hidden('id', $book->id); ?> <?php echo Form::hidden('rate'); ?> <?php echo Form::close(); ?> <?php endif; ?> <br><br> <h2><?php echo $book->author; ?></h2> <span class="isbn"><?php echo trans('website.labels.isbn'); ?>: <?php echo $book->isbn; ?></span><br><br> <span class="publisher"><?php echo trans('website.labels.publisher'); ?>: <?php echo $book->publisher; ?></span><br> <span class="year"><?php echo trans('website.labels.year-of-issue'); ?>: <?php echo $book->year; ?></span><br> <span class="pages"><?php echo trans('website.labels.page-count'); ?>: <?php echo $book->pages; ?></span><br> <span class="binding"><?php echo trans('website.labels.binding'); ?>: <?php echo trans('website.labels.book-binding-' . $book->binding); ?></span><br> <?php if($book->format): ?> <span class="format"><?php echo trans('website.labels.format'); ?>: <?php echo $book->format; ?>mm</span><br> <?php endif; ?> <span class="weight"> <?php echo trans('website.labels.weight'); ?>: <span itemprop="weight" itemscope itemtype="http://schema.org/QuantitativeValue"> <span itemprop="value"><?php echo number_format(floatval($book->weight) * 1000, 0, '.', ''); ?></span> <meta itemprop="unitCode" content="GRM"> <span itemprop="unitText">g</span> </span> </span><br> <span class="stock"> <?php echo trans('website.labels.accessibility'); ?>: <span class="<?php echo ($book->stock<=Config::get('website.eshop.stock')) ? 'out' : 'in'; ?>"> <?php echo ($book->stock<=Config::get('website.eshop.stock')) ? trans('website.labels.out-of-stock') : trans('website.labels.in-stock'); ?> </span> </span><br> <div class="action"> <div class="prices"> <span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="price"> <?php echo trans('website.labels.e-shop-price-with-vat'); ?>: <?php if($book->only_for_one_euro): ?> <strike><?php echo number_format($book->price, 2, ',', ' '); ?> &euro;</strike> <strong> <span itemprop="price" content="<?php echo number_format(1, 2, '.', ''); ?>"><?php echo number_format(1, 2, ',', ' '); ?></span> <span itemprop="priceCurrency" content="EUR">&euro;</span> </strong> <?php elseif($book->bookDiscounts->count()): ?> <strike><?php echo number_format($book->price, 2, ',', ' '); ?> &euro;</strike> <strong> <span itemprop="price" content="<?php echo number_format($book->bookDiscounts->first()->discount, 2, '.', ''); ?>"><?php echo number_format($book->bookDiscounts->first()->discount, 2, ',', ' '); ?></span> <span itemprop="priceCurrency" content="EUR">&euro;</span> </strong> <meta itemprop="priceValidUntil" datetime="<?php echo date('Y-m-d', strtotime($book->bookDiscounts->first()->discount_end)); ?>"> <?php elseif($discount): ?> <strike title="<?php echo $discount->discountTranslations->first()->title; ?>"><?php echo number_format($book->price, 2, ',', ' '); ?> &euro;</strike> <strong title="<?php echo $discount->discountTranslations->first()->title; ?>"> <span itemprop="price" content="<?php echo number_format($book->price * ((100 - $discount->discount) / 100), 2, '.', ''); ?>"><?php echo number_format($book->price * ((100 - $discount->discount) / 100), 2, ',', ' '); ?></span> <span itemprop="priceCurrency" content="EUR">&euro;</span> </strong> <?php else: ?> <strong> <span itemprop="price" content="<?php echo number_format($book->price, 2, '.', ''); ?>"><?php echo number_format($book->price, 2, ',', ' '); ?></span> <span itemprop="priceCurrency" content="EUR">&euro;</span> </strong> <?php endif; ?> <link itemprop="availability" href="<?php echo ($book->stock<=Config::get('website.eshop.stock')) ? 'http://schema.org/OutOfStock' : 'http://schema.org/InStock'; ?>"> <link itemprop="itemCondition" href="http://schema.org/NewCondition"> </span><br> <span class="price regular"> <?php echo trans('website.labels.regular-price-with-vat'); ?>: <?php echo number_format($book->price / 0.75, 2, ',', ' '); ?> &euro; </span> </div> <?php if($book->stock > Config::get('website.eshop.stock')): ?> <?php echo Form::open(['route' => ['cart.add.book', $book->id], 'method' => 'POST', 'secure' => true]); ?> <?php echo Button::cart(trans('website.labels.add-to-cart'))->large()->prependIcon(Icon::shopping_cart())->submit(); ?> <?php echo Form::close(); ?> <?php else: ?> <a class="btn btn-cart btn-lg out-of-stock" tabindex="0" data-toggle="popover" data-trigger="focus"><span class="glyphicon glyphicon-shopping-cart"></span> Do košíka</a> <?php endif; ?> </div> </div> <div role="tabpanel" class="description"> <?php echo Navigation::tabs($tabs)->withAttributes(['role' => 'tablist']); ?> <div class="tab-content"> <?php foreach($tabs as $tab): ?> <div role="tabpanel" class="tab-pane <?php echo $tab['active'] ? 'active' : ''; ?>" id="<?php echo $tab['id']; ?>"> <?php if($tab['id']=='annotation'): ?> <?php if($book->description($language->id) != ''): ?> <p itemprop="description"><?php echo $book->description($language->id); ?></p> <?php else: ?> <div class="well well-lg text-center"> <h4><?php echo trans('website.messages.empty-' . $tab['id']); ?></h4> </div> <?php endif; ?> <?php endif; ?> <?php if($tab['id']=='review'): ?> <?php if($book->review($language->id) != ''): ?> <p><?php echo $book->review($language->id); ?></p> <?php else: ?> <div class="well well-lg text-center"> <h4><?php echo trans('website.messages.empty-' . $tab['id']); ?></h4> </div> <?php endif; ?> <?php endif; ?> </div> <?php endforeach; ?> </div> </div> </div> <?php $__env->startSection('scripts'); ?> @parent function updateRating(score) { var $form = $('form#rating'); var url = $form.prop('action'); var type = $form.prop('method'); $form.find('input[name=rate]').val(score); $.ajax({ url: url, type: type, data: $form.serializeArray(), success: function(response) { if (response.response == 'success') { $('span.ratings span.count').html(response.ratings); $('div.rating').raty('score', parseInt(response.rating) / parseInt(response.ratings)); $('div.rating').raty('readOnly', true); } } }); } <?php if(!Sentry::check()): ?> $('div.rating[data-toggle="popover"]').popover({ content: '<?php echo trans('website.messages.please-login-to-vote'); ?>' }); <?php endif; ?> $('div.rating').raty({ click: function(score, evt) { updateRating(score); }, score: function() { return $(this).attr('data-rating'); }, noRatedMsg: "<?php echo trans('website.messages.book-not-yet-rated'); ?>", hints: ['<?php echo trans('website.labels.bad'); ?>', '<?php echo trans('website.labels.poor'); ?>', '<?php echo trans('website.labels.regular'); ?>', '<?php echo trans('website.labels.good'); ?>', '<?php echo trans('website.labels.gorgeous'); ?>'], path: "<?php echo asset('img/raty'); ?>", halfShow: true, readOnly: <?php echo Sentry::check() ? ($rated ? 'true' : 'false') : 'true'; ?> }); $(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) { event.preventDefault(); $(this).ekkoLightbox(); }); <?php $__env->stopSection(); ?>