Пример #1
0
                        <th class="col-xs-3">名称</th>
                                        <th class="col-xs-3">属性</th>
                        <th class="col-xs-1">价格</th>
                        <th class="col-xs-1">数量</th>
                        <th class="col-xs-1">小计</th>
                    </tr>
                    <?php 
foreach ($cartItems as $cartItem) {
    $sku = $cartItem->sku;
    $item = $sku->item;
    $price_true = $sku->price;
    if (isset($item)) {
        ?>
                            <tr>
                                <td> <?php 
        echo EasyThumbnailImage::thumbnailImg('@image/' . $item->getMainImage(), 50, 50);
        ?>
</td>
                                <td><?php 
        echo $item->title;
        ?>
</td>
                                <td><ul class="sc_product_info">

                                        <?php 
        foreach (\yii\helpers\Json::decode($sku->props_name) as $v) {
            echo '<li>' . $v . '</li>';
        }
        ?>

                                    </ul></td>
Пример #2
0
        <th>商品图片</th>
        <th>商品名称 &amp; 类别</th>
        <th>价格</th>
        <th>数量</th>
        <th>动作</th>
    </tr>
    </thead>
    <tbody>
    <?php 
    /** @var \star\catalog\models\Item $item */
    foreach ($items as $item) {
        ?>
    <tr>
        <!--product image-->
        <td data-title="Product Image"><?php 
        echo EasyThumbnailImage::thumbnailImg('@image/' . $item->getMainImage(), 90, 90, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['class' => "tr_all_hover"]);
        ?>
</td>
        <!--product name and category-->
        <td data-title="Product Name">
            <a href="<?php 
        echo Url::to(['/catalog/home/item/view', 'id' => $item->item_id]);
        ?>
" class="fw_medium d_inline_b f_size_ex_large color_dark m_bottom_5"><?php 
        echo $item->title;
        ?>
</a><br>
            <a href="<?php 
        echo Url::to(['/catalog/home/item/list', 'catalog' => $item->category->id]);
        ?>
" class="default_t_color"><?php 
Пример #3
0
    <div class="product_preview">

        <div class="owl_carousel" id="thumbnails">
            <?php 
foreach ($itemImages as $itemImage) {
    ?>
                <a href="#" data-image="<?php 
    echo Yii::$app->params['imageDomain'] . '/' . $itemImage->pic;
    ?>
" data-zoom-image="<?php 
    echo $link;
    ?>
/images/preview_zoom_1.jpg">
                    <?php 
    echo EasyThumbnailImage::thumbnailImg('@image/' . $itemImage->pic, 80, 80, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['data-large-image' => Yii::$app->params['imageDomain'] . '/' . $itemImage->pic]);
    ?>
                </a>
            <?php 
}
?>

        </div><!--/ .owl-carousel-->

    </div><!--/ .product_preview-->

    <!-- - - - - - - - - - - - - - End of prodcut thumbs carousel - - - - - - - - - - - - - - - - -->

    <!-- - - - - - - - - - - - - - Share - - - - - - - - - - - - - - - - -->

    <div class="v_centered">
Пример #4
0
/**
 * @var yii\web\View            $this
 * @var kartik\tree\models\Tree $node
 */
use yii\helpers\Html;
use himiklab\thumbnail\EasyThumbnailImage;
extract($params);
?>

<h2>
    <?php 
echo $node->name;
?>
</h2>

<?php 
if ($node->filename) {
    $img = EasyThumbnailImage::thumbnailImg(Yii::getAlias('@frontend/web/files') . '/' . $node->filename, 200, 200, EasyThumbnailImage::THUMBNAIL_INSET, ['alt' => $node->document]);
    /* Если это не картинка, распознаваемая imagine, то в папке thumbs
       ищем иконку, имя которой совпадает с расширением файла документа.
       Если такой иконки нет, подставляем пустую иконку */
    if (strpos($img, 'Error') !== false) {
        $thumbName = pathinfo($node->filename, PATHINFO_EXTENSION);
        $thumbDb = Yii::getAlias('@frontend/web/thumbs') . '/';
        $files = glob($thumbDb . $thumbName . '.*');
        $icon = count($files) == 0 ? '_page.png' : basename($files[0]);
        $icon = '@web/thumbs/' . $icon;
        $img = Html::img($icon, ['alt' => $node->document]);
    }
    echo Html::tag('p', Html::a($img, ['/student/portfolio/download', 'id' => $node->id, 'modelFile' => '\\common\\models\\StudentPortfolio']));
}
Пример #5
0
 public function renderItemsGrid()
 {
     $html = '';
     foreach ($this->items as $i => $item) {
         $html .= Html::beginTag('div', ['class' => 'item']) . "\n";
         $html .= Html::beginTag('div', ['class' => 'item-header']) . "\n";
         $html .= Html::beginTag('a', ['href' => $item['slug']]) . "\n";
         $html .= Html::beginTag('span', ['class' => 'item-header-category']) . "\n";
         $html .= Html::beginTag('i', ['class' => 'fa fa-folder-open']) . Html::endTag('i');
         $html .= Html::tag('span', $item['categoria']);
         $html .= Html::endTag('span');
         //$html .= Html::img('@web/imagenes/paginas/'.$item['imagen'], ['alt' => $item['titulo']]) . "\n";
         $html .= EasyThumbnailImage::thumbnailImg('@frontend/web/imagenes/paginas/' . $item['imagen'], 367, 232, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $item['titulo']]);
         $html .= Html::endTag('a');
         $html .= Html::endTag('div');
         //end item-header
         $html .= Html::beginTag('div', ['class' => 'item-content']) . "\n";
         $html .= Html::beginTag('div', ['class' => 'item-content-head']) . "\n";
         $html .= Html::beginTag('div', ['class' => 'item-content-date']) . "\n";
         $html .= Html::tag('strong', $item['dia']);
         $html .= Html::tag('span', $item['mes']);
         $html .= Html::tag('span', $item['anio']);
         $html .= Html::endTag('div');
         //end item-date
         $html .= Html::tag('h3', '<a href="' . $item['slug'] . '">' . $item['titulo'] . '</a>') . "\n";
         $html .= Html::endTag('div');
         //end item-head
         $html .= Html::tag('p', $item['leermas']) . "\n";
         $html .= Html::endTag('div');
         //end item-content
         $html .= Html::beginTag('div', ['class' => 'item-footer']) . "\n";
         $html .= Html::beginTag('button', ['class' => 'article-more-arrow right', 'text' => 'ers']) . "\n";
         $html .= Html::beginTag('i', ['class' => 'fa fa-caret-right']) . Html::endTag('i');
         $html .= Html::beginTag('i', ['class' => 'show-hover']) . 'Leer más' . Html::endTag('i');
         $html .= Html::endTag('button');
         $html .= Html::beginTag('div', ['class' => 'item-meta']) . "\n";
         if (isset($item['autor'])) {
             $html .= Html::beginTag('a', ['href' => $item['slug']]) . "\n";
             $html .= Html::beginTag('i', ['class' => 'fa fa-pencil']) . Html::endTag('i');
             $html .= Html::tag('span', $item['autor']);
             $html .= Html::endTag('a');
         }
         if (isset($item['comentarios'])) {
             $html .= Html::beginTag('a', ['href' => $item['slug']]) . "\n";
             $html .= Html::beginTag('i', ['class' => 'fa fa-comment']) . Html::endTag('i');
             $html .= Html::tag('span', 'Comentarios');
             $html .= Html::endTag('a');
         }
         $html .= Html::endTag('div');
         //end item-header
         $html .= Html::endTag('div');
         //end item-content
         $html .= Html::endTag('div');
     }
     return $html;
     /*
              * <div class="item">
                         <div class="item-header">
                             <a href="#">
                                 <span class="item-header-category"><i class="fa fa-folder-open"></i><span>Automotive</span></span>
                                 <img src="<?php echo $baseUrl; ?>/img/photos/image-32.jpg" alt="" />
                             </a>
                         </div>
                         <div class="item-content">
                             <div class="item-content-head">
                                 <div class="item-content-date">
                                     <strong>21</strong>
                                     <span>Oct</span>
                                     <span>2015</span>
                                 </div>
                                 <h3><a href="#">Sed vehicula justo ut sem auctor sagittis</a></h3>
                             </div>
                             <p>Vivamus auctor quam nec mauris commodo laoreet. Nam ut metus elementum, pharetra diam sed, rhoncus tortor. Sed vehicula justo ut sem auctor sagittis. Etiam quis</p>
                         </div>
                         <div class="item-footer">
                             <button class="article-more-arrow right"><i class="fa fa-caret-right"></i><i class="show-hover">Read more</i></button>
                             <div class="item-meta">
                                 <a href="#"><i class="fa fa-pencil"></i>John Doe</a>
                                 <a href="#"><i class="fa fa-comment"></i>16</a>
                             </div>
                         </div>
                     </div>*/
     /*$html .= Html::a(Html::tag('div',
           Html::tag('i', '', ['class' => 'fa fa-upload fa-fw']) . 'Server Rebooted' .
           Html::tag('span', '4 minutes ago', ['class' => 'pull-right text-muted small'])
       ), Url::to('address'));*/
 }
Пример #6
0
?>
                                    <?php 
echo $form->field($model, 'clave_hash', $inputOpciones)->passwordInput(['class' => $inputClase, 'autocomplete' => 'off']);
?>
                                    <?php 
echo $form->field($model, 'tipo')->radioList($model->tiposUsuarios(), $inputRadioListOpciones)->label($model->getAttributeLabel('tipo'), ['style' => 'margin-bottom: 10px;']);
?>


                                </div>
                                <div class="col-md-5">
                                    <!-- imagen avatar -->
                                    <div id="foto-usuario" class="fotozone">
                                        <div class="avatar-view" title="Change the avatar" style="border:1px solid;">
                                            <?php 
echo EasyThumbnailImage::thumbnailImg('@libreria/imagenes/usuarios/' . $model->foto, 220, 220, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $model->nombre, 'data-url' => $baseUrl . '/usuarios', 'class' => 'img-responsive']);
?>
                                        </div>

                                        <div class="dz-message">
                                            <h3>Arrastra tu foto aquí o <br>haz aquí click para buscarla.</h3>
                                            <em>(Dejar que te vean genera <strong>confianza</strong> y tiene 70% de aumento en tus ventas.)</em>
                                        </div>

                                        <?php 
echo Html::activeHiddenInput($model, 'imagen_nombre');
echo Html::activeHiddenInput($model, 'imagen_data');
//MODAL
echo $this->render('_modalFoto', ['model' => $model]);
?>
Пример #7
0
            <?php 
$cartItems = isset($cartItems[0]) ? $cartItems[0] : $cartItems;
foreach ($cartItems as $cartItem) {
    /**@var star\catalog\models\Item $item * */
    $sku = $cartItem->sku;
    $item = $sku->item;
    $itemImages = $item->itemImgs;
    ?>
            <tr>
                <!--Product name and image-->
                <td data-title="Product Image &amp; name" class="t_md_align_c">
                    <?php 
    $mainImage = isset($itemImages[0]) ? $itemImages[0]->pic : '';
    ?>
                    <?php 
    echo EasyThumbnailImage::thumbnailImg('@image/' . $mainImage, 110, 110, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $itemImages[0]->title, "class" => "m_md_bottom_5 d_xs_block d_xs_centered"]);
    ?>
                    <a href="#" class="d_inline_b m_left_5 color_dark"><?php 
    echo $item->title;
    ?>
</a>
                    <?php 
    echo Html::hiddenInput('Cart[' . $cartItem->sku_id . '][item_id]', $cartItem->sku_id);
    ?>
                    <?php 
    echo Html::hiddenInput('Cart[' . $cartItem->sku_id . '][name]', $item->title);
    ?>
                </td>
                <!--product key-->
                <td data-title="SKU"><?php 
    foreach (\yii\helpers\Json::decode($sku->props_name) as $v) {
Пример #8
0
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>



    <?php 
Pjax::begin();
?>

    <p>
        <?php 
echo Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Удалить', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>
<?php 
echo EasyThumbnailImage::thumbnailImg(Yii::$app->params['uploadPath'] . $model->preview, 300, 300, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => 'screen']);
?>
    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'name', 'date:datetime', 'created_at:datetime', 'updated_at:datetime', 'author.last_name']]);
?>

    <?php 
Pjax::end();
?>
</div>
Пример #9
0
 public function getFotoThumbr($width = 150, $height = 100)
 {
     return EasyThumbnailImage::thumbnailImg($this->getFotoAliasUrl(), $width, $height);
 }
Пример #10
0


<div class="ja-paginas-index mdl-cell mdl-cell--12-col mdl-grid">


    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Crear Paginas'), ['create'], ['class' => 'mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--colored']);
?>
    </p>



    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'mdl-data-table mdl-js-data-table mdl-shadow--2dp'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'imagen', 'format' => 'raw', 'value' => function ($data) {
    $url = '@frontend/web/imagenes/paginas/' . $data->imagen_cortada;
    //return Html::img($url,['alt'=>'yii', 'width'=>90]);
    return EasyThumbnailImage::thumbnailImg($url, 35, 20, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $data->titulo]);
}], ['attribute' => 'titulo', 'headerOptions' => ['class' => 'mdl-data-table__cell--non-numeric']], ['label' => Yii::t('app', 'Categoria'), 'attribute' => 'categorias.titulo', 'headerOptions' => ['class' => 'mdl-data-table__cell--non-numeric']], ['label' => 'Ver', 'format' => 'raw', 'value' => function ($data) {
    $url = "http://www.bsourcecode.com";
    return Html::a('Go Link', $url, ['title' => 'Go']);
}], 'fecha_creado', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
</div>
Пример #11
0
                    <div class="shopping_cart top_arrow tr_all_hover r_corners">
                        <div class="f_size_medium sc_header">最近添加的商品</div>
                        <ul class="products_list">
                            <?php 
$cartItems = $shoppingCartModel->cartItems;
foreach ($cartItems as $cartItem) {
    /**@var star\catalog\models\Item $item * */
    $sku = $cartItem->sku;
    $item = $sku->item;
    ?>
                                <li>
                                    <div class="clearfix">
    <!--                                    <!--product image-->
                                        <?php 
    echo EasyThumbnailImage::thumbnailImg('@image/' . $item->getMainImage(), 30, 30, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['class' => "f_left m_right_10"]);
    ?>
    <!--                                    <!--product description-->
                                        <div class="f_left product_description">
                                            <a href="<?php 
    echo Url::to(['/catalog/home/item/view', 'id' => $item->item_id]);
    ?>
" class="color_dark m_bottom_5 d_block"><?php 
    echo $item->title;
    ?>
</a>
                                        </div>
    <!--                                    <!--product price-->
                                        <div class="f_left f_size_medium">
                                            <div class="clearfix">
                                                <?php 
Пример #12
0
?>
</h1>

		<div class="thread-content">
			<?php 
echo $thread->content;
?>
		</div>

		<?php 
if ($thread->relatedItem !== null) {
    ?>
		<div class="thread-related-info">
			<h3>
				<?php 
    echo EasyThumbnailImage::thumbnailImg('@webroot' . $thread->relatedItem->image, 40, 40, EasyThumbnailImage::THUMBNAIL_OUTBOUND);
    ?>
				<?php 
    echo Html::a($thread->relatedItem->name, $thread->relatedItem->url, ['title' => $thread->relatedItem->name, 'target' => '_blank', 'data-pjax' => 0]);
    ?>
			</h3>

		</div>
		<?php 
}
?>

		<div class="thread-info">
			<div class="author-avatar">
				<?php 
echo $thread->userAvatar ? Html::img($thread->userAvatar, ['class' => 'small-avatar']) : Html::tag('i', '', ['class' => 'uk-icon-user small-avatar']);
Пример #13
0
    $answers = \app\models\ForumMessage::find()->where(['status' => 1, 'post_id' => $post->id, 'answer' => $message->id])->orderBy('id asc')->all();
    foreach ($answers as $answer) {
        $userNameAnswer = app\models\Users::findOne($answer->author)->login;
        ?>
        <div class="media answer" id='message-<?php 
        echo $answer->id;
        ?>
'>
          <div class="media-left">
            <!--<a href="#">-->
              <!--<img class="media-object" data-src="holder.js/64x64" alt="64x64" style="width: 64px; height: 64px;" src="/img/avatars/<?php 
        echo $answer->author;
        ?>
.jpg" data-holder-rendered="true">-->
            <?php 
        echo EasyThumbnailImage::thumbnailImg("img/avatars/{$answer->author}.png", 64, 64, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $userNameAnswer, 'class' => 'media-object']);
        ?>
              #<?php 
        echo $answer->id;
        ?>
            <!--</a>-->
            <?php 
        echo '[' . $ipData['country'] . ']' . $ipData['city'];
        ?>
            <?php 
        echo $userNameAnswer;
        ?>
[<?php 
        echo $answer->author;
        ?>
]
Пример #14
0
<?php

/**
*	@var $model Content
*/
use himiklab\thumbnail\EasyThumbnailImage;
?>
 <?php 
if ($model->image) {
    ?>
  	<?php 
    echo EasyThumbnailImage::thumbnailImg('@webroot' . $model->image->url, 1300, 200, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $model->title, 'class' => 'img-responsive']);
    ?>
 
<?php 
}
?>
 <div class="content-container">
<div class="container">
    <hr>
	<div class="row">
		<div class="col-sm-12 col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
			<?php 
echo $model->content;
?>
		</div>
	</div>

<hr>
</div>
</div>
Пример #15
0
        $item = $sku->item;
        $itemImages = $item->itemImgs;
        if ($sku && $item) {
            ?>
    <tr>

        <!-- - - - - - - - - - - - - - Product Image - - - - - - - - - - - - - - - - -->

        <td class="product_image_col" data-title="Product Image">

            <a href="#">
                <?php 
            $mainImage = isset($itemImages[0]) ? $itemImages[0]->pic : '';
            ?>
                <?php 
            echo EasyThumbnailImage::thumbnailImg('@image/' . $mainImage, 110, 110, EasyThumbnailImage::THUMBNAIL_OUTBOUND);
            ?>
               </a>
            <?php 
            echo Html::hiddenInput('Cart[' . $cartItem->sku_id . '][item_id]', $cartItem->sku_id);
            ?>
            <?php 
            echo Html::hiddenInput('Cart[' . $cartItem->sku_id . '][name]', $item->title);
            ?>
        </td>

        <!-- - - - - - - - - - - - - - End of product Image - - - - - - - - - - - - - - - - -->

        <!-- - - - - - - - - - - - - - Product name - - - - - - - - - - - - - - - - -->

        <td data-title="Product Name">
Пример #16
0
<?php

use yii\helpers\Html;
use yii\widgets\LinkPager;
use himiklab\thumbnail\EasyThumbnailImage;
$postCount = $model->getPosts()->count();
?>
<div class="thread-panel">
	<div class="uk-grid uk-grid-small">
		<div class="uk-width-medium-2-3">
			<?php 
if ($model->relatedItem !== null) {
    ?>
				<?php 
    echo Html::a(EasyThumbnailImage::thumbnailImg('@webroot' . $model->relatedItem->image, 40, 40, EasyThumbnailImage::THUMBNAIL_OUTBOUND), $model->relatedItem->url, ['title' => $model->relatedItem->name, 'target' => '_blank', 'class' => 'uk-float-right', 'data-pjax' => 0]);
    ?>
			<?php 
}
?>
			<h2><?php 
if ($model->flag) {
    ?>
<i class="uk-icon-star"></i> <?php 
}
echo $model->state == $model::STATE_DELETED ? '<em>DELETED: </em>' : '';
echo Html::a($model->name, $model->url, ['data' => ['pjax' => 0]]);
?>
</h2>
			<p class="meta">
				<?php 
echo Yii::t('forum', 'Author');
Пример #17
0
        </div>
        <!--carousel-->
        <div class="relative qv_carousel_wrap">
            <button class="button_type_11 bg_light_color_1 t_align_c f_size_ex_large bg_cs_hover r_corners d_inline_middle bg_tr tr_all_hover qv_btn_single_prev">
                <i class="fa fa-angle-left "></i>
            </button>
            <ul class="qv_carousel_single d_inline_middle">
                <?php 
foreach ($itemImages as $itemImage) {
    ?>
                    <a href="#" data-image="<?php 
    echo Yii::$app->params['imageDomain'] . '/' . $itemImage->pic;
    ?>
" data-zoom-image="images/preview_zoom_1.jpg">
                        <?php 
    echo EasyThumbnailImage::thumbnailImg('@image/' . $itemImage->pic, 110, 110, EasyThumbnailImage::THUMBNAIL_OUTBOUND);
    ?>
                       </a>
                <?php 
}
?>
            </ul>
            <button class="button_type_11 bg_light_color_1 t_align_c f_size_ex_large bg_cs_hover r_corners d_inline_middle bg_tr tr_all_hover qv_btn_single_next">
                <i class="fa fa-angle-right "></i>
            </button>
        </div>
    </div>
    <div class="p_top_10 t_xs_align_l">
        <!--description-->
        <h2 class="color_dark fw_medium m_bottom_10"><?php 
echo $itemModel->title;
Пример #18
0
 public static function responsiveImg($url, $width, $height, $alt = '')
 {
     return EasyThumbnailImage::thumbnailImg('@webroot' . $url, $width, $height, EasyThumbnailImage::THUMBNAIL_OUTBOUND, ['alt' => $alt, 'class' => 'img-responsive']);
 }