Beispiel #1
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     $images = $this->model->{$this->attribute};
     $galleryItems = array_map(function ($value) {
         return ['url' => isset($value['url']) ? $value['url'] : '', 'src' => isset($value['url']) ? $value['url'] : '', 'options' => $value];
     }, $images);
     Gallery::widget();
     if ($this->hasModel()) {
         $replace['{input}'] = Html::activeTextInput($this->model, $this->attribute, $this->options);
     } else {
         $replace['{input}'] = Html::textInput($this->name, $this->value, $this->options);
     }
     $replace['{button}'] = Html::tag($this->buttonTag, $this->buttonName, $this->buttonOptions);
     echo strtr($this->template, $replace);
     AssetsCallBack::register($this->getView());
     if (!empty($this->multiple)) {
         $this->getView()->registerJs("ElFinderFileCallback.register(" . Json::encode($this->options['id']) . ", function(files, id){ var _f = []; for (var i in files) { _f.push(files[i].url); } \$('#' + id).val(_f.join(', ')); return true;}); \$(document).on('click','#" . $this->buttonOptions['id'] . "', function(){ElFinderFileCallback.openManager(" . Json::encode($this->_managerOptions) . ");});");
     } else {
         $this->getView()->registerJs("ElFinderFileCallback.register(" . Json::encode($this->options['id']) . ", function(file, id){ \$('#' + id).val(file.url); return true;}); \$(document).on('click', '#" . $this->buttonOptions['id'] . "', function(){ElFinderFileCallback.openManager(" . Json::encode($this->_managerOptions) . ");});");
     }
 }
Beispiel #2
0
                    <td><?php 
echo $model->staffName;
?>
</td>
                </tr>
                <tr>
                    <td><strong>รายละเอียดเพิ่มเติม</strong></td>
                    <td><?php 
echo $model->other;
?>
</td>
                </tr>
                <?php 
echo DetailView::widget(['model' => $model, 'template' => '<tr><th>{label}</th><td> {value}</td></tr>', 'attributes' => [['attribute' => 'docs', 'value' => $model->listDownloadFiles('docs'), 'format' => 'html']]]);
?>
                <tr>
                    <td><strong>รูปภาพที่เกี่ยวข้อง</strong></td>
                    <td>
                        <?php 
echo dosamigos\gallery\Gallery::widget(['items' => $model->getThumbnails($model->ref, $model->name)]);
?>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

    </div>

</div>
Beispiel #3
0
<?php

use kartik\helpers\Html;
use yii\widgets\DetailView;
use kartik\grid\GridView;
use yii\helpers\Url;
use yii\widgets\Pjax;
use yii\bootstrap\Modal;
use yii\bootstrap\ActiveForm;
use kartik\tabs\TabsX;
use yii\helpers\Json;
use yii\web\Response;
use yii\helpers\ArrayHelper;
use yii\web\Request;
use kartik\daterange\DateRangePicker;
use yii\db\ActiveRecord;
use yii\data\ArrayDataProvider;
use dosamigos\gallery\Gallery;
$gambarkosong = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQDxAPERIUFBUVFxcPFxQUFRAUFxMUFRUWFhYXFRUYHSggGBooGxQVITEhJSkrLi4uFx8zODMsNygtLisBCgoKBQUFDgUFDisZExkrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAMAAwAMBIgACEQEDEQH/xAAbAAEAAgMBAQAAAAAAAAAAAAAABQYBAgQDB//EAEAQAAIBAgMEBwQGCAcBAAAAAAABAgMRBAUhEjFRcQYTIkFhkdGBobHBMjNCUnKSFSM0U4PD8PEUQ2KywtLhFv/EABQBAQAAAAAAAAAAAAAAAAAAAAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwD6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADB2YXLpz1+iuL+SA5DanSlL6Kb5JsnsPltOO9bT8fQ7ErAV6GWVX9m3No9Vk9TjH3+hOgCDeT1OMff6HlPK6q7k+TRYQBVatGUfpRa5o0LaclfLqc+6z4x0AroO3E5ZOGq7S8N/kcIGQAAAAAAAAAAAAA2p03JqKV2xSpuTUYq7ZYsFg40lxb3sDwwWWRhrLtS9yJAAAAAAAAAAAAABxY3L41NVpLjx5naAKrXoyg9mSszQs2Kw0akbS9j4FdxFCVOWzL+6A8wAAAAAAAACRybDbUnN7o7vFgd+W4Pq43f0nv8ADwO0AAAAAAAAAAAAAAAAAAc2OwqqRt3rc/E6QBU5RabT3rQ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84b+hG3i/QCWq1FFXk7Ih8Zmrl2YaLj3vlwI+rVlN3k234moAAAAAAAAAAAAAAAAAAADBkAYPRVprdKXmzQAbuvP70vzM0YAAAAAAAAAAAAAAB//2Q==";
$startImg = '';
$endImg = '';
foreach ($model as $key => $value) {
    $startImg = $value['IMG_DECODE_START'] != '' ? $value['IMG_DECODE_START'] : $gambarkosong;
    $endImg = $value['IMG_DECODE_START'] != '' ? $value['IMG_DECODE_START'] : $gambarkosong;
    $items[] = ['src' => 'data:image/jpg;charset=utf-8;base64,' . $startImg, 'imageOptions' => ['width' => "120px", 'height' => "120px", 'padding-bottom' => '20px', 'class' => 'img-rounded'], 'options' => ['title' => 'IMAGE START-' . $value['CUST_NM']]];
    $items[] = ['src' => 'data:image/jpg;charset=utf-8;base64,' . $endImg, 'imageOptions' => ['width' => "120px", 'height' => "120px", 'padding-bottom' => '20px', 'class' => 'img-rounded'], 'options' => ['title' => 'IMAGE END-' . $value['CUST_NM']]];
}
/* 2 amigos two galerry author mix:wawan and ptr.nov ver 1.0*/
$viewItemImge = dosamigos\gallery\Gallery::widget(['items' => $items]);
echo Html::panel(['heading' => false, 'body' => $viewItemImge], Html::TYPE_INFO);
// 		],
// 	];
// 	$no=$no+1;
// }
if (count($attach_file) == 0) {
    for ($a = 0; $a < 2; $a++) {
        $items1[] = ['src' => '/upload/barang/df.jpg', 'imageOptions' => ['width' => "150px"]];
    }
} else {
    foreach ($attach_file as $key => $value) {
        # code...
        $items1[] = ['src' => 'data:image/pdf;base64,' . $value['ATTACH64'], 'imageOptions' => ['width' => "120px", 'height' => "120px", 'class' => 'img-rounded']];
    }
}
# code...
$itemHeaderAttach = Gallery::widget(['id' => 'headergalery', 'items' => $items1, 'showControls' => true]);
?>

 <?php 
/* array commentar */
$query = Commentberita::find()->with('profile')->where(['KD_BERITA' => $model->KD_BERITA])->orderBy(['CREATED_AT' => SORT_DESC])->all();
//$body = [];
$body1 = [];
$x = 0;
foreach ($query as $key => $value) {
    $emp_ID = $value->profile->EMP_ID;
    //   $condition = ['and',
    //   // ['ID_USER'=>$emp_ID],
    //   ['KD_BERITA'=> $model->KD_BERITA],
    //   // ['TYPE'=> 0],
    //   // ['CREATED_AT'=> $value->CREATED_AT],
Beispiel #5
0
            <div class="col-lg-8">
                Компания УНИКО является интернет-провайдером и оператором связи в Волгоградской области. На базе
                собственной волоконно-оптической и широкополосной беспроводной сети ЗАО НПП «УНИКО» предлагает
                интегрированные телекоммуникационные решения для разных категорий клиентов: предприятий среднего
                и малого бизнеса, крупных компаний, операторов связи, государственных и бюджетных организаций.
                <br />
                УНИКО предлагает индивидуальные решения с учетом отраслевой специфики для финансовых структур,
                торговых сетей, объектов коммерческой недвижимости и компаний многих других сфер бизнеса.
            </div>
            <div class="col-lg-4">
                <?php 
$items = [];
foreach (FileHelper::findFiles('img/license') as $file) {
    $items[] = ['url' => $file, 'src' => $th->thumbnailFileUrl($file, 100, 100, $th->inset), 'options' => array('title' => 'Лицензия')];
}
echo Gallery::widget(['renderTemplate' => false, 'items' => $items]);
?>
            </div>
        </div>
    </article>
</div>

<?php 
echo $this->render('/templates/image-gallery', ['galleryWidget' => $galleryWidget]);
?>

<div class="best-offers">
    <header>
        Наши лучшие предложения
    </header>
    <article>
Beispiel #6
0
<?php

use dosamigos\gallery\Gallery;
/* @var $this yii\web\View */
/* @var $model app\models\Model-with-picture */
?>
<div class="media-gallery">
<?php 
$pics = array();
foreach ($model->media as $picture) {
    $pics[] = ['url' => $picture->getFileUrl(), 'src' => $picture->getThumbnailUrl(), 'options' => array('title' => $picture->name)];
}
echo Gallery::widget(['items' => $pics]);
?>
</div>
<?php

use kartik\helpers\Html;
use kartik\grid\GridView;
use yii\helpers\Url;
use yii\widgets\Pjax;
use yii\bootstrap\Modal;
use yii\bootstrap\ActiveForm;
use kartik\tabs\TabsX;
use yii\helpers\Json;
use yii\web\Response;
use yii\helpers\ArrayHelper;
use yii\web\Request;
use kartik\daterange\DateRangePicker;
use yii\db\ActiveRecord;
use yii\data\ArrayDataProvider;
use dosamigos\gallery\Gallery;
$items = [];
foreach ($modelCustImg as $key => $value) {
    $items[] = ['src' => 'data:image/pdf;base64,' . $value['IMG_NM_BASE64'], 'imageOptions' => ['width' => "120px", 'height' => "120px", 'class' => 'img-rounded']];
}
$itemCustimge = Gallery::widget(['items' => $items]);
echo Html::panel(['heading' => "<i class='fa fa-info-circle fa-1x'></i> ATTACH FILE ", 'body' => $itemCustimge], Html::TYPE_INFO);
Beispiel #8
0
$this->params['breadcrumbs'][] = ['label' => $model->category->name, 'url' => ['catalog/category', 'category' => $model->category->slug]];
$this->params['breadcrumbs'][] = $model->name;
// Meta tags
$this->registerMetaTag(['name' => 'description', 'content' => $model->meta_description]);
$this->registerMetaTag(['name' => 'keywords', 'content' => $model->meta_keywords]);
// Gallery images
$galleryItems[] = ['src' => Yii::$app->urlManager->baseUrl . '/uploads/product/' . $model->id . '/main.jpg', 'options' => ['title' => $model->name]];
foreach (Image::findAll(['model_id' => $model->id]) as $image) {
    $galleryItems[] = ['src' => Yii::$app->urlManager->baseUrl . '/uploads/product/' . $model->id . '/' . $image->id . '.jpg', 'options' => ['title' => $model->name]];
}
?>

<div class="row">
    <div class="col-sm-6">
        <?php 
echo Gallery::widget(['items' => $galleryItems, 'id' => 'product-gallery-links']);
?>
    </div>

    <div class="col-sm-6">
        <h1 class="product-header">
            <?php 
echo $model->name;
?>
        </h1>

        <hr>

        <p class="product-description">
            <?php 
echo $model->description;
Beispiel #9
0
            <?php 
echo Html::img('/images/gal1.png', ['style' => ['margin-bottom' => '-40px', 'width' => '160px', 'opacity' => '0.4']]);
?>
            <h2 class="font-effect-emboss white" style="color: #535353;font-family: 'Francois One', sans-serif;font-size: 2.9em;">GALERIJA</h2>
        </div>
    <br />
    <hr style="opacity:0.4;margin-left:-10%;margin-top: 10px;width: 120%;"/>

    <div class="text-center">

        <?php 
$items = [['url' => '/images/1506465_854699581231868_7190615254346975100_b.jpg', 'src' => '/images/1506465_854699581231868_7190615254346975100_s.jpg'], ['url' => '/images/1551758_581230121955828_554232338_b.jpg', 'src' => '/images/1551758_581230121955828_554232338_s.jpg'], ['url' => '/images/10373990_710253025676525_5383635587420245061_b.jpg', 'src' => '/images/10373990_710253025676525_5383635587420245061_s.jpg'], ['url' => '/images/PhotoGrid_1440882948188_b.jpg', 'src' => '/images/PhotoGrid_1440882948188_s.jpg'], ['url' => '/images/11147026_844757888892704_1522621803670937972_b.jpg', 'src' => '/images/11147026_844757888892704_1522621803670937972_s.jpg'], ['url' => '/images/11229403_928015023900323_6115491732829456513_b.jpg', 'src' => '/images/11229403_928015023900323_6115491732829456513_s.jpg'], ['url' => '/images/sl5_b.jpg', 'src' => '/images/sl5_s.jpg'], ['url' => '/images/12003005_914109251957567_7924878785362156468_b.jpg', 'src' => '/images/12003005_914109251957567_7924878785362156468_s.jpg'], ['url' => '/images/12038240_920284341340058_7040671015848479926_b.jpg', 'src' => '/images/12038240_920284341340058_7040671015848479926_s.jpg'], ['url' => '/images/12039337_920284384673387_5213764633877121259_b.jpg', 'src' => '/images/12039337_920284384673387_5213764633877121259_s.jpg'], ['url' => '/images/PhotoGrid_1440880563946-001_b.jpg', 'src' => '/images/PhotoGrid_1440880563946-001_s.jpg'], ['url' => '/images/PhotoGrid_1440881024476_b.jpg', 'src' => '/images/PhotoGrid_1440881024476_s.jpg'], ['url' => '/images/PhotoGrid_1440881237484_b.jpg', 'src' => '/images/PhotoGrid_1440881237484_s.jpg'], ['url' => '/images/PhotoGrid_1440881305750_b.jpg', 'src' => '/images/PhotoGrid_1440881305750_s.jpg'], ['url' => '/images/PhotoGrid_1440882635937_b.jpg', 'src' => '/images/PhotoGrid_1440882635937_s.jpg'], ['url' => '/images/PhotoGrid_1440882921687_b.jpg', 'src' => '/images/PhotoGrid_1440882921687_s.jpg'], ['url' => '/images/sl4_b.jpg', 'src' => '/images/sl4_s.jpg'], ['url' => '/images/sl3_b.jpg', 'src' => '/images/sl3_s.jpg'], ['url' => '/images/sl2_b.jpg', 'src' => '/images/sl2_s.jpg']];
?>

        <?php 
echo Gallery::widget(['items' => $items]);
?>

    </div>

    <hr style="opacity:0.4;margin-top: 10px;"/>

    <div class="text-center tribal">

        <?php 
echo Html::img('/images/tribal-dole.png');
?>

    </div>
    <div class="buttons">
        <div class="text-center">
Beispiel #10
0
<?php

use yii\imagine\Image;
use dosamigos\gallery\Gallery;
$galleryArray = json_decode($widget->galleryItems);
if ($galleryArray) {
    echo '<h3>' . $widget->title . '</h3>';
    $items = '';
    foreach ($galleryArray as $image) {
        $items[] = ['url' => $widget->previewUrl . '/' . $image, 'src' => $widget->previewUrl . '/thumbs/' . $image, 'imageOptions' => ['style' => ['max-width' => '200px', 'max-height' => '150px']], 'options' => ['title' => $image, 'style' => 'width:200px', 'class' => 'inline-block']];
    }
    ?>
    <div>
        <?php 
    echo Gallery::widget(['items' => $items, 'options' => ['id' => 'gallery-widget1-' . $widget->id], 'templateOptions' => ['id' => 'blueimp-gallery1-' . $widget->id], 'clientOptions' => ['container' => '#blueimp-gallery1-' . $widget->id]]);
    ?>
    </div>
    <?php 
}