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


PHP Html::icon方法代码示例

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


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

示例1: run

 public function run()
 {
     $months = [0 => 'Январь', 1 => 'Февраль', 2 => 'Март', 3 => 'Апрель', 4 => 'Май', 5 => 'Июнь', 6 => 'Июль', 7 => 'Август', 8 => 'Сентябрь', 9 => 'Октябрь', 10 => 'Ноябрь', 11 => 'Декабрь'];
     $time = time();
     $request = \Yii::$app->request;
     $time = $request->get('time', $time);
     $month = date('n', $time);
     $year = date('Y', $time);
     echo '<div class="b-calendar b-calendar--along">';
     echo '<h4 class="text-center">';
     echo Html::a(Html::icon('triangle-left'), '?time=' . strtotime('-1 month', $time), ['class' => 'pull-left']);
     echo $months[$month - 1] . '&nbsp;' . $year;
     echo Html::a(Html::icon('triangle-right'), '?time=' . strtotime('+1 month', $time), ['class' => 'pull-right']);
     echo '</h4>';
     echo $this->draw_calendar($month, 2016);
     echo '</div>';
 }
开发者ID:promo-pr,项目名称:cms,代码行数:17,代码来源:Calendar.php

示例2: getIcon

 /**
  * 
  * @param type $name
  * @param array $config
  */
 public static function getIcon($input, array $config = [])
 {
     //Lookup DB Value corresponding to input
     $model = models\IconRegister::findOne(['name' => $input]);
     $icon = NULL;
     if (!isset($model) || $model->framework_id == 'bdg') {
         $icon = isset($model) ? $model->icon : $input;
         $config['as_badge'] = TRUE;
     } else {
         $icon = Html::icon($model->icon, $config, $model->framework_id == 'bsg' ? 'glyphicon glyphicon-' : 'fa fa-fw fa-');
     }
     $output = $icon;
     if (isset($config['as_badge']) && $config['as_badge'] == TRUE) {
         $output = Html::badge($output . ' ' . (isset($config['label']) && isset($config['label_as_badge']) ? $config['label'] : ''), $config);
     }
     $label = isset($config['label']) && !isset($config['label_as_badge']) ? ' ' . $config['label'] : '';
     return $output . $label;
 }
开发者ID:humanized,项目名称:yii2-iconhelper,代码行数:23,代码来源:IconHelper.php

示例3: jumbotron

 /**
  * Generates a jumbotron - a lightweight, flexible component that can optionally
  * extend the entire viewport to showcase key content on your site.
  *
  * @param mixed $content the jumbotron content
  *      - when passed as a string, it will display this directly as a raw content
  *      - when passed as an array, it requires these keys
  *          - @param string $heading the jumbotron content title
  *          - @param string $body the jumbotron content body
  *          - @param array $buttons the jumbotron buttons
  *              - @param string $label the button label
  *              - @param string $icon the icon to place before the label
  *              - @param string $url the button url
  *              - @param string $type one of the color modifier constants - defaults to self::TYPE_DEFAULT
  *              - @param string $size one of the size modifier constants
  *              - @param array $options the button html options
  * @param boolean $fullWidth whether this is a full width jumbotron without any corners - defaults to false
  * @param array $options html options for the jumbotron
  *
  * Example(s):
  * ~~~
  * echo Html::jumbotron(
  *      '<h1>Hello, world</h1><p>This is a simple jumbotron-style component for calling extra attention to featured content or information.</p>'
  * );
  * echo Html::jumbotron(
  *  [
  *      'heading' => 'Hello, world!',
  *      'body' => 'This is a simple jumbotron-style component for calling extra attention to featured content or information.'
  *    ]
  * );
  * echo Html::jumbotron([
  *      'heading' => 'Hello, world!',
  *      'body' => 'This is a simple jumbotron-style component for calling extra attention to featured content or information.',
  *      'buttons' => [
  *          [
  *              'label' => 'Learn More',
  *              'icon' => 'book',
  *              'url' => '#',
  *              'type' => Html::TYPE_PRIMARY,
  *              'size' => Html::LARGE
  *          ],
  *          [
  *              'label' => 'Contact Us',
  *              'icon' => 'phone',
  *              'url' => '#',
  *              'type' => Html::TYPE_DANGER,
  *              'size' => Html::LARGE
  *          ]
  *      ]
  * ]);
  * ~~~
  *
  * @see http://getbootstrap.com/components/#jumbotron
  */
 public static function jumbotron($content = [], $fullWidth = false, $options = [])
 {
     static::addCssClass($options, 'jumbotron');
     if (is_string($content)) {
         $html = $content;
     } else {
         $html = isset($content['heading']) ? "<h1>" . $content['heading'] . "</h1>\n" : '';
         $body = isset($content['body']) ? $content['body'] . "\n" : '';
         if (substr(preg_replace('/\\s+/', '', $body), 0, 3) != '<p>') {
             $body = static::tag('p', $body);
         }
         $html .= $body;
         $buttons = '';
         if (isset($content['buttons'])) {
             foreach ($content['buttons'] as $btn) {
                 $label = (isset($btn['icon']) ? Html::icon($btn['icon']) . ' ' : '') . (isset($btn['label']) ? $btn['label'] : '');
                 $url = isset($btn['url']) ? $btn['url'] : '#';
                 $btnOptions = isset($btn['options']) ? $btn['options'] : [];
                 $class = 'btn' . (isset($btn['type']) ? ' btn-' . $btn['type'] : ' btn-' . self::TYPE_DEFAULT);
                 $class .= isset($btn['size']) ? ' btn-' . $btn['size'] : '';
                 static::addCssClass($btnOptions, $class);
                 $buttons .= Html::a($label, $url, $btnOptions) . " ";
             }
         }
         $html .= Html::tag('p', $buttons);
     }
     if ($fullWidth) {
         return static::tag('div', static::tag('div', $html, ['class' => 'container']), $options);
     } else {
         return static::tag('div', $html, $options);
     }
 }
开发者ID:gpis88ce,项目名称:Gpis88ce,代码行数:86,代码来源:Html.php

示例4:

<?php

use kartik\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\News */
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => 'Новости', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="panel panel-primary">
    <div class="panel-heading">
        <?php 
echo Html::tag('div', Html::tag('span', Yii::$app->formatter->asDate($model->date_create, 'dd.MM.yy'), ['class' => ' ']) . ' | ' . Html::tag('span', $model->category->name, ['class' => '']) . ' | ' . Html::tag('span', Html::icon('eye-open') . ' ' . $model->views), ['class' => '']);
?>
    </div>
    <div class="panel-body">
        <?php 
$images = $model->getImages();
if ($images[0]['urlAlias'] != 'placeHolder' && $images[0]->isMain) {
    $image = $model->getImage();
    //            $sizes = $image->getSizesWhen('x300');
    //            echo Html::img($image->getUrl('x300'),['class' => 'center-block img-responsive','width'=>$sizes['width'], 'height'=>$sizes['height']]);
    echo Html::img($image->getUrl('x900'), ['class' => 'center-block img-responsive', 'width' => '100%']);
}
?>
    </div>
</div>
<div class="news-view  well">
    <h1 class="text-center"><?php 
echo Html::encode($this->title);
?>
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:view.php

示例5:

<?php

/**
 * @author oba.ou
 */
use kartik\helpers\Html;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\core\models\AdminConfigSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Admin Configs');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="admin-config-index">

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



    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'option_key', 'option_value', 'option_text', 'create_time', 'creater', ['class' => 'yii\\grid\\ActionColumn']], 'pjax' => true, 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'export' => ['fontAwesome' => true], 'condensed' => true, 'hover' => true, 'panel' => ['heading' => '', 'type' => GridView::TYPE_SUCCESS, 'before' => Html::a(Html::icon('plus') . Yii::t('app', 'Create'), ['create'], ['class' => 'btn btn-default']), 'after' => false]]);
?>

</div>
开发者ID:oyoy8629,项目名称:yii-core,代码行数:26,代码来源:index.php

示例6: foreach

                 <h3 class="panel-title">APIs to see</h3>
             </div>
             <ul class="recommendation-list list-group">
                 <?php 
 foreach ($recommend['hits']['hits'] as $rec) {
     echo '<li class="list-group-item">';
     echo Html::a($rec['fields']['name'][0], ['view', 'id' => $rec['_id']]);
     if (array_key_exists('inner_hits', $rec)) {
         $show_objects_to_fork = false;
         foreach ($rec['inner_hits'] as $innner_hitsRec) {
             if ($innner_hitsRec['hits']['total'] > 0) {
                 $show_objects_to_fork = true;
             }
         }
         if ($show_objects_to_fork) {
             echo Html::a(Html::badge(Html::icon('chevron-right', ['class' => 'badge-success'])), null, ['class' => 'pull-right', 'id' => str_replace(' ', '', $rec['fields']['name'][0])]);
         }
     }
     echo '</li>';
 }
 ?>
             </ul>
         </div>
     </div>
     <?php 
 foreach ($recommend['hits']['hits'] as $key => $rec) {
     $recDivID = 'recommendation-object-block-' . str_replace(' ', '', $rec['fields']['name'][0]);
     if (array_key_exists('inner_hits', $rec)) {
         $objectsToShowNoDupsNames = [];
         $objectsToShowNoDupsIds = [];
         foreach ($rec['inner_hits'] as $innner_hitsRec) {
开发者ID:openi-ict,项目名称:api-builder,代码行数:31,代码来源:view.php

示例7: function

	<h3>Properties</h3>

	<h4>Basic Properties</h4>

	<?php 
echo GridView::widget(['tableOptions' => ['class' => 'text-center'], 'headerRowOptions' => ['class' => 'text-center'], 'dataProvider' => $dataProviderBasic, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'name', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'description', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'type', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'createdBy.username', 'value' => function ($model, $key, $index, $widget) {
    return Html::a($model->createdBy->username, ['/profile/view', 'id' => $model->createdBy->id]);
}, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'created_at', 'format' => 'date', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE]]]);
?>

	<?php 
if ($model->api0->name !== 'core') {
    ?>
		<p>
            <?php 
    echo Html::a(Html::icon('plus', ['data' => ['toggle' => 'tooltip', 'placement' => 'right'], 'title' => 'Create Property']), ['properties/create', 'id' => $model->id], ['class' => 'btn btn-success']);
    ?>
        </p>

		<h4>New Properties</h4>

		<?php 
    echo GridView::widget(['tableOptions' => ['class' => 'text-center'], 'headerRowOptions' => ['class' => 'text-center'], 'dataProvider' => $dataProviderExceptBasic, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'name', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'description', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'type', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'createdBy.username', 'value' => function ($model, $key, $index, $widget) {
        return Html::a($model->createdBy->username, ['/profile/view', 'id' => $model->createdBy->id]);
    }, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'created_at', 'format' => 'date', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['class' => 'kartik\\grid\\ActionColumn', 'controller' => 'properties']]]);
    ?>

		<?php 
    echo $this->render('_formMethods', ['model' => $model, 'methodDropdownList' => $methodDropdownList, 'cbsDropdownList' => $cbsDropdownList]);
    ?>
开发者ID:openi-ict,项目名称:api-builder,代码行数:30,代码来源:view.php

示例8:

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Events $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="events-form">

    <?php 
$form = ActiveForm::begin(['id' => 'events-form', 'type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['user_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => \yii\helpers\ArrayHelper::map(\dektrium\user\models\User::find()->all(), 'id', 'username'), 'value' => $model->isNewRecord ? Yii::$app->user->identity->getId() : $model->user_id, 'options' => ['prompt' => '---请选择事件关联的用户---'], 'addon' => ['append' => ['content' => Html::button(\kartik\helpers\Html::icon('fa fa-user-plus', [], ''), ['class' => 'btn btn-primary', 'title' => '请选择事件关联的用户', 'data-toggle' => 'tooltip', 'data-placement' => 'bottom']), 'asButton' => true]], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 3]]], 'title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 事件标题...', 'maxlength' => 100]], 'data' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Enter 事件内容...', 'rows' => 6]], 'time' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 触发事件次数...']]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer', 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        </div>
    </div>
    <?php 
//echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer','class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
ActiveForm::end();
?>
开发者ID:tqsq2005,项目名称:Yii2adv,代码行数:30,代码来源:_form.php

示例9: function

} else {
    ?>
        <h1><?php 
    echo Html::encode($this->title);
    ?>
</h1>
    <?php 
}
?>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Html::icon('plus', ['data' => ['toggle' => 'tooltip', 'placement' => 'right'], 'title' => 'Create Apis']), ['create'], ['class' => 'btn btn-success']);
?>
        <?php 
echo Html::a('Read From Swagger', ['swagger/read', 'cbs' => false], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'name', 'value' => function ($model, $key, $index, $widget) {
    return Html::a($model->name, ['view', 'id' => $model->id]);
}, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'description', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'version', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'createdBy.username', 'value' => function ($model, $key, $index, $widget) {
    return Html::a($model->createdBy->username, ['/profile/view', 'id' => $model->createdBy->id]);
}, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => '', 'label' => 'Votes', 'value' => function ($model, $key, $index, $widget) {
    return Html::a($model->votes_up, ['apis/voteup', 'id' => $model->id], ['class' => 'glyphicon glyphicon-thumbs-up nounderline']) . ' / ' . Html::a($model->votes_down, ['apis/votedown', 'id' => $model->id], ['class' => 'glyphicon glyphicon-thumbs-down nounderline']);
}, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'created_at', 'format' => 'date', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['class' => 'kartik\\grid\\ActionColumn'], ['attribute' => '', 'label' => 'Swagger Page', 'value' => function ($model, $key, $index, $widget) {
    if ($model->published) {
开发者ID:openi-ict,项目名称:api-builder,代码行数:31,代码来源:index.php

示例10: function

<?php

use kartik\helpers\Html;
use kartik\grid\GridView;
use app\helpers\Column;
/* @var $this yii\web\View */
/* @var $searchModel app\models\BrandSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = '页面标题';
$this->params['breadcrumbs'][] = $this->title;
Yii::$app->timeZone = 'UTC';
?>
<div class="brand-index">
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['value' => 'label', 'header' => '页面标题'], ['value' => 'nb_visits', 'header' => '唯一页面浏览量'], ['value' => 'bounce_rate', 'header' => '跳出率'], ['value' => 'avg_time_on_page', 'header' => '平均停留时间', 'format' => ['date', 'H:i:s']], ['value' => 'exit_rate', 'header' => '退出率'], ['value' => function ($data) {
    return yii::$app->formatter->asDecimal($data['avg_time_generation'], 2) . '秒';
}, 'header' => '平均生成时间']], 'pjax' => true, 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'export' => ['fontAwesome' => true], 'condensed' => true, 'hover' => true, 'panel' => ['heading' => '', 'type' => GridView::TYPE_SUCCESS, 'before' => Html::a(Html::icon('plus') . Yii::t('app', 'Create'), ['create'], ['class' => 'btn btn-default']), 'after' => false]]);
?>

</div>
开发者ID:oyoy8629,项目名称:yii-core,代码行数:20,代码来源:title.php

示例11: function

$this->title = 'Обновление Сезона: ' . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Сезоны', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Обновление';
?>
<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) {
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:update.php

示例12: function

<?php

use kartik\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="gallery-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
Pjax::begin();
?>
    <div class="gallery-view-block">
        <?php 
echo ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item'], 'layout' => '{items}{pager}', 'itemView' => function ($model, $key, $index, $widget) {
    return Html::a(Html::tag('div', Html::icon('folder-open')) . Html::tag('div', Html::encode($model->name), ['class' => 'gallery-view-box-name']), ['view', 'id' => $model->id], ['class' => 'gallery-view-box text-center']);
}]);
?>
    </div>
    <?php 
Pjax::end();
?>
</div>
开发者ID:kusma007,项目名称:one-advanced,代码行数:30,代码来源:index.php

示例13: function

<div class="row">
    <div class="col-xs-12 col-xs-offset-0 col-sm-offset-1 col-sm-10 teams-index">

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

        <p>
        <?php 
echo Html::a(Yii::t('app', 'Create', ['modelClass' => 'Teams']), ['create'], ['class' => 'btn btn-success']);
?>
        </p>

        <div class="row">
            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pager' => ['firstPageLabel' => Html::icon('fast-backward'), 'prevPageLabel' => Html::icon('backward'), 'nextPageLabel' => Html::icon('forward'), 'lastPageLabel' => Html::icon('fast-forward')], 'options' => ['class' => 'col-xs-12 col-md-10 col-lg-7'], 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'contentOptions' => ['align' => 'center', 'style' => 'vertical-align:middle'], 'headerOptions' => ['style' => 'text-align:center'], 'options' => ['class' => 'col-xs-1']], ['attribute' => 'id_team', 'options' => ['class' => 'col-xs-1'], 'contentOptions' => ['align' => 'center', 'style' => 'vertical-align:middle'], 'headerOptions' => ['style' => 'text-align:center']], ['attribute' => 'team_name', 'options' => ['class' => 'col-xs-4'], 'contentOptions' => ['style' => 'vertical-align:middle'], 'headerOptions' => ['style' => 'text-align:center'], 'value' => function ($model) {
    return Html::a($model->team_name, ['teams/update', 'id' => $model->id_team]);
}, 'format' => 'raw'], ['attribute' => 'country', 'contentOptions' => ['align' => 'center', 'style' => 'vertical-align:middle'], 'headerOptions' => ['style' => 'text-align:center'], 'value' => function ($model) {
    return Html::a($model->country0->country, ['countries/update', 'id' => $model->country]);
}, 'format' => 'raw', 'filter' => \app\models\countries\Countries::getCountriesArray(), 'filterInputOptions' => ['class' => 'form-control'], 'options' => ['class' => 'col-xs-3']], ['attribute' => 'team_logo', 'options' => ['class' => 'col-xs-2'], 'headerOptions' => ['style' => 'text-align:center'], 'filter' => false, 'format' => 'raw', 'value' => function ($model) {
    return Html::img($model->fileUrl, ['height' => '50', 'width' => '50']);
}, 'contentOptions' => ['align' => 'center']], ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Удалить', 'template' => '{delete}', 'options' => ['class' => 'col-xs-1'], 'contentOptions' => ['align' => 'center', 'style' => 'vertical-align:middle'], 'headerOptions' => ['style' => 'text-align:center']]]]);
?>
        </div>

    </div>
</div>
开发者ID:Andrewkha,项目名称:sportforecast,代码行数:31,代码来源:index.php

示例14:

<?php

use kartik\helpers\Html;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\models\BrandSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Brands');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="brand-index">
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'sn', 'cn_name', 'en_name', 'py_name', 'initial', ['attribute' => 'show_type_name', 'vAlign' => 'middle', 'width' => '180px', 'value' => 'viewShowTypeName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => \app\models\Brand::$showTypeNameArray, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => '', 'style' => 'width:200px;'], 'format' => 'raw'], ['attribute' => 'imageLogo', 'format' => ['image', ['width' => 100]]], ['class' => 'yii\\grid\\ActionColumn']], 'pjax' => true, 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'export' => ['fontAwesome' => true], 'condensed' => true, 'hover' => true, 'panel' => ['heading' => '', 'type' => GridView::TYPE_SUCCESS, 'before' => Html::a(Html::icon('plus') . Yii::t('app', 'Create'), ['create'], ['class' => 'btn btn-default']), 'after' => false]]);
?>

</div>
开发者ID:oyoy8629,项目名称:yii-core,代码行数:19,代码来源:index.php

示例15:

    <nav class="navbar navbar-static-top" role="navigation">

        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
        </a>


        <div class="navbar-custom-menu">

            <ul class="nav navbar-nav">

                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <?php 
echo \kartik\helpers\Html::icon('user');
?>
<span class="hidden-xs"><?php 
echo yii::$app->user->identity->username;
?>
</span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header">
                            <img src="/logo.jpg" class="img-circle"/>
                            <p>
                                <?php 
echo yii::$app->user->identity->username;
?>
 - <?php 
开发者ID:oyoy8629,项目名称:yii-core,代码行数:30,代码来源:header.php


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