コード例 #1
2
ファイル: Tor.php プロジェクト: mark38/yii2-tor
 public function run()
 {
     NavBar::begin(['brandLabel' => false, 'options' => ['class' => 'tor-nav']]);
     echo Html::tag('div', $this->torMenu(), ['class' => 'container']);
     NavBar::end();
     $view = $this->view;
     NavAsset::register($view);
 }
コード例 #2
0
 public function run()
 {
     echo Html::beginTag('div', ['class' => 'input-group']);
     if (!isset($this->options['class'])) {
         $this->options['class'] = 'form-control';
     }
     $iconId = 'icon-' . $this->options['id'];
     if (!isset($this->options['aria-describedby'])) {
         $this->options['aria-describedby'] = $iconId;
     }
     if ($this->hasModel()) {
         $replace['{input}'] = Html::activeTextInput($this->model, $this->attribute, $this->options);
     } else {
         $replace['{input}'] = Html::textInput($this->name, $this->value, $this->options);
     }
     if ($this->icon != '') {
         $replace['{icon}'] = Html::tag('span', Icon::show($this->icon, [], Icon::FA), ['class' => 'input-group-addon', 'id' => $iconId]);
     }
     echo strtr($this->template, $replace);
     echo Html::endTag('div');
     $view = $this->getView();
     Assets::register($view);
     $idMaster = $this->hasModel() ? Html::getInputId($this->model, $this->fromField) : $this->fromField;
     $idSlave = $this->options['id'];
     $view->registerJs("\n        \$('#{$idMaster}').syncTranslit({\n            destination: '{$idSlave}',\n            type: 'url',\n            caseStyle: 'lower',\n            urlSeparator: '-'\n        });");
 }
コード例 #3
0
ファイル: ActiveForm.php プロジェクト: carono/yii2-components
 public static function begin2($config = [])
 {
     $error = Html::tag('div', '{error}', ["class" => "col-lg-8"]);
     $input = Html::tag('div', '{input}', ["class" => "col-lg-4"]);
     $template = "{label}\n" . $input . $error;
     $config = ArrayHelper::merge(['options' => ['class' => 'form-horizontal'], 'fieldConfig' => ['template' => $template, 'labelOptions' => ['class' => 'col-lg-3 control-label']]], $config);
     return self::begin($config);
 }
コード例 #4
0
 /**
  * Returns Bootstrap label widget with user's role
  * @param User $user
  * @return string
  */
 public function getRoleLabel(User $user)
 {
     $roles = [User::ROLE_USER => ['success', Yii::t('app', 'User')], User::ROLE_EDITOR => ['warning', Yii::t('app', 'Editor')], User::ROLE_ADMINISTRATOR => ['danger', Yii::t('app', 'Administrator')]];
     if (isset($roles[$user->role])) {
         return Html::tag('span', $roles[$user->role][1], ['class' => 'label label-' . $roles[$user->role][0]]);
     }
     return 'N/A';
 }
コード例 #5
0
ファイル: NewComment.php プロジェクト: VasileGabriel/humhub
 /**
  * @inheritdoc
  */
 public function getAsHtml()
 {
     $contentInfo = $this->getContentInfo($this->getCommentedRecord());
     if ($this->groupCount > 1) {
         return Yii::t('CommentModule.notification', "{displayNames} commented {contentTitle}.", array('displayNames' => $this->getGroupUserDisplayNames(), 'contentTitle' => $contentInfo));
     }
     return Yii::t('CommentModule.notification', "{displayName} commented {contentTitle}.", array('displayName' => Html::tag('strong', Html::encode($this->originator->displayName)), 'contentTitle' => $contentInfo));
 }
コード例 #6
0
ファイル: Layer.php プロジェクト: edofre/yii2-slider-pro
 /**
  * @return string
  */
 public function render()
 {
     if (isset($this->htmlOptions['class'])) {
         $this->htmlOptions['class'] = self::LAYER_CLASS . ' ' . $this->htmlOptions['class'];
     } else {
         $this->htmlOptions['class'] = self::LAYER_CLASS;
     }
     return \yii\bootstrap\Html::tag($this->tag, $this->content, $this->htmlOptions);
 }
コード例 #7
0
ファイル: Full.php プロジェクト: mark38/yii2-tor
 public function run()
 {
     if ($this->torAd) {
         echo $this->render('full', ['torAd' => $this->torAd]);
     } else {
         echo Html::tag('div', '<em>По Вашему запросу ничего не найдено</em>', ['class' => 'text-center text-muted']);
     }
     $view = $this->view;
     TorAdsAsset::register($view);
 }
コード例 #8
0
ファイル: Alert.php プロジェクト: kalyabin/comitka
 /**
  * Renders system message at frontend.
  *
  * @return string
  */
 public function viewMessage()
 {
     $alert = Yii::$app->session->getFlash('system-alert');
     $type = ArrayHelper::getValue($alert, 'type', self::INFO);
     $message = ArrayHelper::getValue($alert, 'message', '');
     if (!empty($message)) {
         return Html::tag('div', $message, ['class' => 'alert alert-' . $type]);
     }
     return '';
 }
コード例 #9
0
ファイル: Top.php プロジェクト: mark38/yii2-tor
 public function accountMenu()
 {
     if (Yii::$app->user->isGuest) {
         $items[] = ['label' => 'Войти', 'url' => ['/site/login']];
         $items[] = ['label' => 'Зарегистрироваться', 'url' => ['/site/signup']];
     } else {
         $user = User::findOne(Yii::$app->user->id);
         $items[] = ['label' => $user->username . ' ' . Html::tag('span', preg_replace('/\\,00/', '', number_format($user->money, 2, ',', '&thinsp;')) . ' ' . Icon::show('user', ['class' => 'fa-btc'], Icon::FA), ['style' => 'margin: 0 2px 0 6px;']), 'items' => [['label' => 'Добавить лот на продажу', 'url' => ['/tor/mng-ad']], '<li class="divider"></li>', ['label' => 'Сменить пароль', 'url' => ['#']], ['label' => 'Выход', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]];
     }
     return $items;
 }
コード例 #10
0
ファイル: VariationColumn.php プロジェクト: yii2tech/admin
 /**
  * @inheritdoc
  */
 protected function renderDataCellContent($model, $key, $index)
 {
     if ($this->content === null) {
         $contentParts = [];
         $variationBehavior = $this->getVariationBehavior($model);
         foreach ($variationBehavior->getVariationModels() as $variationModel) {
             $contentParts[] = '<tr><td><b>' . $this->getVariationLabel($model, $variationModel) . '</b></td><td>' . $this->getVariationValue($variationModel) . '</td>';
         }
         return Html::tag('table', implode("\n", $contentParts), $this->tableOptions);
     }
     return parent::renderDataCellContent($model, $key, $index);
 }
コード例 #11
0
ファイル: ButtonContextMenu.php プロジェクト: roboapp/admin
 /**
  * Generates the button dropdown.
  * @return string the rendering result.
  */
 protected function renderButton()
 {
     // Html::addCssClass($this->options, ['widget' => 'btn']);
     $label = $this->label;
     $options = $this->options;
     if (!isset($options['href'])) {
         $options['href'] = '#';
     }
     Html::addCssClass($options, ['toggle' => 'dropdown-toggle']);
     $options['data-toggle'] = 'dropdown';
     return Html::tag($this->tagName, $label, $options) . "\n";
 }
コード例 #12
0
 /**
  * @dataProvider gridDataProvider
  */
 public function testGridBoxRender($dataProvider)
 {
     $grid = GridBox::widget(['id' => 'gridbox-test-id', 'tools' => Html::tag('span', 'abc123', ['class' => '.tool-test']), 'dataProvider' => $dataProvider, 'columns' => ['id', ['attribute' => 'username', 'contentOptions' => ['class' => 'username']], 'email']]);
     $dom = new Crawler($grid);
     $root = $dom->filter('div#gridbox-test-id');
     $this->assertEquals('gridbox-test-id', $root->attr('id'));
     $this->assertEquals('grid-view box box-default', $root->attr('class'));
     $header = $root->filter('div.box-header');
     $tools = $header->filter('div.box-tools');
     $this->assertContains('abc123', $tools->text());
     $body = $root->filter('div.box-body');
     $this->assertEquals('box-body no-padding', $body->attr('class'));
     $this->assertNotNull($body->filter('table.table')->eq(0));
     $this->assertEquals('bar', $body->filter('tr[data-key="1"] td.username')->text());
     $footer = $header = $root->filter('div.box-footer');
     $this->assertContains('Showing 1-3 of 3 items.', $footer->text());
 }
コード例 #13
0
ファイル: Preview.php プロジェクト: mark38/yii2-tor
 public function run()
 {
     $link = Links::findOne(['url' => '/' . $this->url]);
     $this->links_id[] = $link->id;
     if ($link->child_exist == 1) {
         $this->getLinksId($link->id);
     }
     $ads = TorAds::find()->where(['links_id' => $this->links_id])->orderBy(['created_at' => SORT_ASC, 'price' => SORT_ASC])->limit(20)->all();
     $ads_promo = TorAds::find()->where(['links_id' => $this->links_id])->limit(5)->orderBy(['created_at' => rand()])->all();
     if ($ads) {
         echo $this->render('preview', ['ads' => $ads, 'ads_promo' => $ads_promo]);
     } else {
         echo Html::tag('div', '<em>Для заданных параметров товар не найден</em>', ['class' => 'text-center text-muted']);
     }
     $view = $this->view;
     TorAdsAsset::register($view);
 }
コード例 #14
0
ファイル: Djax.php プロジェクト: anmishael/yii2-djax
 /**
  * @inheritdoc
  */
 public function init()
 {
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     if ($this->requiresDjax()) {
         ob_start();
         ob_implicit_flush(false);
         $view = $this->getView();
         $view->clear();
         $view->beginPage();
         $view->head();
         $view->beginBody();
         if ($view->title !== null) {
             echo Html::tag('title', Html::encode($view->title));
         }
     } else {
         echo Html::beginTag('div', $this->options);
     }
 }
コード例 #15
0
 /**
  * @inheritdoc
  */
 protected function initDefaultButtons()
 {
     if (!isset($this->buttons['enumeration-action'])) {
         $this->buttons['enumeration-action'] = function ($url, $model, $key) {
             $options = array_merge(['data-method' => 'POST', 'data-pjax' => '0', 'data-url' => $this->url, 'class' => 'btn btn-default btn-enumeration'], $this->buttonOptions);
             $options['title'] = $options['aria-label'] = $this->type == static::TypeLeft ? Yii::t('easyii', 'Enumeration|MoveRight') : Yii::t('easyii', 'Enumeration|MoveLeft');
             $options['data-status'] = $this->type == static::TypeLeft ? '1' : '0';
             if ($model instanceof Enumeration2Model) {
                 $options['data-owner-id'] = $this->enumeration->owner_id;
                 $options['data-model-id'] = $model->model->primaryKey;
             } else {
                 $options['data-owner-id'] = $this->enumeration->owner_id;
                 $options['data-model-id'] = $model->primaryKey;
             }
             if ($this->type == static::TypeLeft) {
                 return Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-menu-right']), $this->url, $options);
             } else {
                 return Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-menu-left']), $this->url, $options);
             }
         };
     }
 }
コード例 #16
0
ファイル: FormFooter.php プロジェクト: sibds/yii2-formfooter
    public function run()
    {
        parent::run();
        $content = Html::submitButton($this->model->isNewRecord ? self::t('messages', 'Create') : self::t('messages', 'Update'), ['class' => $this->model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
        $jsCreateClose = <<<JS
            var action = \$(this).parents('form').attr('action');
            var submitButton =  \$(this).parent().find('button[type=submit]');
            \$(this).parents('form').attr('action', action + '&close=true');
            submitButton.click();
            return false;
JS;
        $content .= ' ' . Html::a($this->model->isNewRecord ? self::t('messages', 'Create and close') : self::t('messages', 'Update and close'), '#', ['class' => 'btn btn-default btn-sm', 'onclick' => $jsCreateClose]);
        $returnUrl = null;
        if (\Yii::$app->controller->defaultAction === null) {
            $returnUrl = \Yii::$app->user->returnUrl;
        } else {
            $returnUrl = [\Yii::$app->controller->defaultAction];
        }
        $content .= ' ' . Html::a(self::t('messages', 'Close'), $returnUrl, ['class' => 'btn btn-default btn-sm']);
        $content = Html::tag('div', $content, ['class' => 'col-sm-8']) . Html::tag('div', $this->getInfoRecord(), ['class' => 'col-sm-4 text-right']);
        return Html::tag('div', $content, ['class' => 'form-group well row']);
    }
コード例 #17
0
 /**
  * Привязка дисконтной карты
  */
 public function actionIndex()
 {
     Yii::$app->response->format = Response::FORMAT_JSON;
     $model = new DiscountCardForm();
     if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
         if (!$model->validate()) {
             return ['result' => false, 'message' => Html::errorSummary($model, ['header' => false, 'class' => 'alert alert-danger'])];
         }
         $userCard = new UserCard();
         $userCard->card = $model->fullName;
         $result = $userCard->getInfo();
         /** @var \novatorgroup\usercard\Module $module */
         $module = Yii::$app->getModule('card');
         if (isset($result->type)) {
             $module->afterCheckCard($model);
             return ['result' => true];
         } else {
             $module->errorCheckCard($model, $result->error);
             return ['result' => false, 'message' => Html::tag('div', $result->error, ['class' => 'alert alert-danger'])];
         }
     }
     return ['result' => false, 'message' => 'Ошибка привязки карты'];
 }
コード例 #18
0
ファイル: Gallery.php プロジェクト: heartshare/yii2-gallery
 /**
  * Ham tao giao dien upload anh
  * @return string
  */
 public static function generateInsertFromUrl($image)
 {
     // Image preview
     $template = Html::beginTag('div', ['class' => 'col-sm-12']);
     $template .= Html::img($image, ['id' => 'embed_image_url']);
     $template .= Html::endTag('div');
     // Caption image
     $template .= Html::beginTag('div', ['class' => 'col-sm-12 embed_field']);
     $template .= Html::beginTag('label', ['class' => 'row']);
     $template .= Html::tag('span', 'Caption', ['class' => 'col-sm-12']);
     $template .= Html::textarea('', '', ['class' => 'form-control col-sm-12']);
     $template .= Html::endTag('label');
     $template .= Html::endTag('div');
     // Alt text image
     $template .= Html::beginTag('div', ['class' => 'col-sm-12 embed_field']);
     $template .= Html::beginTag('label', ['class' => 'row']);
     $template .= Html::tag('span', 'Alt text', ['class' => 'col-sm-12']);
     $template .= Html::input('text', '', '', ['class' => 'form-control col-sm-12']);
     $template .= Html::endTag('label');
     $template .= Html::endTag('div');
     return $template;
 }
コード例 #19
0
ファイル: profile.php プロジェクト: rcjusto/simplestore
    </div>
    <div class="col-sm-6 col-sm-offset-1">
        <?php 
$form = ActiveForm::begin(['layout' => 'horizontal']);
?>
        <div style="margin-top: 50px;">
            <?php 
echo !empty($passwordInfo) ? Html::tag('div', $passwordInfo, ['class' => 'alert alert-success']) : '';
?>
            <h4><?php 
echo Yii::t('app', 'Change Your Password');
?>
</h4>
            <?php 
echo !empty($passwordError) ? Html::tag('div', $passwordError, ['class' => 'alert alert-danger']) : '';
?>
            <div class="row">
                <div class="col-xs-6">
                    <?php 
echo Html::passwordInput('password', '', ['class' => 'form-control', 'placeholder' => Yii::t('app', 'Enter new password')]);
?>
                </div>
                <div class="col-xs-6">
                    <?php 
echo Html::submitButton(Yii::t('app', 'Update Password'), ['class' => 'btn btn-primary']);
?>
                </div>
            </div>
        </div>
        <?php 
コード例 #20
0
 /**
  * @inheritdoc
  */
 public function getAsHtml()
 {
     return Yii::t('SpaceModule.notification', '{displayName} declined your membership request for the space {spaceName}', array('{displayName}' => Html::tag('strong', Html::encode($this->originator->displayName)), '{spaceName}' => Html::tag('strong', Html::encode($this->source->name))));
 }
コード例 #21
0
ファイル: 1.php プロジェクト: ramialcheikh/quickforms
echo Yii::t('update', 'Requirements');
?>
</li>
            <li class="list-group-item"><?php 
echo Yii::t('update', 'Update app');
?>
</li>
            <li class="list-group-item"><?php 
echo Yii::t('update', 'Finished');
?>
</li>
        </ul>
    </div>
    <div class="col-sm-8 form-wrapper">
        <?php 
echo Html::tag('h4', Yii::t('update', 'Choose language'), ['class' => 'step-title']);
?>
        <?php 
echo Html::beginForm('', 'post', ['class' => 'form-vertical']);
?>
        <div class="form-group">
            <?php 
// Html::label(Yii::t('update', 'Choose language'), 'language', ['class' => 'form-label'])
?>
            <?php 
echo Html::dropDownList('language', Yii::$app->language, $languages, ['class' => 'form-control']);
?>
        </div>
        <div class="form-action">
            <?php 
echo Html::submitButton(Yii::t('update', 'Save and continue'), ['class' => 'btn btn-primary']);
コード例 #22
0
ファイル: create.php プロジェクト: kalyabin/comitka
<?php

use user\models\Role as RoleForm;
use yii\bootstrap\Html;
use yii\web\View;
/* @var $this View */
/* @var $model RoleForm */
print Html::tag('h1', Yii::t('user', 'Create new role'));
print $this->render('_form', ['model' => $model]);
コード例 #23
0
ファイル: _post_card.php プロジェクト: BoBRoID/plochadka
<?php

use yii\bootstrap\Html;
use yii\helpers\Url;
echo Html::a(Html::img($post->photo), Url::to('/post/' . $post->id), ['class' => 'ad-image']) . Html::tag('div', Html::tag('span', Html::tag('div', \rmrevin\yii\fontawesome\FA::icon($post->categoryObject->image), ['style' => 'background-color: ' . $post->categoryObject->color, 'class' => 'category-icon-box']), ['class' => 'ad-category']) . Html::a($post->title, Url::to('/post/' . $post->id)) . Html::tag('div', Html::tag('span', $post->price), ['class' => 'add-price']), ['class' => 'ad-box-content']);
コード例 #24
0
ファイル: send.php プロジェクト: mark38/yii2-site-mng
    foreach ($broadcast_address as $address) {
        if ($address->user_id) {
            $user_exist = true;
            echo Html::tag('li', '<div class="checkbox">' . Html::checkbox('check_user_' . $address->id, true, ['label' => Html::tag('strong', $address->user->email) . ' &mdash; ' . $address->user->username, 'data-checkbox-address-id' => $address->id, 'class' => 'check-user', 'disabled' => Yii::$app->request->get('action') == 'send' ? true : false]) . (Yii::$app->request->get('action') == 'send' ? Html::tag('span', 'Ожидание', ['id' => 'status-' . $address->id, 'class' => 'text-danger', 'style' => 'margin-left: 15px;']) : '') . '</div>');
        }
    }
    if (!$user_exist) {
        echo Html::tag('li', '<em class="text-muted">Не заданы</em>');
    }
}
if (ArrayHelper::getColumn($broadcast_address, 'email')) {
    echo Html::tag('li', '<h3>Незарегистрированные пользователи</h3>');
    $user_exist = false;
    foreach ($broadcast_address as $address) {
        if ($address->email) {
            $user_exist = true;
            echo Html::tag('li', '<div class="checkbox">' . Html::checkbox('check_user_' . $address->id, true, ['label' => Html::tag('strong', $address->email) . ($address->fio ? ' &mdash; ' . $address->fio : ''), 'data-checkbox-address-id' => $address->id, 'class' => 'check-user', 'disabled' => Yii::$app->request->get('action') == 'send' ? true : false]) . (Yii::$app->request->get('action') == 'send' ? Html::tag('span', 'Ожидание', ['id' => 'status-' . $address->id, 'class' => 'text-danger', 'style' => 'margin-left: 15px;']) : '') . '</div>');
        }
    }
    if (!$user_exist) {
        echo Html::tag('li', '<em class="text-muted">Не заданы</em>');
    }
}
?>
        </ul>
    </div>
</div>



コード例 #25
0
ファイル: MetisNav.php プロジェクト: p2made/yii2-p2y2-things
 /**
  * Renders a widget's item.
  * @param string|array $item the item to render.
  * @return string the rendering result.
  * @throws InvalidConfigException
  */
 public function renderItems()
 {
     $items = [];
     foreach ($this->items as $i => $item) {
         if (isset($item['visible']) && !$item['visible']) {
             continue;
         }
         $items[] = $this->renderItem($item);
     }
     /**
      * Customized widget for MetisMenu navigation dropdowns to not flicker on page load
      * by precomputing if the menu should be open or not. Portions were added below to
      * add the 'collapse' css class if there is an item active within the submenu.
      */
     // Begin custom code
     $hasActive = false;
     foreach ($this->items as $i => $child) {
         if ($this->isItemActive($child)) {
             $hasActive = true;
             break;
         }
     }
     if (!$hasActive) {
         Html::addCssClass($this->options, 'collapse');
     }
     // End custom code
     return Html::tag('ul', implode("\n", $items), $this->options);
 }
コード例 #26
0
ファイル: index.php プロジェクト: BoBRoID/new.k-z
                            <button type="button" class="btn btn-default btn-sm checkUnpublish"><i class="fa fa-eye-slash"></i></button>
                        </div>
                        <button type="button" class="btn btn-default btn-sm checkSeed"><i class="fa fa-check"></i></button>', 'footer' => '<div class="btn-group">
                            <button type="button" class="btn btn-default btn-sm checkDeleted"><i class="fa fa-trash-o"></i></button>
                            <button type="button" class="btn btn-default btn-sm checkPublish"><i class="fa fa-eye"></i></button>
                            <button type="button" class="btn btn-default btn-sm checkUnpublish"><i class="fa fa-eye-slash"></i></button>
                        </div>
                        <button type="button" class="btn btn-default btn-sm checkSeed"><i class="fa fa-check"></i></button>'], 'panelTemplate' => '<div class="panel {type}">{panelHeading}{items}{panelFooter}<div class="text-center">{pager}</div></div>', 'panelFooterTemplate' => '{footer}<div class="clearfix"></div>', 'dataProvider' => $comments, 'bordered' => false, 'summary' => false, 'hover' => true, 'id' => 'commentsGrid', 'pjax' => true, 'pjaxSettings' => ['linkSelector' => '#commentsGrid .pagination a'], 'striped' => false, 'layout' => '{items}', 'containerOptions' => ['class' => 'box-body table-responsive no-padding'], 'resizableColumns' => false, 'columns' => [['class' => \kartik\grid\CheckboxColumn::className()], ['format' => 'raw', 'attribute' => 'author', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE, 'value' => function ($model) {
    return Html::tag('span', $model->author, ['title' => "IP: {$model->ip} email: {$model->email}", 'data-toggle' => 'tooltip']);
}], ['label' => 'Статья', 'format' => 'raw', 'value' => function ($model) {
    if (empty($model->news)) {
        return 'отсутствует';
    }
    return Html::a($model->news->title, '/news/show/' . $model->news->id, ['class' => 'longLink newsTitle']);
}], ['attribute' => 'text', 'format' => 'html', 'hAlign' => GridView::ALIGN_LEFT, 'vAlign' => GridView::ALIGN_MIDDLE, 'value' => function ($model) {
    return Html::tag('span', $model->text, ['class' => 'longLink commentText']);
}], ['attribute' => 'date', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE, 'value' => function ($model) {
    return \Yii::$app->formatter->asRelativeTime($model->date);
}], ['header' => ' ', 'width' => '100px', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE, 'class' => \kartik\grid\ActionColumn::className(), 'buttons' => ['view' => function ($key, $model) {
    return Html::button(FA::i($model->published == 1 ? 'eye' : 'eye-slash'), ['class' => 'publishComment btn btn-sm btn-default']);
}, 'update' => function ($model) {
    return Html::button(FA::i('pencil'), ['class' => 'editComment btn btn-sm btn-default']);
}], 'template' => Html::tag('div', '{view}{update}', ['class' => 'btn-group btn-group-sm'])]]]);
?>
            </div>
        </div>
    </div>
</div>
<?php 
\yii\widgets\Pjax::end();
echo $this->render('editModal', ['model' => new \backend\modules\comments\models\CommentForm()]);
コード例 #27
0
ファイル: view.php プロジェクト: nagser/users
?>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="panel">
            <div class="panel-heading">
                <span class="panel-title"><?php 
echo Yii::t('user', 'Profile');
?>
</span>
                <span class="panel-controls">
                    <?php 
echo \yii\bootstrap\Html::a(\yii\bootstrap\Html::tag('i', '', ['class' => 'fa fa-pencil-square-o']), ['update-profile', 'id' => $user->id]);
?>
                </span>
            </div>
            <div class="panel-body pn">
                <table class="table mbn tc-icon-1 tc-med-2 tc-bold-last">
                    <tr>
                        <td><i class="fa fa-map-marker"></i></td>
                        <td><?php 
echo $user->profile->getAttributeLabel('location');
?>
</td>
                        <td><?php 
echo $user->profile->location;
?>
</td>
コード例 #28
0
ファイル: index.php プロジェクト: BoBRoID/plochadka
}]);
?>
            </div>

            <?php 
echo ListView::widget(['options' => ['class' => 'pane', 'style' => 'display: none'], 'summary' => false, 'dataProvider' => $postsDataProvider, 'itemView' => function ($post) {
    return $this->render('index/_post_line', ['post' => $post]);
}]);
?>
        </div>
    </div>
</section>
<section id="categories-homepage">
    <div class="container">
        <?php 
echo Html::tag('h3', \Yii::t('site', 'Browse our {adsCount} Ads from {categoriesCount, plural, one{one category} other{# categories}}', ['adsCount' => '22', 'categoriesCount' => '1']));
?>

        <?php 
echo ListView::widget(['dataProvider' => new ArrayDataProvider(['models' => $categories]), 'options' => ['class' => 'full'], 'summary' => false, 'itemView' => function ($model, $key, $counter) {
    $counter = $counter - 1;
    return $this->render('index/category', ['category' => $model, 'current' => $counter - 1]);
}]);
?>
        <div class="full">

        <?php 
$current = 0;
\rmrevin\yii\fontawesome\cdn\AssetBundle::register($this);
foreach ($categories as $category) {
    echo $this->render('index/category', ['category' => $category, 'current' => $current]);
コード例 #29
0
ファイル: 3.php プロジェクト: ramialcheikh/quickforms
echo Yii::t('setup', 'Install app');
?>
</li>
            <li class="list-group-item"><?php 
echo Yii::t('setup', 'Create admin account');
?>
</li>
            <li class="list-group-item"><?php 
echo Yii::t('setup', 'Finished');
?>
</li>
        </ul>
    </div>
    <div class="col-sm-8 form-wrapper">
        <?php 
echo Html::tag('h4', Yii::t('setup', 'Database Configuration'), ['class' => 'step-title']);
?>
        <p><?php 
echo Yii::t('setup', "To set up your Easy Forms database, enter the following information.");
?>
</p>
        <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
?>
        <?php 
echo $form->field($model, 'db_name')->hint(Yii::t('setup', 'The name of the database where your data will be stored in. It must exist on your server before Easy Forms can be installed.'));
?>
        <?php 
echo $form->field($model, 'db_user');
?>
        <?php 
コード例 #30
0
 * and open the template in the editor.
 */
?>
<div class="container-fluid">
<?php 
$workListArr = ArrayHelper::map($workList, 'id', 'name', 'teacher.user.fullname');
$teachersArr = ArrayHelper::map($teachers, 'id', 'user.fullname');
$disabledWorks = array();
foreach ($workList as $work) {
    if ($work->isReserved) {
        $disabledWorks[$work->id] = ['disabled' => true];
    }
}
echo Html::tag('h2', 'Начать работу');
Pjax::begin(['enablePushState' => false, 'id' => 'begin-graduate']);
echo Html::tag('h4', 'Выберите интересующую вас тему из списка уже существующих, либо предложите свою.');
$form = ActiveForm::begin(['id' => 'begin-graduate-form', 'options' => ['class' => 'form-horizontal', 'data-pjax' => true]]);
?>

<div class="form-group">
    <?php 
echo Html::label('Список тем');
?>
    <?php 
echo Html::listBox('workList', null, $workListArr, ['class' => 'form-control', 'options' => $disabledWorks]);
?>
</div>
<div class="form-group">
    <?php 
echo Html::label('Новая тема');
?>