File indexing completed on 2024-12-29 05:24:39

0001 <?php 
0002 /**
0003  *  ocs-webserver
0004  *
0005  *  Copyright 2016 by pling GmbH.
0006  *
0007  *    This file is part of ocs-webserver.
0008  *
0009  *    This program is free software: you can redistribute it and/or modify
0010  *    it under the terms of the GNU Affero General Public License as
0011  *    published by the Free Software Foundation, either version 3 of the
0012  *    License, or (at your option) any later version.
0013  *
0014  *    This program is distributed in the hope that it will be useful,
0015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *    GNU Affero General Public License for more details.
0018  *
0019  *    You should have received a copy of the GNU Affero General Public License
0020  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 ?>
0023 <h3><?= $this->translate('COMMENTS') ?></h3>
0024 <?php
0025 if (count($this->comments) == 0) { ?>
0026     <div class="sidebar-empty">
0027         <?php echo "No comments yet";//echo $this->translate('product.no_comments'); ?>
0028     </div>
0029 <?php } else { ?>
0030     <div id="comments-carousel" class="sidebar-content carousel slide">
0031 
0032         <div class="comments carousel-inner">
0033             <?php echo $this->partialLoop('product/partials/comment.phtml', $this->comments); ?>
0034         </div>
0035         <div class="comment-carousel-controls <?php if (count($this->comments) <= 1) {
0036             echo 'disabled';
0037         } ?>">
0038             <a href="#comments-carousel" data-slide="prev">
0039                 <div class="comment-carousel-control left">&lsaquo;</div>
0040             </a>
0041             <a href="#comments-carousel" data-slide="next">
0042                 <div class="comment-carousel-control right">&rsaquo;</div>
0043             </a>
0044         </div>
0045 
0046     </div><!-- /.sidebar-content -->
0047     <?php $this->inlineScript()->appendScript("
0048        $(document).ready(function(){
0049             $('.carousel').each(function(){
0050                 $(this).carousel({
0051                     interval: false
0052                 });
0053             });
0054         });"); ?>
0055 
0056 <?php } ?>