public function run() { $ret_val = ''; if (isset($this->header) && is_string($this->header) && !is_bool($this->header)) { $ret_val = Html::tag('h2', $this->header); } switch ($this->displayAs) { case 'grid': $this->items = is_array($this->items) ? $this->items : [$this->items]; $this->widgetOptions = array_merge(['summary' => false, 'layout' => '{items}', 'showHeader' => $this->header, 'dataProvider' => new \yii\data\ArrayDataProvider(['allModels' => $this->items]), 'columns' => $this->attributes], $this->widgetOptions); $ret_val .= \kartik\grid\GridView::widget($this->widgetOptions); break; case 'list': $this->widgetOptions = array_merge(['itemOptions' => ['tag' => false], 'summary' => false, 'dataProvider' => new \yii\data\ArrayDataProvider(['allModels' => $this->items]), 'itemView' => function ($model, $key, $index, $widget) { return $this->renderListItem($model, $key, $index, $widget); }], $this->widgetOptions); $ret_val .= \yii\widgets\ListView::widget($this->widgetOptions); break; case 'csv': $ret_val = []; foreach ($this->items as $index => $item) { $ret_val[] = $this->renderCsvItem($item, $index); } $ret_val = Html::tag('div', implode(', ', $ret_val)); break; case 'tags': foreach ($this->items as $index => $item) { $ret_val .= $this->renderTagItem($item, $index); } $ret_val = Html::tag('div', $ret_val); break; default: $this->widgetOptions['class'] = isset($this->widgetOptions['class']) ? $this->widgetOptions['class'] : 'table'; $this->widgetOptions = array_merge(['model' => $this->items, 'attributes' => $this->attributes, 'options' => ['class' => 'table']], $this->widgetOptions); $ret_val .= \yii\widgets\DetailView::widget($this->widgetOptions); break; } return $ret_val; }
public function run() { $header = Html::tag(ArrayHelper::remove($this->labelOptions, 'tag', 'h4'), 'Parents', $this->labelOptions); if (count($this->labelContainerOptions)) { $header = Html::tag(ArrayHelper::remove($this->labelContainerOptions, 'tag', 'div'), $header, $this->labelContainerOptions); } $list = ListView::widget(['summary' => false, 'emptyText' => Html::tag('ul', '', $this->options), 'options' => $this->options, 'itemOptions' => $this->itemOptions, 'dataProvider' => $this->dataProvider, 'itemView' => function ($model, $key, $index, $widget) { return $model->name . (!$this->viewOnly ? Html::tag('span', Html::a("Remove " . Icon::show('remove'), '/' . $this->model->isWhat() . "/remove-parent/" . $this->model->getId() . '/' . $model['id'], ['role' => 'parentListItem', 'style' => 'color:white']), ['class' => 'badge']) : ''); }]); if (count($this->listOptions)) { $list = Html::tag(ArrayHelper::remove($this->listOptions, 'tag', 'div'), $list, $this->listOptions); } if (!$this->viewOnly) { $script = Html::tag('script', new \yii\web\jsExpression('$(document).ready(function () { $("#' . $this->options['id'] . '").find(\'[role="parentListItem"]\').each(function () { $(this).on("click", function (event) { event.preventDefault(); var $element = $(this); $.post(this.href, function (result) { if(result) $element.parents("li").remove(); }); }); }); })'), ['type' => 'text/javascript']); } else { $script = ''; } return Html::tag('div', $header . $list, $this->containerOptions) . $script; }
public function testLabelsExplicit() { $dataProvider = new ActiveDataProvider(['query' => Order::find(), 'models' => [new Order()], 'totalCount' => 1, 'sort' => ['attributes' => ['total'], 'route' => 'site/index']]); ob_start(); echo ListView::widget(['dataProvider' => $dataProvider, 'layout' => "{sorter}"]); $actualHtml = ob_get_clean(); $this->assertFalse(strpos($actualHtml, '<a href="/index.php?r=site%2Findex&sort=customer_id" data-sort="customer_id">Customer</a>') !== false); $this->assertTrue(strpos($actualHtml, '<a href="/index.php?r=site%2Findex&sort=total" data-sort="total">Invoice Total</a>') !== false); }
public function run() { $this->view->registerJs('function refreshGpGallery() { $(".gpgallery").collagePlus({"targetHeight": 250, "allowPartialLastRow": true, "childrenFilterSelector": ".inline"}); $(".gpgallery").collageCaption({"images": $(".inline:not(:has(div))")}); } $(window).load(function() { refreshGpGallery(); }); $(window).resize(function() { refreshGpGallery(); });'); echo ListView::widget(['dataProvider' => $this->dataProvider, 'itemOptions' => ['tag' => false], 'itemView' => $this->itemView, 'layout' => "<div class=\"gpgallery\">{items}</div>\n{pager}", 'pager' => ['class' => \kop\y2sp\ScrollPager::className(), 'triggerOffset' => 999999, 'noneLeftText' => 'No more item to display', 'noneLeftTemplate' => '<div class="clearfix"></div><div class="ias-noneleft" style="text-align: center;"><small class="text-muted">{text}</small>', 'enabledExtensions' => [\kop\y2sp\ScrollPager::EXTENSION_TRIGGER, \kop\y2sp\ScrollPager::EXTENSION_SPINNER, \kop\y2sp\ScrollPager::EXTENSION_NONE_LEFT], 'eventOnRendered' => "function() { refreshGpGallery(); }"]]); }
</td> <td class="c23"> <h1><?php echo Html::encode($model->title); ?> </h1> <?//= Html::img('/image/bannerfans_15821322.jpg', ['width'=>'100%']); ?> <p><?php echo Html::encode($model->description); ?> <br><br></p> <? if (!(Yii::$app->user->isGuest)) Pjax::begin(['id' => 'notes']); ?> <?php echo ListView::widget(['dataProvider' => $products, 'itemOptions' => ['class' => '_product'], 'layout' => "{items}\n{pager}\n", 'itemView' => '//product/_product', 'viewParams' => array('groups' => $groups)]); ?> <? if (!(Yii::$app->user->isGuest)) Pjax::end(); ?> </td> </tr> </table> <?php echo Html::input('hidden', 'this_category_id', $model->category_id, $options = ['class' => 'this_category_id']); echo Html::input('hidden', 'group_this_category_id', $model->category_id, $options = ['class' => 'group_this_category_id']); ?>
?> </div> <div class="col col15 t-right"><?php echo Yii::t('app', 'CABINET_HISTORY_TRANSACTIONS_CHANGE'); ?> </div> <div class="col col15 t-right"><?php echo Yii::t('app', 'CABINET_HISTORY_TRANSACTIONS_AFTER'); ?> </div> <div class="col col40"></div> <div class="clr"></div> </div> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'itemView' => '_transaction-item', 'summary' => '', 'id' => 'items-list', 'itemOptions' => ['class' => 'item clearfix'], 'layout' => '{items}{pager}']); ?> <?/* <div class="item"> <div class="col col20">21:00 / 21.07.2015</div> <div class="col col10 t-right">10.11$</div> <div class="col col10 t-right"><b class="red">− 10$</b></div> <div class="col col10 t-right"><b class="blue">0.11$</b></div> <div class="col col-text col50">«Не стреляют? А как насчет джигитов с кинжалами?» — сразу спросили мы у Ольги, которая вместе с супругом недавно </div> <div class="clr"></div> </div> <div class="item"> <div class="col col20">21:00 / 21.07.2015</div> <div class="col col10 t-right">10.11$</div> <div class="col col10 t-right"><b class="red">− 10$</b></div>
/* @var $this yii\web\View */ /* @var $searchModel pendalf89\filemanager\models\Mediafile */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->params['moduleBundle'] = FilemanagerAsset::register($this); ?> <header id="header"><span class="glyphicon glyphicon-picture"></span> <?php echo Module::t('main', 'File manager'); ?> </header> <div id="filemanager" data-url-info="<?php echo Url::to(['file/info']); ?> "> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'layout' => '<div class="items">{items}</div>{pager}', 'itemOptions' => ['class' => 'item'], 'itemView' => function ($model, $key, $index, $widget) { return Html::a(Html::img($this->context->module->routes['baseUrl'] . $model->path, ['width' => 50, 'height' => 50]) . '<span class="checked glyphicon glyphicon-check"></span>', '#mediafile', ['data-key' => $key]); }]); ?> <div class="dashboard"> <p><?php echo Html::a('<span class="glyphicon glyphicon-upload"></span> ' . Module::t('main', 'Upload manager'), ['file/uploadmanager'], ['class' => 'btn btn-default']); ?> </p> <div id="fileinfo"> </div> </div> </div>
<?php /* @var $this yii\web\View */ $this->title = Yii::t('frontend', 'Articles'); echo $this->render('_typehead'); ?> <div id="article-index"> <h1><?php echo Yii::t('frontend', 'Articles'); ?> </h1> <?php echo \yii\widgets\ListView::widget(['dataProvider' => $dataProvider, 'pager' => ['hideOnSinglePage' => true], 'itemView' => '_item']); ?> </div>
} else { echo "RESULT"; } ?> </h3> <div class="sort"> <form id="sort-tour" class="form-inline" action="<?php echo \yii\helpers\Url::to(['tour/sort']); ?> " method="post" role="form"> <div class="form-group"> <label for="sort_tour">Sorting Tour</label> <select name="sort-tour" id="sort" class="form-control"> <option value="">None</option> <option value="Descending">Descending</option> <option value="Ascending">Ascending</option> </select> <?php echo $sort->link('length', ['id' => 'length_desc', 'class' => 'sr-only']); ?> </div> </form> </div> <div class="thumb-content"> <?php echo ListView::widget(['dataProvider' => $provider, 'summary' => '', 'itemView' => '_show']); ?> </div> </div> </div>
<div class="col-lg-12"> <h1 class="page-header">Company: <?= $model->name?></h1> </div> <!-- /.col-lg-12 --> </div> <!-- /.row --> <?php $dataProvider = $model->companyDetails; echo ListView::widget([ 'dataProvider' => new ArrayDataProvider(['allModels' => $dataProvider,'pagination' => false]), 'itemView' => '_row1', 'summary' => false, 'itemOptions' => [ 'class' => 'col-lg-3 col-md-6' ], 'options' => [ 'class' => 'row', 'id' => false ] ])?> <!-- /.row --> <div class="row"> <div class="col-lg-8"> <div class="chat-panel panel panel-green"> <div class="panel-heading"> <i class="fa fa-comments fa-fw"></i> Latest Dealer Bids <div class="btn-group pull-right"> </div> </div>
?> <hr> <?php echo $this->render('tmpl/_total_income', ['budgetModel' => $model, 'type' => \app\models\BudgetItem::TYPE_INCOME]); ?> <?php echo $this->render('tmpl/modal_income', ['budgetModel' => $model, 'modelHistory' => $modelHistory]); ?> </div> <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6"> <!-- costs --> <?php echo ListView::widget(['dataProvider' => $providerCost, 'itemView' => 'tmpl/_cost']); ?> <hr> <?php echo $this->render('tmpl/_total_costs', ['budgetModel' => $model, 'type' => \app\models\BudgetItem::TYPE_COST]); ?> <?php echo $this->render('tmpl/modal_costs', ['budgetModel' => $model, 'modelHistory' => $modelHistory]); ?> </div> </div> </div> </div> </div>
<?php use yii\helpers\Html; use yii\widgets\ListView; use yii\widgets\Pjax; /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Гостевая книга'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="guest-book-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_form', ['model' => $model]); Pjax::begin(['id' => 'guest_records']); ?> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => function ($model, $key, $index, $widget) { // return Html::a(Html::encode($model->name), ['view', 'id' => $model->id]); return $this->render('_list', ['model' => $model, 'index' => $index]); }]); Pjax::end(); ?> </div>
* @author Semenov Alexander <*****@*****.**> * @link http://skeeks.com/ * @copyright 2010 SkeekS (СкикС) * @date 25.05.2015 */ /* @var $this yii\web\View */ /* @var $widget \skeeks\cms\cmsWidgets\contentElements\ContentElementsCmsWidget */ ?> <!-- /Latest Blog Post --> <h4 class="letter-spacing-1"><?php echo $widget->label; ?> </h4> <? echo \yii\widgets\ListView::widget([ 'dataProvider' => $widget->dataProvider, 'itemView' => 'article-footer-item', 'emptyText' => '', 'options' => [ 'tag' => 'ul', 'class' => 'footer-posts list-unstyled', ], 'itemOptions' => [ 'tag' => false ], 'layout' => "{items}" ])?>
<?php use yii\widgets\ListView; echo ListView::widget(['summary' => '', 'dataProvider' => $coloursProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => '_color_item']);
?> <div class="row"> <div class="forum-category col-md-12"> <div class="header2"> <?php echo $forum->name; ?> </div> </div> </div> <div class="row"> <div class="col-md-12"> <?php echo ListView::widget(['summary' => false, 'itemView' => '_topic', 'id' => 'yboardTopic', 'dataProvider' => $dataProvider]); ?> </div> </div> <div> <?php echo $this->render('_forumfooter'); ?> </div> </div> <div style="display:none;"> <?php if (Yii::$app->user->can('moderator')) {
$this->title = 'Job Vacancies'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="vacancy-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_search', ['model' => $searchModel]); ?> <p> <!--Html::a('Create Vacancy', ['create'], ['class' => 'btn btn-success'])--> </p> <div class="panel panel-primary"> <div class="panel-heading"> Vacancy </div> <div class="panel-body"> <?php echo \yii\widgets\ListView::widget(['dataProvider' => $dataProvider, 'summary' => '', 'itemOptions' => ['class' => 'item'], 'itemView' => '_view', 'viewParams' => ['fullView' => true]]); ?> </div> </div> </div>
<?php /* @var $this yii\web\View */ /* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $itemLayout string */ echo \yii\widgets\ListView::widget(['dataProvider' => $dataProvider, 'itemView' => $itemLayout]);
<?php $path = Yii::$app->urlManager->createAbsoluteUrl('/webroot/'); use giicms\forum\components\widgets\CategoryWidget; use yii\widgets\ListView; ?> <section class="content"> <div class="container"> <div class="row"> <div class="col-lg-8 col-md-8"> <!-- POST --> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'options' => ['tag' => 'div'], 'layout' => "{pager}\n{items}\n{summary}", 'itemView' => '_post']); ?> <!-- POST --> </div> <div class="col-lg-4 col-md-4"> <!-- --> <!-- --> <div class="sidebarblock"> <h3>Poll of the Week</h3> <div class="divline"></div> <div class="blocktxt"> <p>Which game you are playing this week?</p> <form action="http://forum.azyrusthemes.com/index.html#" method="post" class="form">
<?php use yii\helpers\Html; use yii\widgets\ListView; use yii\widgets\Menu; /* @var $this yii\web\View */ $title = $category === null ? 'Bienvenido' : $category->title; $this->title = Html::encode($title); ?> <h1><?php echo Html::encode($title); ?> </h1> <div class="container-fluid"> <div class="row"> <div class="col-xs-4"> <?php echo Menu::widget(['items' => $menuItems, 'options' => ['class' => 'menu']]); ?> </div> <div class="col-xs-8"> <?php echo ListView::widget(['dataProvider' => $productsDataProvider, 'itemView' => '_product']); ?> </div> </div> </div>
<?php use yii\helpers\Html; use yii\widgets\ListView; use yii\helpers\Url; /* @var $this yii\web\View */ /* @var $searchModel frontend\models\UserPaymentsSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Moji načini plaćanja'); $this->params['breadcrumbs'][] = $this->title; $this->params['user'] = $user; $pageDescription = '<p style="font-size:12px; line-height:14px; margin:10px;">' . Yii::t('app', 'Lista mojih sačuvanih predmeta usluga i njihove karakteristike. Klikom na dugme desno "dodaj/izbaci predmet" pređite na stranicu za izbor i izaberite predmet.') . '</p>'; $pageDescription .= '<p style="font-size:12px; line-height:14px; margin:10px;">' . Yii::t('app', 'Kada izaberete Vaš predmet usluge, na ovoj stranici se nalazi spisak svih izabranih predmeta. Klikom na naslov svakog njih možete ih dodatno podešavati i tako olakšati i ubrzati kupovinu ili naručivanje usluga.') . '</p>'; $this->pageTitle = ['icon' => 'credit-card', 'title' => Html::encode($this->title) . Html::a('<i class="fa fa-plus-circle"></i> ' . Yii::t('app', 'Dodaj nov način plaćanja'), Url::to('/new-payment'), ['class' => 'btn btn-success btn-sm float-right']), 'description' => $pageDescription, 'search' => $searchModel]; $this->stats = [['title' => 'Zahtevi', 'value' => 163, 'sub' => 95, 'perc' => '--'], ['title' => 'Ponude', 'value' => 42, 'sub' => '--', 'perc' => '--'], ['title' => 'Promocije', 'value' => 17, 'sub' => '--', 'perc' => '--']]; ?> <div class="list-container"> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'itemView' => '_view', 'summary' => false]); ?> </div>
}, type:'POST' }).done(function(){container.slideUp()}); } return false; }); DEL; $this->registerJs($deleteJS); ?> <div class="panel-body"> <?php Pjax::begin(['id' => 'WidgetLocationPjax']); echo ListView::widget(array('id' => 'LocationsTable', 'dataProvider' => $dpLocations, 'itemView' => '@frenzelgmbh/cmaddress/widgets/views/iviews/_location_view', 'layout' => '{items}')); echo "<p> </p>"; ?> <div class="navbar navbar-default"> <?php echo Html::a('<span class="btn btn-success navbar-btn pull-right tipster" title="add location">' . Icon::show('plus', ['class' => 'fa'], Icon::FA) . ' add location</span>', array("/posts/widgetconfig/addlocation", 'id' => $id, 'module' => $module), array('class' => 'create')); ?> </div> <?php Pjax::end(); ?> </div>
<a href="<?php echo $user->createUrl('/album/admin', ['username' => $user->username, 'uguid' => $user->guid]); ?> " class="btn btn-warning"> <i class="fa fa-chevron-right"></i> Manage Albums </a> </div> <?php } ?> </div> </div> <div class="panel-body"> <div class="row"> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'itemView' => '_view', 'viewParams' => ['user' => $user], 'summary' => 'n', 'pager' => ['cssFile' => false, 'maxButtonCount' => 5, 'nextPageLabel' => '<i class="fa fa-step-forward"></i>', 'prevPageLabel' => '<i class="fa fa-step-backward"></i>', 'firstPageLabel' => '<i class="fa fa-fast-backward"></i>', 'lastPageLabel' => '<i class="fa fa-fast-forward"></i>', 'header' => '<div class="clearfix"></div><div class="pagination-container">', 'footer' => '</div>']]); /* $this->widget('zii.widgets.CListView', [ 'dataProvider' => $dataProvider, 'itemView' => '/album/_view', 'viewData' => [ 'user' => $user ], 'summaryText' => false, 'enableSorting' => false, 'pagerCssClass' => 'album-pagination', 'pager' => [ 'cssFile' => false, 'maxButtonCount' => 5, 'nextPageLabel' => '<i class="fa fa-step-forward"></i>', 'prevPageLabel' => '<i class="fa fa-step-backward"></i>',
use yii\widgets\ListView; /* @var $this yii\web\View */ /* @var $searchModel common\models\Search\UserSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Users'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="user-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create User', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => function ($model, $key, $index, $widget) { return Html::a(Html::encode($model->id), ['view', 'id' => $model->id]); }]); ?> </div>
<?php /** * Created by PhpStorm. * User: roman * Date: 17.01.2016 * Time: 20:26 */ echo \yii\widgets\ListView::widget(['options' => ['class' => 'list-view', 'id' => 'search_results'], 'itemView' => '_customer', 'dataProvider' => $records]);
use reportmanager\models\ReportsConditions; ?> <?php echo Html::a(Yii::t('reportmanager', 'Add Condition'), ['condition', 'report_id' => $model->id], ['class' => 'btn btn-primary', 'name' => 'add-condition']); ?> <?php echo ListView::widget(['dataProvider' => $condDataProvider, 'itemOptions' => ['class' => 'list'], 'itemView' => function ($model, $key, $index, $widget) use($condition) { $param = NULL; if ($model->functionObj->paramType) { if (is_array($model->value)) { $all_values = $model->config['values']; $values = array_map(function ($v) use($all_values) { return array_key_exists($v, $all_values) ? $all_values[$v] : NULL; }, $model->value); $param = join(', ', $values); } else { $param = $model->value; } } $title = '' . $model->operationsList[$model->operation] . ': ' . $model->conditionLabel . ' ' . $model->functionObj->label . ' ' . ($param ? $param : ''); return '' . Html::a('▲', ['condition', 'report_id' => $model->report->id, 'id' => $model->id], ['data' => ['operation' => 'up']]) . Html::a('▼', ['condition', 'report_id' => $model->report->id, 'id' => $model->id], ['data' => ['operation' => 'down']]) . (isset($condition) && $condition->id == $model->id ? Html::tag('span', $title) : Html::a($title, ['condition', 'report_id' => $model->report->id, 'id' => $model->id])); }]); ?> <?php $this->registerJs(' if ($.support.pjax) { $(document).on("click", "a[data-operation]", function(event) { $.pjax.click(event, {type: "post", push: false, container: "#all", data: {operation: $(event.currentTarget).attr("data-operation")}}) })
</div> <div class="col-md-3 pull-right view"> <span>Nézet</span> <?php echo Html::a("Rács", Yii::$app->urlManager->createAbsoluteUrl(["/category/view", "justcategory" => $categoryData["slug"], "tipus" => 'racs']), ['class' => 'racs ' . ($type == "racs" ? "active" : "")]); echo Html::a("Lista", Yii::$app->urlManager->createAbsoluteUrl(["/category/view", "justcategory" => $categoryData["slug"], "tipus" => 'lista']), ['class' => 'lista ' . ($type == "lista" ? "active" : "")]); ?> </div> <div class="clearfix"></div> </div> <div class="product-categories-index"> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'product-item col-md-6'], 'itemView' => 'itemview']); ?> </div> <?php $this->registerJs(' $(".listorder").on("change", function() { var url = $(this).find("option:selected").val(); window.location = url; }); $("input[name*=\\"topping\\"]").on("click", function() { var propPrice = parseInt($(this).data("price")); var currentPriceContainer = $(this).parents(".product-item").find(".price");
<?php use app\models\News; use yii\widgets\ListView; use yii\bootstrap\Alert; /* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $this yii\web\View */ $this->title = Yii::t('news', 'News admin'); ?> <div class="row news-index"> <div class="col-xs-12"> <?php echo \yii\bootstrap\Nav::widget(['options' => ['class' => 'nav-pills'], 'items' => [['label' => News::statusLabel(News::STATUS_PROPOSED), 'url' => ['news/admin', 'status' => News::STATUS_PROPOSED], 'active' => $status == News::STATUS_PROPOSED], ['label' => News::statusLabel(News::STATUS_REJECTED), 'url' => ['news/admin', 'status' => News::STATUS_REJECTED], 'active' => $status == News::STATUS_REJECTED], ['label' => News::statusLabel(News::STATUS_PUBLISHED), 'url' => ['news/admin', 'status' => News::STATUS_PUBLISHED], 'active' => $status == News::STATUS_PUBLISHED]]]); ?> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'layout' => '{items}{pager}', 'itemOptions' => ['class' => 'item'], 'itemView' => '_view', 'viewParams' => ['displayStatus' => true, 'displayModeratorButtons' => true]]); ?> </div> </div>
* For the full copyright and license information, please view the LICENSE.md * file that was distributed with this source code. */ use dektrium\user\models\UserSearch; use yii\bootstrap\ActiveForm; use yii\data\ActiveDataProvider; use yii\grid\GridView; use yii\helpers\Html; use yii\jui\DatePicker; use yii\web\View; use yii\widgets\Pjax; /** * @var View $this * @var ActiveDataProvider $dataProvider * @var UserSearch $searchModel */ ?> <div class="well well-sm"> <?php $form = ActiveForm::begin(['layout' => 'inline', 'enableAjaxValidation' => false]); echo $form->field($searchModel, 'searchName', ['inputOptions' => ['placeholder' => \Yii::t('app', 'Search by name or user\'s phone')]]); ?> <?php echo Html::submitButton('<span class="glyphicon glyphicon-search"></span>', ['class' => 'btn btn-default']); ActiveForm::end(); ?> </div> <?php Pjax::begin(); echo \yii\widgets\ListView::widget(['dataProvider' => $dataProvider, 'itemView' => '_listItem', 'itemOptions' => ['class' => 'col-xs-12 col-sm-6 col-md-4 col-lg-3'], 'layout' => "{summary}<br/><div class=\"container-fluid\">{items}</div>\n{pager}\n{summary}"]); Pjax::end();
</div> </div> --> <!--/discount panel end--> </div> </div> <!--right column--> <div class="col-lg-9 col-md-9 col-sm-12"> <div class="w100 clearfix category-top"> <?php echo Html::tag('h2', $this->title); ?> <div class="categoryImage"> <img src="/images/site/category.jpg" class="img-responsive" alt="img"> </div> </div> <?php Pjax::begin(); ?> <?php echo ListView::widget(['options' => ['id' => 'product-listview'], 'layout' => $template, 'dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item col-lg-3 col-md-3 col-sm-6 col-xs-12'], 'itemView' => function ($model, $key, $index, $widget) { return $this->render('_product_item', ['model' => $model]); }, 'summaryOptions' => ['class' => 'pull-left']]); ?> <?php Pjax::end(); ?> <!--/.categoryFooter--> </div>
<h4>Библиотека медиафайлов</h4> <?php $field_id = uniqid("field"); $options = ['name' => 'files', 'id' => $field_id, 'options' => ['multiple' => true], 'pluginOptions' => ['uploadAsync' => true, "previewFileType" => "image", 'id' => uniqid("field"), "showClose" => false, "showPreview" => false, "showCaption" => false, "showUpload" => false, "browseClass" => "btn btn-primary btn-sm", "browseLabel" => "Добавить файлы", "layoutTemplates" => ["footer" => "", "main2" => '{browse}'], "overwriteInitial" => true, "uploadExtraData" => ['name' => 'files'], "removeClass" => "btn btn-danger btn-sm", "removeLabel" => "", "removeIcon" => "<i class=\"fa fa-trash\"></i>", "previewSettings" => ["image" => ["width" => "auto", "height" => "50px"]], 'uploadUrl' => \yii\helpers\Url::toRoute(['/media/default/upload']), "allowedPreviewTypes" => ['image'], "dropZoneEnabled" => false], 'pluginEvents' => ['filebatchselected' => "function(event, files) {\n \$.fancybox.showLoading();\n \$('#" . $field_id . "').fileinput('upload');\n }", "filebatchuploadcomplete" => "function(event, files, extra) {\n \$.fancybox.hideLoading();\n \$.pjax.reload('#window-media-items', {push:false, pushState: false, url : '/backend/media/default/wysiwyg-window'});\n }"]]; echo \kartik\widgets\FileInput::widget($options); ?> <br> <?php \yii\widgets\Pjax::begin(['id' => 'window-media-items', 'enablePushState' => false]); ?> <?php echo \yii\widgets\ListView::widget(['layout' => "<div class='clearfix'>{items}</div>\n{pager}", 'dataProvider' => $dataProvider, 'pager' => ['options' => ['class' => 'pagination pagination-sm'], 'maxButtonCount' => 3], 'itemOptions' => ['class' => 'media-item col-lg-1 col-md-2 col-sm-2 col-xs-6', 'data-url' => \yii\helpers\Url::toRoute(['window'])], 'itemView' => function ($model, $key, $index, $widget) { $image = false; if (lenarx\media\models\Media::isImage($model->mime_type)) { $image = true; } $model->data = $model->data ? unserialize($model->data) : []; $filesize = lenarx\media\helpers\MediaLib::filesize_formatted($model->data['size']); return $this->render('media-item', ['model' => $model, 'image' => $image, 'filesize' => $filesize]); }]); ?> <?php \yii\widgets\Pjax::end(); ?> </div> <div class="col-sm-4 col-xs-6 media-library-insert"> <div class="media-insert hide"> <div class="block info"> <h4>Параметры файла</h4> <p class="filename">Weddell-Sea-Antarctica.jpg</p> <p class="created_at">20.10.2015</p>