Esempio n. 1
0
 /**
  * @inheritdoc
  */
 protected function renderPageButtons()
 {
     $result = '';
     $sortParam = Yii::$app->request->getQueryParam('sort');
     $viewParam = Yii::$app->request->getQueryParam('view');
     $result .= Html::beginForm(Url::toRoute(['favorites/index', 'sort' => $sortParam, 'view' => $viewParam]), 'get');
     $input = Html::input('text', 'page', $this->pagination->getPage() + 1, ['class' => 'input-style']);
     $result .= Html::tag('div', "Page {$input} of {$this->pagination->pageCount}", ['class' => 'page-namber']);
     return $result .= Html::endForm();
 }
Esempio n. 2
0
 public function run()
 {
     if ($this->user->can(User::PERMISSION_WISH_LIST_ADD)) {
         $params = ['data-product-id' => $this->product->id, 'data-reload' => $this->reload ? 1 : $this->reload];
         if (Wishlist::find()->where(['product_id' => $this->product->id, 'user_id' => $this->user->id])->exists()) {
             echo Html::a('', '#', ArrayHelper::merge(['class' => 'catalog-bookmark active'], $params));
         } else {
             echo Html::a('', '#', ArrayHelper::merge(['class' => 'catalog-bookmark'], $params));
         }
     }
 }
Esempio n. 3
0
 /**
  * @inheritdoc
  */
 protected function renderPageButtons()
 {
     $prevButtonHtml = '';
     $nextButtonHtml = '';
     $pageCount = $this->pagination->getPageCount();
     if ($pageCount < 2 && $this->hideOnSinglePage) {
         return '';
     }
     $buttons = [];
     $currentPage = $this->pagination->getPage();
     // first page
     $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;
     if ($firstPageLabel !== false && $currentPage > 1) {
         $buttons[] = $this->renderPageButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false) . $this->firstPagePostfix;
     }
     // prev page
     if ($this->prevPageLabel !== false) {
         if (($page = $currentPage - 1) < 0) {
             $page = 0;
         }
         $prevButtonHtml = Html::a($this->prevPageLabel, $this->pagination->createUrl($page), ['class' => $this->prevPageCssClass]);
     }
     // internal pages
     list($beginPage, $endPage) = $this->getPageRange();
     for ($i = $beginPage; $i <= $endPage; ++$i) {
         $buttons[] = $this->renderPageButton($i + 1, $i, null, false, $i == $currentPage);
     }
     // next page
     if ($this->nextPageLabel !== false) {
         if (($page = $currentPage + 1) >= $pageCount - 1) {
             $page = $pageCount - 1;
         }
         $nextButtonHtml = Html::a($this->nextPageLabel, $this->pagination->createUrl($page), ['class' => $this->nextPageCssClass]);
     }
     // last page
     $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;
     if ($lastPageLabel !== false && $page + 1 !== $pageCount) {
         $buttons[] = $this->firstPagePostfix . $this->renderPageButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);
     }
     return $prevButtonHtml . Html::tag('ul', implode("\n", $buttons), $this->options) . $nextButtonHtml;
 }
Esempio n. 4
0
                                <span class="corusel-360"></span>
                            </a>
                        </div>
                    <?php 
    }
    ?>
                    <?php 
    foreach ($model->commonPhotos as $key => $photo) {
        ?>
                        <div class="corusel-item">
                            <a class="popup_open gallery-open" data-next="<?php 
        echo $key + 1;
        ?>
" rel="#popup-gallery">
                                <?php 
        echo Html::img($photo->getCommonPath(), ['style' => 'max-height: 110px']);
        ?>
                            </a>
                        </div>
                    <?php 
    }
    ?>
                </div>
            <?php 
}
?>
        </div>
        <div class="clearfix"></div>
    </div>
    <?php 
if ($properties = $model->getMappedProperties()) {
Esempio n. 5
0
            echo $nested->title;
            ?>
</a></li>
                                <?php 
        }
        ?>
                            </ul>
                        <a href="<?php 
        echo $category->getRoute();
        ?>
">All categories</a>
                    </span>
                    <span class="podmenu-column last">
                        <span class="podmenu-h">Popular categories</span>
                        <ul class="list-categori">
                            <?php 
        echo Html::getPopularCategories($category->getPopular());
        ?>
                        </ul>
                    </span>
                </span>
            <?php 
    }
    ?>
            </li>
        <?php 
}
?>
    </ul>
    <a href="" class="become_affiliate btn-gray">Become an affiliate</a>
</div>
Esempio n. 6
0
/* @var $this yii\web\View */
/* @var $products \common\models\Product[] */
/* @var $pagination \yii\data\Pagination */
/* @var $widget \frontend\widgets\ProductsList */
?>

<div class="catalog-list catalog-line">
    <?php 
foreach ($products as $product) {
    ?>
        <div class="catalog-line-item product">
            <div class="catalog-img"><a href="<?php 
    echo $product->getRoute();
    ?>
"><?php 
    echo Html::img($product->getMainImagePath());
    ?>
</a></div>
            <div class="catalog-line-txt">
                <?php 
    echo WishListIcon::widget(ArrayHelper::merge(['product' => $product], $widget->wishIconOptions));
    ?>
                <h3><a href="<?php 
    echo $product->getRoute();
    ?>
"><?php 
    echo $product->title;
    ?>
</a></h3>
                <p><?php 
    echo $product->getCatalogDescriptions();
<?php

use common\components\Html;
/* @var $this yii\web\View */
/* @var $products \common\models\Product[] */
/* @var $widget \frontend\widgets\ProductsList */
?>

<ul class="watched-list">
    <?php 
foreach ($products as $product) {
    ?>
        <li>
            <span class="watched-img"><?php 
    echo Html::a(Html::img($product->getMainImagePath()), $product->getRoute());
    ?>
</span>
            <span class="watched-cont">
                <a href="<?php 
    echo $product->getRoute();
    ?>
"><?php 
    echo $product->title;
    ?>
</a>
                <strong>€ 350.00</strong>
            </span>
        </li>
    <?php 
}
?>
Esempio n. 8
0
<?php

use common\components\Html;
/* @var $this yii\web\View */
/* @var $model \common\models\Product */
?>

<div id="popup-gallery" class="popup popup-gallery" style="display: none;">
    <a href="" class="popup-close"></a>
    <div class="gallery-button"><a href="" class="lSPrev"></a><a href="" class="lSNext"></a></div>
    <ul id="lightSlider">
        <?php 
foreach ($model->commonPhotos as $photo) {
    ?>
            <li data-thumb="<?php 
    echo $photo->getCommonPath();
    ?>
">
                <?php 
    echo Html::img($photo->getCommonPath());
    ?>
            </li>
        <?php 
}
?>
    </ul>
</div>
Esempio n. 9
0
<?php

use common\components\Html;
/* @var $this yii\web\View */
/* @var $model \common\models\Product */
?>
<div id="popup-360" class="popup popup-gallery" style="display: none;">
    <a href="" class="popup-360-close popup-close"></a>
    <div id="image_holder_x">
        <?php 
if ($model->get360MainPhotoPath()) {
    ?>
            <?php 
    echo Html::img($model->get360MainPhotoPath(), ['class' => 'reel', 'data-images' => $model->get360PhotoTemplate(), 'data-frames' => count($model->photos360), 'width' => 500, 'height' => 520]);
    ?>
        <?php 
}
?>
    </div>
</div>