当前位置: 首页>>代码示例>>PHP>>正文


PHP Html::img方法代码示例

本文整理汇总了PHP中kartik\helpers\Html::img方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::img方法的具体用法?PHP Html::img怎么用?PHP Html::img使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kartik\helpers\Html的用法示例。


在下文中一共展示了Html::img方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     echo Html::activeHiddenInput($this->model, $this->attribute, $this->options);
     echo Html::error($this->model, $this->attribute, $this->options);
     $id = Html::getInputId($this->model, $this->attribute);
     echo FileInput::widget(['name' => 'file', 'options' => ['accept' => 'image/*', 'multiple' => false], 'pluginEvents' => ['fileuploaded' => 'function(event, data, previewId, index) {
                 $("#' . $id . '").val(data.response.url);
             }'], 'pluginOptions' => ['initialPreview' => $this->model->{$this->attribute} ? [Html::img($this->model->{$this->attribute}, ['class' => 'file-preview-image'])] : false, 'maxFileCount' => 1, 'minFileCount' => 1, 'previewFileType' => 'image', 'multiple' => false, 'showPreview' => true, 'showUploadedThumbs' => false, 'uploadUrl' => \yii\helpers\Url::to(['/system/image/upload'])]]);
     parent::init();
 }
开发者ID:oyoy8629,项目名称:yii-core,代码行数:10,代码来源:VipFileInput.php

示例2: run

    public function run()
    {
        if ($imageUrl = $this->model->getFileUrl($this->attribute)) {
            ?>
            <div class="file-input">
                <div class="file-preview">
                    <div class="file-preview-thumbnails">
                        <div class="file-preview-frame">
                            <?php 
            echo Html::img($imageUrl, ['class' => 'file-preview-image', 'alt' => \Yii::t('gromver.platform', 'File not found.')]);
            ?>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        <?php 
        }
        if ($imageUrl == null) {
            // to show FileInput only for new upload
            echo KartikFileInput::widget(['model' => $this->model, 'attribute' => $this->attribute, 'options' => $this->options, 'pluginOptions' => $this->pluginOptions]);
        } else {
            FileInputAsset::register($this->getView());
            ?>
            <div class="file-input">
                <div class="input-group">
                    <div class="form-control file-caption ">
                        <span class="glyphicon glyphicon-file"></span> <span class="file-caption-name"><?php 
            echo $this->model->getFileName($this->attribute);
            ?>
</span>
                    </div>
                    <div class="input-group-btn">
                        <?php 
            echo Html::a('Remove Image', [$this->deleteAction, 'pk' => $this->model->getPrimaryKey(), 'attribute' => $this->attribute], ['class' => 'btn btn-danger', 'data-method' => 'post']);
            ?>
                    </div>
                </div>

            </div>
        <?php 
        }
    }
开发者ID:gromver,项目名称:yii2-platform,代码行数:43,代码来源:FileInput.php

示例3:

/* @var $attach_image */
$images = $model->getAttachFiles('image', 150, 150);
?>

<?php 
$this->beginBlock('title');
echo Yii::$app->user->can(AdminRbac::PERMISSION_ADMIN_PANEL) ? Html::a('<i class="material-icons">mode_edit</i>', ['/admin/posts/default/update', 'id' => $model->id]) : false;
echo Html::encode($model->title);
$this->endBlock();
?>

<div class="container">
    <div class="field-body">
        <?php 
foreach ($images as $image) {
    echo Html::img($image->url, ['alt' => $image->filename, 'width' => $image->width, 'height' => $image->height]);
}
?>
        <?php 
echo $model->body;
?>
    </div>
    <div class="flipper row">
        <div class="col-md-6">
            <?php 
echo $prev->slug ? Html::a('<i class="material-icons">chevron_left</i> ' . $prev->title, ['view', 'slug' => $prev->slug], ['class' => 'prev text-left']) : false;
?>
        </div>
        <div class="col-md-6">
            <?php 
echo $next->slug ? Html::a($next->title . '<i class="material-icons">chevron_right</i> ', ['view', 'slug' => $next->slug], ['class' => 'next text-right']) : false;
开发者ID:promo-pr,项目名称:cms,代码行数:31,代码来源:view.php

示例4: function

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;
/*[4] GRID VIEW IMAGE SHOW */
$visitImage = GridView::widget(['id' => 'img-list', 'rowOptions' => function ($model, $key, $index, $grid) {
    return ['id' => $model['ID'], 'onclick' => '						
						$(document).ready(function(){
							var mtgl="' . $model["TGL"] . '";
							var muser_id="' . $model["USER_ID"] . '";
							//alert(user_id);
								$.fn.modal.Constructor.prototype.enforceFocus = function(){};
								// e.preventDefault(); 		
								$("#modal-view").modal("show")
								.find("#modalContent")
								.load("/mastercrm/review-visit/disply-image?tgl=' . $model["TGL"] . '&user_id=' . $model["USER_ID"] . '");
						}); 			
					'];
}, 'dataProvider' => $dataProviderHeader2, 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(249,215,100,1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'IMG_DECODE_START', 'format' => 'raw', 'label' => 'Image Start', 'value' => function ($model) {
    $base64 = 'data:image/jpg;charset=utf-8;base64,' . $model['IMG_DECODE_START'];
    return $model['IMG_DECODE_START'] != '' ? Html::img($base64, ['width' => '120', 'height' => '120']) : Html::img($model['noImage'], ['width' => '120', 'height' => '120']);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(74, 206, 231, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'IMG_DECODE_END', 'format' => 'raw', 'label' => 'Image End', 'value' => function ($model) {
    $base64 = 'data:image/jpg;charset=utf-8;base64,' . $model['IMG_DECODE_END'];
    return $model['IMG_DECODE_END'] != '' ? Html::img($base64, ['width' => '120', 'height' => '120']) : Html::img($model['noImage'], ['width' => '120', 'height' => '120']);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(74, 206, 231, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]], 'toolbar' => [''], 'panel' => ['heading' => "<i class='fa fa-file-image-o fa-1x'></i> LIST IMAGES", 'type' => 'danger', 'footer' => false]]);
echo $visitImage;
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_expand1Image.php

示例5:

?>
            </div>
        </div>
   
        <div class="col-sm-6">

            <div class="fotorama"
                data-width="100%"
                data-ratio="800/600"                
                >
                <?php 
$widget = Widget::begin(['version' => '4.5.2', 'options' => ['nav' => 'thumbs', 'autoplay' => 'true', 'transition' => 'crossfade']]);
echo Html::img(Yii::getAlias('@web') . '/images/museo02.jpg');
echo Html::img(Yii::getAlias('@web') . '/images/museo03.jpg');
echo Html::img(Yii::getAlias('@web') . '/images/museo04.jpg');
echo Html::img(Yii::getAlias('@web') . '/images/museo05.jpg');
$widget->end();
?>
            </div>

            <!--<p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>-->
        </div>
    </div>

    <div class="body-content">

<!--        <div class="row">
            <div class="col-lg-4">
                <h2>Heading</h2>

                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
开发者ID:DiegoRodriguezTandil,项目名称:MoisesVille,代码行数:31,代码来源:index.php

示例6: function

}
/*GRIDVIEW ARRAY ACTION*/
$attDinamikNotulen[] = ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}', 'dropdownOptions' => ['class' => 'pull-right dropdown', 'style' => ['disable' => true]], 'dropdownButton' => ['class' => $actionClass, 'label' => $actionLabel], 'buttons' => ['view' => function ($url, $model, $key) {
    return '<li>' . Html::a('<span class="fa fa-eye"></span>' . Yii::t('app', 'View'), ['/widget/notulen/view', 'id' => $model->id], ['id' => 'notulen-id']) . '</li>' . PHP_EOL;
}], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(159, 221, 66, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]];
/*SET  GRID VIEW LIST EVENT*/
$gvNutulen = GridView::widget(['dataProvider' => $dataProvider, 'filterRowOptions' => ['style' => 'background-color:rgba(255, 221, 66, 1); align:center'], 'columns' => $attDinamikNotulen, 'floatOverflowContainer' => true, 'floatHeader' => true, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'absen-rekap']], 'panel' => ['heading' => "<span class='fa fa-edit'><b> LIST NOTULEN</b></span>", 'type' => 'info', 'showFooter' => false], 'toolbar' => [], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => true]);
?>
<div id='body-notulen'>
<!--<div class="fold">-->
	<!-- Tema  -->
	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
		<div class="row" style="margin-top:35px;margin-left:1px;margin-right:10px;">
			<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
				<?php 
echo Html::img('http://lukisongroup.com/img_setting/kop/lukison.png', ['class' => 'pnjg', 'style' => 'width:100px;height:70px;']);
?>
			</div>
			<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 text-center">
				<!-- <h5 class="text-left"><b>FORM PERMINTAAN BARANG & JASA</b></h5> !-->
				<h4 class="text-center" style="padding-top:30px"><b>NOTULEN RAPAT</b></h4>
			</div>
			
			<div class="col-xs-3 col-sm-3 col-md-2 col-lg-2 text-left" >
				<div class="hidden-xs">
					<!-- <b class="text-right"> echo btnTanggal($model) ?></b> -->
					<nav class="menu" style="padding-top:100px;">
						<input type="checkbox" href="#" class="menu-open" name="menu-open" id="menu-open" />
						<label class="menu-open-button" for="menu-open"> <span class="lines line-1"></span> <span class="lines line-2"></span> <span class="lines line-3"></span> </label>
						<a href="#" class="menu-item item-1"> <i class="fa fa-anchor"></i> </a> 
						<a href="#" class="menu-item item-2"> <i class="fa fa-coffee"></i> </a> 
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:view_1.php

示例7: ucwords

use yii\data\ArrayDataProvider;
use lukisongroup\master\models\Customers;
use lukisongroup\master\models\Termcustomers;
use lukisongroup\master\models\Distributor;
use lukisongroup\hrd\models\Corp;
//print_r($model[0]);
//echo $model[0]->NmDis;
?>
<div class="content" >
	<!-- HEADER !-->
	<div  class="row">
		<!-- HEADER !-->
		<div class="col-md-12">
			<div class="col-md-1" style="float:left;">
				<?php 
echo Html::img('@web/upload/lukison.png', ['class' => 'pnjg', 'style' => 'width:100px;height:70px;']);
?>
			</div>
			<div class="col-md-9" style="padding-top:15px;">
				<h3 class="text-center"><b> <?php 
echo 'TERM - ' . ucwords($model[0]->NmCustomer);
?>
 </b></h3>
			</div>
			<div class="col-md-12">
				<hr style="height:10px;margin-top: 1px; margin-bottom: 1px;color:#94cdf0">
			</div>

		</div>
	</div>
开发者ID:adem-team,项目名称:advanced,代码行数:30,代码来源:_reviewChart.php

示例8: function

Modal::begin(['id' => 'po-auth1-sign', 'header' => '<div style="float:left;margin-right:10px">' . Html::img('@web/img_setting/login/login1.png', ['class' => 'pnjg', 'style' => 'width:100px;height:70px;']) . '</div><div style="margin-top:10px;"><h4><b>Signature Authorize</b></h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color:rgba(230, 251, 225, 1)']]);
Modal::end();
/*
 * JS AUTH2 | CHECKED
 * @author ptrnov <piter@lukison.com>
 * @since 1.2
 */
$this->registerJs("\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\n\t\t\t\$('#po-auth2-sign').on('show.bs.modal', function (event) {\n\t\t\t\tvar button = \$(event.relatedTarget)\n\t\t\t\tvar modal = \$(this)\n\t\t\t\tvar title = button.data('title')\n\t\t\t\tvar href = button.attr('href')\n\t\t\t\tmodal.find('.modal-title').html(title)\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\n\t\t\t\t\$.post(href)\n\t\t\t\t\t.done(function( data ) {\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\n\t\t\t\t\t});\n\t\t\t\t}),\n\t", $this::POS_READY);
Modal::begin(['id' => 'po-auth2-sign', 'header' => '<div style="float:left;margin-right:10px">' . Html::img('@web/img_setting/login/login1.png', ['class' => 'pnjg', 'style' => 'width:100px;height:70px;']) . '</div><div style="margin-top:10px;"><h4><b>Signature Authorize</b></h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color:rgba(230, 251, 225, 1)']]);
Modal::end();
/*
 * JS AUTH3 | APPROVED
 * @author ptrnov <piter@lukison.com>
 * @since 1.2
 */
$this->registerJs("\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\n\t\t\t\$('#po-auth3-sign').on('show.bs.modal', function (event) {\n\t\t\t\tvar button = \$(event.relatedTarget)\n\t\t\t\tvar modal = \$(this)\n\t\t\t\tvar title = button.data('title')\n\t\t\t\tvar href = button.attr('href')\n\t\t\t\tmodal.find('.modal-title').html(title)\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\n\t\t\t\t\$.post(href)\n\t\t\t\t\t.done(function( data ) {\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\n\t\t\t\t\t});\n\t\t\t\t}),\n\t", $this::POS_READY);
Modal::begin(['id' => 'po-auth3-sign', 'header' => '<div style="float:left;margin-right:10px">' . Html::img('@web/img_setting/login/login1.png', ['class' => 'pnjg', 'style' => 'width:100px;height:70px;']) . '</div><div style="margin-top:10px;"><h4><b>Signature Authorize</b></h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color:rgba(230, 251, 225, 1)']]);
Modal::end();
/*
 * Button Modal Confirm PERMISION DENAID
 * @author ptrnov [piter@lukison]
 * @since 1.2
 */
$this->registerJs("\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\n\t\t\t\$('#confirm-permission-alert').on('show.bs.modal', function (event) {\n\t\t\t\t//var button = \$(event.relatedTarget)\n\t\t\t\t//var modal = \$(this)\n\t\t\t\t//var title = button.data('title')\n\t\t\t\t//var href = button.attr('href')\n\t\t\t\t//modal.find('.modal-title').html(title)\n\t\t\t\t//modal.find('.modal-body').html('')\n\t\t\t\t/* \$.post(href)\n\t\t\t\t\t.done(function( data ) {\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\n\t\t\t\t\t}); */\n\t\t\t\t}),\n\t", $this::POS_READY);
Modal::begin(['id' => 'confirm-permission-alert', 'header' => '<div style="float:left;margin-right:10px">' . Html::img('@web/img_setting/warning/denied.png', ['class' => 'pnjg', 'style' => 'width:40px;height:40px;']) . '</div><div style="margin-top:10px;"><h4><b>Permmission Confirm !</b></h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color:rgba(142, 202, 223, 0.9)']]);
echo "<div>You do not have permission for this module.\n\t\t\t\t<dl>\n\t\t\t\t\t<dt>Contact : itdept@lukison.com</dt>\n\t\t\t\t</dl>\n\t\t\t</div>";
Modal::end();
/*
 * Action PO Detail
 */
$this->registerJs("\n\t\t\$(document).on('click', '[data-toggle-approved]', function(e){\n\t\t\te.preventDefault();\n\t\t\tvar idx = \$(this).data('toggle-approved');\n\t\t\t\$.ajax({\n\t\t\t\t\turl: '/purchasing/purchase-order/approved_podetail',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t//contentType: 'application/json; charset=utf-8',\n\t\t\t\t\tdata:'id='+idx,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(result) {\n\t\t\t\t\t\tif (result == 1){\n\t\t\t\t\t\t\t// Success\n\t\t\t\t\t\t\t\$.pjax.reload({container:'#gv-po-detail'});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Fail\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t});\n\t\t\$(document).on('click', '[data-toggle-reject]', function(e){\n\t\t\te.preventDefault();\n\t\t\tvar idx = \$(this).data('toggle-reject');\n\t\t\t\$.ajax({\n\t\t\t\t\turl: '/purchasing/purchase-order/reject_podetail',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t//contentType: 'application/json; charset=utf-8',\n\t\t\t\t\tdata:'id='+idx,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(result) {\n\t\t\t\t\t\tif (result == 1){\n\t\t\t\t\t\t\t\$.pjax.reload({container:'#gv-po-detail'});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t});\n\t\t\$(document).on('click', '[data-toggle-delete]', function(e){\n\t\t\te.preventDefault();\n\t\t\tvar idx = \$(this).data('toggle-delete');\n\t\t\t\$.ajax({\n\t\t\t\t\turl: '/purchasing/purchase-order/delete_podetail',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t//contentType: 'application/json; charset=utf-8',\n\t\t\t\t\tdata:'id='+idx,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(result) {\n\t\t\t\t\t\tif (result == 1){\n\t\t\t\t\t\t\t\$.pjax.reload({container:'#gv-po-detail'});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t});\n\n\t\t\$(document).on('click', '[data-toggle-cancel]', function(e){\n\t\t\te.preventDefault();\n\t\t\tvar idx = \$(this).data('toggle-cancel');\n\t\t\t\$.ajax({\n\t\t\t\t\turl: '/purchasing/purchase-order/cancel_podetail',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t//contentType: 'application/json; charset=utf-8',\n\t\t\t\t\tdata:'id='+idx,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: function(result) {\n\t\t\t\t\t\tif (result == 1){\n\t\t\t\t\t\t\t\$.pjax.reload({container:'#gv-po-detail'});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t});\n\n\t", $this::POS_READY);
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_buat_poa.php

示例9:

echo Yii::$app->charset;
?>
"/>
    <title><?php 
echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body class="y2u-padding">
    <div class="y2u-container">
        <div class="text-center">
            <?php 
echo Html::img($asset->baseUrl . '/img/communityii.png', ['class' => 'y2u-logo']) . Module::PROJECT_PAGE;
?>
        </div>
        <?php 
echo AlertBlock::widget(['delay' => 0]);
?>
        <?php 
$this->beginBody();
?>
        <?php 
echo $content;
?>
        <?php 
$this->endBody();
?>
    </div>
开发者ID:imagis,项目名称:yii2-user,代码行数:31,代码来源:install.php

示例10:

<?php

/**
 * @var $images \app\modules\image\models\Image[]
 * @var $this \yii\web\View
 * @var $thumbnailOnDemand boolean
 * @var $thumbnailWidth integer
 * @var $thumbnailHeight integer
 */
use app\modules\image\models\Image;
use kartik\helpers\Html;
use yii\helpers\Url;
foreach ($images as $image) {
    $image_src = $image->file;
    if ($thumbnailOnDemand === true) {
        $image_src = $image->getThumbnail("{$thumbnailWidth}x{$thumbnailHeight}", $useWatermark);
    }
    echo Html::tag('div', Html::img($image_src, ['alt' => $image->image_description, 'itemprop' => "contentUrl"]), ['itemscope' => '', 'itemtype' => 'http://schema.org/ImageObject']);
}
开发者ID:heartshare,项目名称:dotplant2,代码行数:19,代码来源:img.php

示例11: function

<div class="seasons-update">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo $this->render('_form', ['model' => $model]);
$gridId = 'teams';
echo $this->render('_grid', ['model' => $model, 'dataProvider' => $dataProvider['teams'], 'filterModel' => $searchModel['teams'], 'gridOptions' => ['id' => $gridId, 'panel' => ['heading' => '<h4>Все команды</h4>', 'after' => Html::button(Html::icon('plus') . ' Добавить Команды в Сезон', ['class' => 'btn btn-success perform-action', 'data-season' => $model->id, 'data-grid-id' => $gridId])], 'columns' => [['class' => 'kartik\\grid\\CheckboxColumn'], ['label' => 'Логотип', 'format' => 'raw', 'value' => function ($data) {
    $images = $data->getImages();
    if ($images[0]['urlAlias'] != 'placeHolder' && $images[0]->isMain) {
        $image = $data->getImage();
        $sizes = $image->getSizesWhen('x25');
        return Html::img($image->getUrl('x25'), ['alt' => 'yii2 - картинка в gridview', 'class' => 'img-responsive', 'width' => $sizes['width'], 'height' => $sizes['height']]);
    }
}], 'name', ['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model) {
    $url = Url::to(['teams/' . $action, 'id' => $model->id]);
    return $url;
}, 'template' => '{view} {update}']]]]);
$gridId = 'sub-teams';
echo $this->render('_grid', ['model' => $model, 'dataProvider' => $dataProvider['seasonTeams'], 'gridOptions' => ['id' => $gridId, 'panel' => ['heading' => '<h4>Команды Сезона ' . $model->name . '</h4>', 'after' => false], 'columns' => [['attribute' => 'team.name', 'label' => 'Имя'], 'games', 'wins', 'draws', 'lesions', 'spectacles', 'goals_against', 'goals_scored', ['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model) {
    $url = Url::to(['season-details/' . $action, 'id' => $model->id]);
    return $url;
}, 'template' => '{update}{delete-pjax}', 'buttons' => ['delete-pjax' => function ($url, $model) {
    return ' ' . Html::a('<span class="glyphicon glyphicon-trash"></span>', false, ['onclick' => 'deletePlayer(' . $model->id . ',\'/admin/season-details/delete-pjax\')', 'style' => 'cursor:pointer', 'title' => 'Удалить', 'data-pjax' => 1]);
}]]]]]);
//    $form = ActiveForm::begin();
//    echo TabularForm::widget([
//        'dataProvider'=>$dataProvider['seasonTeams'],
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:update.php

示例12: function

    return $nilai;
}, 'contentOptions' => ['style' => ['text-align' => 'right', 'padding-right' => '20px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(255, 255, 155, 0.3)', 'border' => '0px']]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-chat-grp']], 'summary' => false, 'toolbar' => false, 'panel' => false, 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => false, 'striped' => false]);
/* USER */
$ChatUserInfo = $this->render('_chat_user_info');
$gv_ChatUser = GridView::widget(['id' => 'gv-chat-user', 'dataProvider' => $dataProviderUser, 'filterRowOptions' => ['style' => 'background-color:rgba(126, 189, 188, 0.3); align:center'], 'rowOptions' => function ($model, $key, $index, $grid) {
    return ['id' => $model->EMP_ID, 'onclick' => '
                var user = "user";
                  $.pjax.reload({
            				url: "' . Url::to(['/widget/chat/index']) . '?ChatSearch[GROUP]="+this.id+"&&chat="+user,
            				container: "#chat-msg",
            				timeout: 1000,
        			});'];
}, 'columns' => [['attribute' => 'x', 'format' => 'raw', 'label' => '', 'value' => function ($model) {
    $cari_employechat_image = Employe::find()->where(['EMP_ID' => $model->EMP_ID])->one();
    $baseimage_64 = $cari_employechat_image->IMG_BASE64 != '' ? 'data:image/jpg;charset=utf-8;base64,' . $cari_employechat_image->IMG_BASE64 : '/img_setting/noimage/df.jpg';
    return Html::img($baseimage_64, ['class' => 'contacts-list-img']);
}, 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'border' => '0px', 'background-color' => 'rgba(255, 255, 155, 0.3)']]], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}', 'header' => false, 'buttons' => ['view' => function ($url, $model, $key) {
    $name = $model->username;
    $icon = '<span class="glyphicon glyphicon-user"></span>';
    //return Html::a($icon.''.$name,
    // return Html::a($name,
    // 	['createajax','id'=>$model->id],
    // 	[
    // 	'data-toggle'=>"modal",
    // 	'data-target'=>"#modal-bumum",
    // 	//data-title'=> $model->username,
    // 	]
    // );
    return $name;
}], 'contentOptions' => ['style' => ['text-align' => 'left', 'font-family' => 'tahoma', 'font-size' => '8pt', 'border' => '0px', 'background-color' => 'rgba(255, 255, 155, 0.3)']]], ['label' => '', 'attribute' => 'x', 'format' => 'raw', 'value' => function ($model) {
    if ($model->ONLINE == 1) {
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:index_ver1.php

示例13:

                    echo Html::img($image->getUrl('30x'), ['alt' => $item->home->name, 'class' => 'hidden-sm']);
                }
                ?>
                                            </div>
                                            <div class="col-xs-2 text-center promo-game-score vcenter">
                                                <div><?php 
                echo $item->score;
                ?>
</div>
                                            </div>
                                            <div class="col-xs-5 text-left promo-game-team vcenter">
                                                <?php 
                $image = $item->guest->getImage();
                if ($image['urlAlias'] != 'placeHolder') {
                    //                                                    $sizes = $image->getSizesWhen('x45');
                    echo Html::img($image->getUrl('30x'), ['alt' => $item->guest->name, 'class' => 'hidden-sm']);
                }
                ?>
                                                <span>
                                                    <?php 
                echo $item->guest->name == Yii::$app->params['main-team'] ? '<b>' : '';
                echo $item->guest->name;
                echo $item->guest->name == Yii::$app->params['main-team'] ? '</b>' : '';
                ?>
                                                </span>
                                            </div>
                                        </div>
                                    </a>
                                    <div class="promo-photo-video-ticket text-center">
                                        <?php 
                //                                        var_dump($item);
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:index.php

示例14: array

use kartik\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\Model-with-picture */
$delete_picture = Yii::t('igolf', 'Remove picture');
$items = array();
if (method_exists($model, 'shareMedia')) {
    foreach ($model->shareMedia()->each() as $sharer) {
        foreach ($sharer->media as $picture) {
            $items[] = Html::img($picture->getFileUrl(), ['class' => 'file-preview-image', 'alt' => $picture->name, 'title' => $picture->name]) . '<br><i class="glyphicon glyphicon-trash remove-action pull-right" data-id="' . $picture->id . '" title="' . $delete_picture . '"></i>';
        }
    }
} else {
    foreach ($model->media as $picture) {
        $items[] = Html::img($picture->getFileUrl(), ['class' => 'file-preview-image', 'alt' => $picture->name, 'title' => $picture->name]) . '<br><i class="glyphicon glyphicon-trash remove-action pull-right" data-id="' . $picture->id . '" title="' . $delete_picture . '"></i>';
    }
}
?>
<div class="media-add">
	
	<?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data'], 'id' => 'media-input-form']);
?>

	<?php 
echo Html::panel(['heading' => Html::tag('h4', Yii::t('igolf', 'Pictures')), 'body' => $form->field($model, 'media[]')->widget(FileInput::classname(), ['options' => ['accept' => 'image/jpeg, image/png, image/gif', 'multiple' => true], 'pluginOptions' => ['initialPreview' => $items, 'initialCaption' => Yii::t('igolf', 'Select pictures with Browse... then press Upload.'), 'overwriteInitial' => false]])->label('')]);
?>

	<?php 
ActiveForm::end();
开发者ID:kleitz,项目名称:golfleague,代码行数:31,代码来源:_add.php

示例15: function

<?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;
/*[4] GRID VIEW IMAGE SHOW */
$visitImage = GridView::widget(['id' => 'img-list', 'dataProvider' => $dataProviderHeader2, 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(249,215,100,1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'image_start', 'format' => 'raw', 'label' => 'Image Start', 'value' => function ($model) {
    $base64 = 'data:image/jpg;charset=utf-8;base64,' . $model['IMG_START'];
    //return Html::img($base64,['width'=>'100','height'=>'60','class'=>'img-circle']);
    return $model['IMG_START'] != '' ? Html::img($base64, ['width' => '140', 'height' => '140']) : Html::img(Yii::$app->urlManager->baseUrl . '/df.jpg', ['width' => '140', 'height' => '140']);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(74, 206, 231, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'image_end', 'format' => 'raw', 'label' => 'Image End', 'value' => function ($model) {
    $base64 = 'data:image/jpg;charset=utf-8;base64,' . $model['IMG_END'];
    return $model['IMG_END'] != '' ? Html::img($base64, ['width' => '140', 'height' => '140']) : Html::img(Yii::$app->urlManager->baseUrl . '/df.jpg', ['width' => '140', 'height' => '140']);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(74, 206, 231, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]], 'toolbar' => [''], 'panel' => ['heading' => '<h3 class="panel-title">LIST IMAGE VISITING</h3>', 'type' => 'danger', 'footer' => false]]);
echo $visitImage;
开发者ID:adem-team,项目名称:advanced,代码行数:26,代码来源:_expand1Image.php


注:本文中的kartik\helpers\Html::img方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。