示例#1
2
 public function run()
 {
     $label = Html::activeLabel($this->translations[0], $this->fieldName, ['class' => 'control-label']);
     $tabs = Tabs::widget(['encodeLabels' => false, 'items' => $this->_tabItems, 'options' => ['class' => 'translation-tabs']]);
     $content = Html::tag('div', $label . $tabs, ['class' => 'form-group nav-tabs-custom language-tabs']);
     return $content;
 }
示例#2
1
 public function run()
 {
     $items = [];
     $preContent = '';
     $isPost = \Yii::$app->request->isPost;
     $defaultLang = Lang::getLang()->code;
     foreach ($this->models as $k => $model) {
         $preContent .= $isPost && !$model->validate() ? '<div class="alert alert-warning" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4>' . $model->langModel->title . '</h4>' . Html::errorSummary($model) . '</div>' : '';
         $content = $this->view->render($this->template, ['model' => $model, 'k' => $k, 'form' => $this->form]);
         $items[] = ['label' => $model->langModel->title, 'content' => $content, 'active' => $model->lang == $defaultLang];
     }
     return $preContent . Tabs::widget(['items' => $items]);
 }
 public static function renderModal()
 {
     $btnClose = Html::button(Html::tag('span', '&times', ['aria-hidden' => 'true']), ['class' => 'close', 'data-dismiss' => 'modal', 'aria-label' => "Close"]);
     $modalTitle = Html::tag('h4', Yii::t('filemanager', 'Media Gallery'), ['class' => 'modal-title', 'id' => 'fm-modal-label']);
     $modalHeader = Html::tag('div', $btnClose . $modalTitle, ['class' => 'modal-header']);
     $tab = Tabs::widget(['items' => [['label' => Yii::t('filemanager', 'Media Gallery'), 'linkOptions' => ['id' => 'fm-upload-tab', 'data-url' => \yii\helpers\Url::to(['/filemanager/files/upload-tab'])]], ['label' => Yii::t('filemanager', 'Library'), 'linkOptions' => ['id' => 'fm-library-tab', 'data-url' => \yii\helpers\Url::to(['/filemanager/files/library-tab'])]]]]);
     $modalBody = Html::tag('div', $tab, ['class' => 'modal-body', 'style' => 'min-height: 560px;']);
     $modalContent = Html::tag('div', $modalHeader . $modalBody, ['class' => 'modal-content']);
     $modalHtml = Html::tag('div', Html::tag('div', $modalContent, ['class' => 'modal-dialog modal-lg', 'role' => 'document']), ['class' => 'fm-modal modal fade', 'id' => "fm-modal", 'tabindex' => "-1", 'role' => "dialog", 'aria-labelledby' => "fm-modal-label"]);
     return $modalHtml;
 }
示例#4
0
文件: TabsTest.php 项目: glowdan/yii2
 /**
  * Each tab should have a corresponding unique ID
  *
  * @see https://github.com/yiisoft/yii2/issues/6150
  */
 public function testIds()
 {
     Tabs::$counter = 0;
     $out = Tabs::widget(['items' => [['label' => 'Page1', 'content' => 'Page1'], ['label' => 'Dropdown1', 'items' => [['label' => 'Page2', 'content' => 'Page2'], ['label' => 'Page3', 'content' => 'Page3']]], ['label' => 'Dropdown2', 'items' => [['label' => 'Page4', 'content' => 'Page4'], ['label' => 'Page5', 'content' => 'Page5']]]]]);
     $page1 = 'w0-tab0';
     $page2 = 'w0-dd1-tab0';
     $page3 = 'w0-dd1-tab1';
     $page4 = 'w0-dd2-tab0';
     $page5 = 'w0-dd2-tab1';
     $shouldContain = ['w0', "#{$page1}", 'w1', "{$page2}", "{$page3}", 'w2', "#{$page4}", "#{$page5}", "id=\"{$page1}\"", "id=\"{$page2}\"", "id=\"{$page3}\"", "id=\"{$page4}\"", "id=\"{$page5}\""];
     foreach ($shouldContain as $string) {
         $this->assertContains($string, $out);
     }
 }
 /**
  * @inheritdoc
  */
 public function run()
 {
     $items = [];
     /** @var \DevGroup\Multilingual\Multilingual $multilingual */
     $multilingual = Yii::$app->get('multilingual');
     $languages = $multilingual->getAllLanguages();
     foreach ($languages as $index => $language) {
         $flag = $language->iso_639_1 === 'en' ? 'gb' : $language->iso_639_1;
         $items[] = ['label' => '<span class="flag-icon flag-icon-' . $flag . '"></span> ' . $language->name, 'active' => $index === 0, 'content' => $this->renderFile($this->childView, ['model' => $this->model->getTranslation($language->id), 'form' => $this->form, 'language' => $language, 'language_id' => $language->id, 'attributePrefix' => "[{$language->id}]"])];
     }
     FlagIconAsset::register($this->view);
     $items = ArrayHelper::merge($items, $this->additionalTabs);
     return "<div class=\"nav-tabs-custom {$this->tagClass}\">" . Tabs::widget(['items' => $items, 'options' => $this->options, 'encodeLabels' => false]) . $this->footer . '</div>';
 }
示例#6
0
 /**
  * @inheritdoc
  */
 public function render($params = [])
 {
     if (!empty($params['tabbed'])) {
         $tabs = [];
         foreach ($this->items as $item) {
             if ($item instanceof Tab) {
                 $tabs[] = ['label' => $item->getLabel(), 'content' => $item->render($params)];
             }
         }
         $output = Html::beginTag('div', ['class' => 'nav-tabs-custom']);
         $output .= Tabs::widget(['items' => $tabs]);
         $output .= Html::endTag('div');
         return $output;
     } else {
         return parent::render($params);
     }
 }
示例#7
0
 protected function getNavigation()
 {
     $new = $this->model->hasNew();
     switch ($new >= 1) {
         case true:
             $newMessage = $new . " new messages";
             $newClass = "bg-success";
             break;
         default:
             $newMessage = 'No new messages';
             $newClass = "bg-transparent";
             break;
     }
     $uniqid = uniqid();
     $ret_val = Tabs::widget(['options' => ['id' => 'nitm-chat-widget' . $uniqid], 'encodeLabels' => false, 'items' => [['label' => 'Messages ' . Html::tag('span', $this->model->hasNew(), ['class' => 'badge']), 'active' => false, 'content' => Html::tag('div', '', ['id' => 'chat-widget-container' . $uniqid, 'role' => 'chatParent', 'id' => 'chat' . $uniqid, 'class' => 'chat col-md-4 col-lg-4', 'style' => 'z-index: 10000; position: fixed;top: 6px; right: 6px;bottom: 40px;overflow: hidden;padding: 0px;box-shadow: 2px 2px 15px #000; background-color: rgba(153,153,153,0.9);']), 'options' => ['id' => 'chat-widget-messages' . $uniqid], 'headerOptions' => ['id' => 'chat-widget-messages-tab' . $uniqid], 'linkOptions' => ['role' => 'visibility', 'data-type' => 'html', 'data-on' => '#chat-widget-messages' . $uniqid . ':hidden', 'data-id' => '#chat' . $uniqid, 'data-url' => \Yii::$app->urlManager->createUrl(['/reply/index/chat/0', '__format' => 'html', \nitm\widgets\models\Replies::FORM_PARAM => true]), 'id' => 'chat-widget-messages-link' . $uniqid]], ['label' => '', 'content' => '', 'active' => true, 'headerOptions' => ['class' => 'hidden']]]]);
     if (isset($this->updateOptions['enable']) && $this->updateOptions['enable']) {
         $ret_val .= Html::script("\$nitm.module('replies').initChatActivity(\"[role='chatParent']\", '" . $this->updateOptions['url'] . "', " . $this->updateOptions['interval'] . ")");
     }
     return $ret_val;
 }
示例#8
0
$fields[] = $form->field($model, 'stock_qty')->textInput();
$fields[] = $form->field($model, 'min_sale_qty')->textInput();
$fields[] = $form->field($model, 'max_sale_qty')->textInput();
$fields[] = $form->field($model, 'weight')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'shipping_fee')->textInput(['maxlength' => 10]);
$fields[] = $form->field($model, 'is_free_shipping')->checkbox();
$fieldGroups[] = ['label' => 'Price & Stock', 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'pictures')->widget(InputFile::className(), ['multiple' => true, 'template' => '<div class="input-group">{input}<span class="input-group-btn">{button}</span></div>', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default']]);
$categories = \kiwi\Kiwi::getCategory()->find()->all();
$categories = ArrayHelper::map($categories, 'id', 'name');
$fields[] = $form->field($model, 'categoryIds')->widget(Select2::classname(), ['data' => $categories, 'language' => 'en', 'options' => ['placeholder' => 'Select a state ...'], 'options' => ['multiple' => true]]);
$tags = \kiwi\Kiwi::getTag()->find()->all();
$tags = ArrayHelper::map($tags, 'id', 'name');
$fields[] = $form->field($model, 'tagIds')->widget(Select2::classname(), ['data' => $tags, 'language' => 'en', 'options' => ['placeholder' => 'Select a state ...'], 'options' => ['multiple' => true]]);
$fieldGroups[] = ['label' => 'Picture & Category & Tag', 'content' => implode('', $fields)];
echo Tabs::widget(['items' => $fieldGroups]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
示例#9
0
?>
<p class='pull-left'>
</p>
<p class='pull-right'>
  <?php 
echo \yii\helpers\Html::a('New City', ['city/create', 'City' => ['country_id' => $model->country_id]], ['class' => 'btn btn-default btn-xs']);
?>
  <?php 
echo \yii\helpers\Html::a('List All Cities', ['city/index'], ['class' => 'btn btn-default btn-xs']);
?>
</p><div class='clearfix'></div>
<?php 
Pjax::begin();
echo \yii\grid\GridView::widget(['dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getCities(), 'pagination' => ['pageSize' => 10]]), 'columns' => ['city_id', 'city', ["class" => yii\grid\DataColumn::className(), "attribute" => "country_id", "value" => function ($model) {
    if ($rel = $model->getCountry()->one()) {
        return yii\helpers\Html::a($rel->country_id, ["country/view", "id" => $rel->country_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'buttons' => [], 'controller' => 'city']]]);
Pjax::end();
$this->endBlock();
?>


    <?php 
echo \yii\bootstrap\Tabs::widget(['encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Country', 'content' => $this->blocks['schmunk42\\sakila\\models\\Country'], 'active' => true], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Cities</small>', 'content' => $this->blocks['Cities'], 'active' => false]]]);
?>
</div>

示例#10
0
<?php

//	namespace app\controllers;
//	use Yii;
use app\models\Users;
use app\assets\SiteAsset;
use yii\bootstrap\Tabs;
//SiteAsset::register($this);
//$this->registerJsFile('/fingers_server/js/views/websocket.js', ['depends' => [\yii\web\JqueryAsset::className()]]);
//$this->registerCssFile('/finger_cod/css/site.css');
/* @var $this yii\web\View */
$this->title = 'My Yii Application';
?>
<div class="view">

Главная страница

</div>


<?php 
echo Tabs::widget(['items' => [['label' => 'Yii2', 'content' => '<h2>Фреймворк Yii 2 - один из самых быстрых, безопасных и "крутых" php-фреймворков.</h2>', 'active' => true], ['label' => 'jQuery', 'content' => '<h2>jQuery - один из самых популярных JavaScript фреймворков, который работает с объектами DOM.</h2>'], ['label' => 'Bootstrap', 'content' => '<h2>Twitter Bootstrap - супер фреймворк, объединяющий в себе html, css, и JavaScript для для верстки веб-интерфейсов и страниц.</h2>', 'headerOptions' => ['id' => 'headerOptions'], 'options' => ['id' => 'options']], ['label' => 'Еще табы', 'content' => '<h2>Вы можете добавить любое количество табов. Просто опишите их структуру в массиве.</h2>'], ['label' => 'Выпадающий список табов', 'items' => [['label' => 'Первый таб из выпадающего списка', 'content' => '<h2>Обновите свои познания в Yii 2 and Twitter Bootstrap. Все возможнсти уже обернуты в удобные интерфейсы.</h2>'], ['label' => 'Второй таб из выпадающего списка', 'content' => '<h2>Один в поле не воин, а двое - уже компания.</h2>'], ['label' => 'Это третий таб из выпадающего списка', 'content' => '<h2>Третий не лишний!</h2>']]]]]);
示例#11
0
<?php

use yii\bootstrap\Tabs;
echo Tabs::widget(['items' => [['label' => 'One', 'content' => 'Anim pariatur cliche...', 'active' => true], ['label' => 'Two', 'content' => 'Anim pariatur cliche...', 'headerOptions' => [''], 'options' => ['id' => 'myveryownID']], ['label' => 'Dropdown', 'items' => [['label' => 'DropdownA', 'content' => 'DropdownA, Anim pariatur cliche...'], ['label' => 'DropdownB', 'content' => 'DropdownB, Anim pariatur cliche...']]]]]);
示例#12
0
文件: form.php 项目: vsguts/crm
<?php

use yii\helpers\Html;
use yii\bootstrap\Tabs;
use app\widgets\ActiveForm;
use app\widgets\ButtonsContatiner;
$form = ActiveForm::begin(['id' => 'partner_form', 'options' => ['enctype' => 'multipart/form-data']]);
$tab_items = [['label' => __('General'), 'content' => $this->render('form_general', ['form' => $form, 'model' => $model]), 'active' => true], ['label' => __('Address'), 'content' => $this->render('form_address', ['form' => $form, 'model' => $model])], ['label' => __('Images'), 'content' => $this->render('form_images', ['form' => $form, 'model' => $model])]];
if (!$model->isNewRecord) {
    $tab_items[] = ['label' => __('Visits'), 'content' => $this->render('/visit/components/grid', ['dataProvider' => $extra['visitsDataProvider'], 'partnerId' => $model->id])];
    $tab_items[] = ['label' => __('Donates'), 'content' => $this->render('/donate/components/grid', ['dataProvider' => $extra['donatesDataProvider'], 'partnerId' => $model->id])];
    $tab_items[] = ['label' => __('Tasks'), 'content' => $this->render('/task/components/grid', ['dataProvider' => $extra['tasksDataProvider'], 'partnerId' => $model->id])];
    $tab_items[] = ['label' => __('Contact persons'), 'headerOptions' => ['class' => 'app-dtoggle-type-n1', 'style' => $model->type == 3 ? 'display: none;' : ''], 'content' => $this->render('/partner/components/grid', ['dataProvider' => $extra['contactsDataProvider'], 'partnerId' => $model->id])];
}
echo Tabs::widget(['options' => ['id' => 'partner_tabs', 'class' => 'app-tabs-save'], 'items' => $tab_items]);
// echo ButtonsContatiner::widget(['model' => $model]);
ActiveForm::end();
示例#13
0
文件: _form.php 项目: skamnev/members
?>

    <?php 
echo $form->field($model, 'attribute_id')->hiddenInput()->label(false);
?>

    <?php 
$language_items = [];
foreach ($languages as $key => $language) {
    $field = $form->field($model, "title_{$language->url}")->textInput(['maxlength' => true])->label('Title');
    if ($languageDefault->url == $language->url) {
        $field = $form->field($model, "title")->textInput(['maxlength' => true]);
    }
    $language_items[] = ['label' => Yii::t('backend', $language->name), 'content' => "<p>{$field}</p>", 'active' => $key == 0];
}
echo Tabs::widget(['items' => $language_items]);
?>

    <?php 
echo $form->field($model, 'order')->textInput();
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
示例#14
0
?>
        <p>
            
			<?php 
echo $form->field($model, 'actor_id')->dropDownList(\yii\helpers\ArrayHelper::map(schmunk42\sakila\models\Actor::find()->all(), 'actor_id', 'label'), ['prompt' => 'Choose...']);
?>
			<?php 
echo $form->field($model, 'film_id')->dropDownList(\yii\helpers\ArrayHelper::map(schmunk42\sakila\models\Film::find()->all(), 'film_id', 'title'), ['prompt' => 'Choose...']);
?>
        </p>
        <?php 
$this->endBlock();
?>
        
        <?php 
echo \yii\bootstrap\Tabs::widget(['encodeLabels' => false, 'items' => [['label' => 'FilmActor', 'content' => $this->blocks['main'], 'active' => true]]]);
?>
        <hr/>

        <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-check"></span> ' . ($model->isNewRecord ? 'Create' : 'Save'), ['class' => $model->isNewRecord ? 'btn btn-primary' : 'btn btn-primary']);
?>

        <?php 
ActiveForm::end();
?>

    </div>

</div>
示例#15
0
    if (count($model->players_list) > 0) {
        $tab_items[] = ['label' => Yii::t('app', 'Players'), 'content' => $this->render('_form-players', ['model' => $model, 'form' => $form])];
    }
    $tab_items[] = ['label' => Yii::t('app', 'Heroes'), 'content' => $this->render('_form-heroes', ['model' => $model, 'form' => $form])];
    //var_dump($model->dotaEventPlayers);die;
    if (count($model->dotaEventPlayers) > 0) {
        $tab_items[] = ['label' => Yii::t('app', 'Players Stat'), 'content' => $this->render('_form-players-stat', ['model' => $model, 'form' => $form, 'dataProviderPlayersStat' => $dataProviderPlayersStat, 'last_update_info' => $last_update_info])];
    }
    if (count($model->dotaEventHeroes) > 0) {
        $tab_items[] = ['label' => 'Heroes Stat', 'content' => $this->render('_form-heroes-stat', ['model' => $model, 'form' => $form, 'dataProvider' => $dataProviderHeroesStat, 'last_update_info' => $last_update_info])];
    }
}
?>
	    
		<?php 
echo Tabs::widget(['items' => $tab_items]);
?>
    



    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'name' => 'task', 'value' => 'save']);
?>
        <?php 
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-info', 'name' => 'task', 'value' => 'apply']);
?>

    </div>
示例#16
0
<?php

/* @var $panel yii\debug\panels\RequestPanel */
use yii\bootstrap\Tabs;
echo "<h1>Request</h1>";
echo Tabs::widget(['items' => [['label' => 'Parameters', 'content' => $this->render('table', ['caption' => 'Routing', 'values' => ['Route' => $panel->data['route'], 'Action' => $panel->data['action'], 'Parameters' => $panel->data['actionParams']]]) . $this->render('table', ['caption' => '$_GET', 'values' => $panel->data['GET']]) . $this->render('table', ['caption' => '$_POST', 'values' => $panel->data['POST']]) . $this->render('table', ['caption' => '$_FILES', 'values' => $panel->data['FILES']]) . $this->render('table', ['caption' => '$_COOKIE', 'values' => $panel->data['COOKIE']]) . $this->render('table', ['caption' => 'Request Body', 'values' => $panel->data['requestBody']]), 'active' => true], ['label' => 'Headers', 'content' => $this->render('table', ['caption' => 'Request Headers', 'values' => $panel->data['requestHeaders']]) . $this->render('table', ['caption' => 'Response Headers', 'values' => $panel->data['responseHeaders']])], ['label' => 'Session', 'content' => $this->render('table', ['caption' => '$_SESSION', 'values' => $panel->data['SESSION']]) . $this->render('table', ['caption' => 'Flashes', 'values' => $panel->data['flashes']])], ['label' => '$_SERVER', 'content' => $this->render('table', ['caption' => '$_SERVER', 'values' => $panel->data['SERVER']])]]]);
示例#17
0
文件: update.php 项目: vsguts/crm
<?php

use yii\helpers\Html;
use yii\bootstrap\Tabs;
use app\widgets\ActiveForm;
use app\widgets\ButtonsContatiner;
use app\widgets\Modal;
if ($model->isNewRecord) {
    $obj_id = 'user-role_create';
    $header = __('Create user role');
} else {
    $obj_id = 'user-role_' . $model->name;
    $header = __('User role: {role}', ['role' => $model->description]);
}
$form_id = $obj_id . '_form';
Modal::begin(['size' => Modal::SIZE_LARGE, 'header' => $header, 'id' => $obj_id, 'footer' => ButtonsContatiner::widget(['model' => $model, 'footerWrapper' => false, 'removeLink' => false, 'form' => $form_id])]);
$form = ActiveForm::begin(['options' => ['id' => $form_id]]);
echo Tabs::widget(['options' => ['id' => $form_id . '_tabs', 'class' => 'app-tabs-save'], 'items' => [['label' => __('General'), 'content' => $this->render('components/form_general', ['form' => $form, 'model' => $model])], ['label' => __('Permissions'), 'content' => $this->render('components/form_permissions', ['form' => $form, 'model' => $model])], ['label' => __('Inherited roles'), 'content' => $this->render('components/form_inherit', ['form' => $form, 'model' => $model])]]]);
ActiveForm::end();
Modal::end();
示例#18
0
    <div class="alert alert-success alert-dismissable" style="margin-top:1em;">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <?php 
    echo Html::encode($message);
    ?>
    </div>
<?php 
}
?>
<h3>
    添加新文章分类
    <div class="pull-right">
        <?php 
echo Html::a('返回文章分类列表', ['index'], ['class' => 'btn btn-sm btn-default']);
?>
    </div>
</h3>
<?php 
$form = ActiveForm::begin(['enableClientValidation' => false]);
$tab1 = $form->field($model, 'name')->textInput();
$tab1 .= $form->field($model, 'sort_order')->textInput();
echo Tabs::widget(['items' => [['label' => '主要内容', 'options' => ['style' => 'padding:1em;'], 'content' => $tab1, 'active' => true]]]);
echo Html::a('清 空', ['create'], ['class' => 'btn btn-default']);
?>

<?php 
echo Html::submitButton('提 交', ['class' => 'btn btn-success']);
?>

<?php 
ActiveForm::end();
示例#19
0
            <div class="list-group-item"><?php 
echo Html::tag('dt', "Специальность");
echo Html::tag('dd', $student->group->speciality->name);
?>
</div>
        </dl>
    </div>    
<?php 
$this->endBlock('info');
$this->beginBlock('stat');
?>
    <div class="list-group">
            <?php 
echo "<div class='list-group-item list-group-item-info'><span class='badge'>{$student->gpa}</span>Средний балл</div>";
foreach ($student->taskStat as $stat) {
    if (Yii::$app->user->identity->student->tasksCount) {
        $taskPercent = round($stat['value'] / $student->tasksCount * 100, 2);
    } else {
        $taskPercent = $student->tasksCount;
    }
    echo "<div class='list-group-item '><span class='badge'>{$stat['value']} ({$taskPercent}%)</span>{$stat['status']}</div>";
}
echo "<div class='list-group-item list-group-item-info'><span class='badge'>{$student->tasksCount}</span>Всего получено заданий</div>";
?>
    </div>    
<?php 
$this->endBlock('stat');
echo Tabs::widget(['options' => ['class' => 'nav nav-pills nav-justified'], 'items' => [['label' => 'Личные данные', 'content' => $this->blocks['info']], ['label' => 'Статистика заданий', 'content' => $this->blocks['stat']]]]);
?>

示例#20
0
#			'label'=>'Vorschau',
#			'id'=>'preview',
#			'visible'=>true,
#			'icon'=>'fa-search',
#			'url'=>''
#		],
#	],
#	'btnOptions'=>[
#		'style'=>'width:180px;'
#	]
#]);
//------------------------------------------------------------------
?>
		</div>
	</div>
	<br/>
	<div class="abstract" id='tabs-detail'>
		<?php 
echo Tabs::widget(['options' => ['class' => 'nav-justified'], 'items' => [['label' => 'Zusammenfassung', 'content' => $model->file->file['metadata']['ZUSAMMENFASSUNG'], 'options' => ['class' => 'panel-body']], ['label' => 'Summary', 'content' => 'Inhalt'], ['label' => 'Resume', 'content' => 'Inhalt']]]);
?>
	</div>
</article>
<!-- modal-dialog -->
<div class="modal fade" id="photo-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<img src="" style="max-width: 550px;"/>
	</div>
</div>
<!-- /.modal-dialog -->
<?php 
$this->registerJs("\n\$('a.ximage').click(function(e){\n\te.preventDefault();\n\tvar imgPath = \$(this).data('imgpath');\n\t\$('#photo-modal img').attr('src', imgPath);\n\t\$('#photo-modal').modal('show');\n});\n// Schliessen des Modalfenster wenn das Bild offen ist ---------------------\n\$('img').on('click', function(){\n\t\$('#photo-modal').modal('hide')\n});\t\n");
示例#21
0
文件: _hasil.php 项目: cakpep/spk-tht
            <div class="alert alert-info">
                <div class="row">
                    <div class="col-md-6">
                        <center>
                            Dari hasil perhitungan diagnosa, POIN tertinggi CF anda <p><strong> <?php 
echo $diagnosa->cfMax($cfmax, 'max');
?>
 </strong><p>
                            dari hasil perhitungan anda terkena penyakit <p><strong><?php 
echo $cfmaxp[$diagnosa->cfMax($cfmax, 'key')];
?>
</strong>  </p>      
                        </center>
                    </div>
                    <div class="col-md-6">
                            <?php 
echo Html::a('<i class="glyphicon glyphicon-fullscreen"></i>  Cara pencegahan/pengobatan <br> dan detil ' . $cfmaxp[$diagnosa->cfMax($cfmax, 'key')], ['diagnosa/info', 'penyakit' => $cfmaxp[$diagnosa->cfMax($cfmax, 'key')]], ['class' => 'btn btn-primary btn-flat', 'data-toggle' => "modal", 'data-target' => "#myModal", 'data-title' => '<i class=\'glyphicon glyphicon-file\'></i> Informasi, Pencegahan dan Pengobatan ' . $cfmaxp[$diagnosa->cfMax($cfmax, 'key')]]);
?>
                    </div>        
                </div>
            </div>
            
                    <?php 
echo Tabs::widget(['items' => [['label' => 'Keterangan', 'content' => $this->render('_ket'), 'options' => ['id' => 'ket'], 'active' => true], ['label' => 'Tabel Ukuran Ketidakpastian', 'options' => ['id' => 'Tabel'], 'content' => $this->render('_tab_certanty_term', ['uncertantyTerm' => $uncertantyTerm])]]]);
?>
             
                
        
    </div>    
</div>          
<?php

/**
 * @var $this \yii\web\View
 */
use yii\bootstrap\Tabs;
$this->beginBlock('basicCurrenciesConfig');
echo '<div class="box-body">';
echo $form->field($model, 'currenciesStorage');
echo $form->field($model, 'providersStorage');
echo $form->field($model, 'currenciesCacheKey');
echo $form->field($model, 'providersCacheKey');
echo '</div>';
$this->endBlock('basicCurrenciesConfig');
echo Tabs::widget(['items' => [['label' => Yii::t('dotplant.currencies', 'Extension settings'), 'content' => $this->blocks['basicCurrenciesConfig']], ['label' => Yii::t('dotplant.currencies', 'Currencies'), 'content' => $this->render('@vendor/dotplant/currencies/src/views/_currencies')], ['label' => Yii::t('dotplant.currencies', 'Providers'), 'content' => $this->render('@vendor/dotplant/currencies/src/views/_providers')]]]);
示例#23
0
文件: index.php 项目: KokLip/GST
    $delete = '';
}
?>
<div class="tax-index">

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

    <p>
        <?php 
echo $accessCreate != NULL ? Html::a('Create Tax', ['create'], ['class' => 'btn btn-success']) : '';
?>
    </p>
	
	<?php 
echo Tabs::widget(['items' => [['label' => 'Supply Tax', 'url' => ['tax/index']], ['label' => 'Purchase Tax', 'url' => ['tax/purchase']]]]);
?>

    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'tax_code', 'options' => ['width' => '100']], ['attribute' => 'tax_rate', 'options' => ['width' => '100']], ['attribute' => 'tax_description', 'options' => ['width' => '700']], ['class' => 'yii\\grid\\ActionColumn', 'template' => $view . ' ' . $update . ' ' . $delete, 'buttons' => ['view' => function ($url, $model) {
    return Html::a('<span class="fa fa-search"></span>View', $url, ['title' => Yii::t('app', 'View'), 'class' => 'btn btn-primary btn-xs']);
}]]]]);
?>

</div>
示例#24
0
    <?php 
$this->endBlock();
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('MenuItem', 'Create') : Yii::t('MenuItem', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>

        <?php 
if (!$model->isNewRecord) {
    echo Html::a(Yii::t('MenuItem', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('MenuItem', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
    echo Html::a(Yii::t('MenuItem', 'Create'), ['create', 'root_id' => $model->parent_id], ['class' => 'btn btn-success']);
}
?>
        <?php 
echo Html::a(Yii::t('MenuItem', 'Каталог'), ['index'], ['class' => 'btn btn-info']);
?>
    </div>

    <?php 
echo Tabs::widget(['items' => [['label' => 'Основные', 'content' => $this->blocks['basic'], 'active' => true], ['label' => 'Настроить порядок', 'content' => $this->render('_position', ['model' => $model, 'menuItems' => $model->neighbors]), 'visible' => !$model->isNewRecord && (bool) $model->neighbors, 'options' => ['id' => 'tab2']]]]);
?>

    <?php 
ActiveForm::end();
?>

</div>
示例#25
0
文件: model.php 项目: kd-brinex/kd
                </div>
            </div>
            <?php 
echo $this->render('_search_vin', ['params' => $params]);
?>
            <?php 
echo $this->render('_search_frame', ['params' => $params]);
?>
        </div>
        <div class="container">
            <?php 
foreach ($regionList as $code => $reg) {
    $items[] = ['label' => $reg, 'content' => 'Models list', 'active' => $params['region'] == $code, 'url' => '/' . $marka . '?region=' . $code, 'options' => ['class' => 'acatalog-tabs']];
}
echo Tabs::widget(['items' => $items]);
echo $this->render('_index_group_model', ['data' => $data, 'params' => $params]);
?>

        </div>
    </div>
    <?php 
//    GridView::widget([
//        'dataProvider' => $dataProvider,
//
//        'columns' => [
////            ['class' => 'yii\grid\SerialColumn'],
//            'catalog',
////            'f1',
////            [
////                'attribute'=>'catalog_code',
示例#26
0
        <?php 
echo $model->id;
?>
    </h3>


    <?php 
$this->beginBlock('app\\models\\Event');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'user:ntext', 'action', 'paramint', 'paramfloat', 'paramstring', 'paramtext:ntext', 'paramdate', 'paramdatetwo', 'paramdatethree', 'paramdateint', 'mod_table', 'mod_id', 'created_at', 'updated_at', 'deleted_at']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => Yii::t('app', 'Are you sure to delete this item?'), 'data-method' => 'post']);
?>

    <?php 
$this->endBlock();
?>


    
    <?php 
echo \yii\bootstrap\Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Event', 'content' => $this->blocks['app\\models\\Event'], 'active' => true]]]);
?>
</div>
示例#27
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use app\modules\admin\Module;
use yii\bootstrap\Tabs;
use yii\helpers\StringHelper;
use app\modules\admin\components\widgets\AdminBoxWidget;
/* @var $this yii\web\View */
/* @var $model app\modules\main\models\Article */
$this->title = StringHelper::truncate($model->title, 50);
$this->params['breadcrumbs'][] = ['label' => Module::t('app', 'ADMIN'), 'url' => ['default/index']];
$this->params['breadcrumbs'][] = ['label' => Module::t('app', 'ADMIN_ARTICLE'), 'url' => ['index']];
$this->params['breadcrumbs'][] = StringHelper::truncate($model->title, 20);
?>
<div class="article-view">

    <?php 
AdminBoxWidget::begin(['type' => AdminBoxWidget::TYPE_PRIMARY, 'title' => Html::a('<i class="fa fa-pencil-square-o"></i>' . ' ' . Module::t('app', 'BUTTON_UPDATE'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary btn-xs']) . ' ' . Html::a('<i class="fa fa-trash-o"></i>' . ' ' . Module::t('app', 'BUTTON_DELETE'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger btn-xs', 'data' => ['confirm' => Module::t('app', 'CONFIRM_DELETE'), 'method' => 'post']]), 'left_tools' => 'Количество просмотров статьи: <strong>' . $model->click . '</strong>', 'footer' => '<strong>Статья созана:</strong> ' . Yii::$app->formatter->asDatetime($model->created_at) . '<br/>' . '<strong>Статья обновлена:</strong> ' . Yii::$app->formatter->asDatetime($model->updated_at) . '<br/>' . '<i class="fa fa-link"></i>&nbsp;<code>' . Yii::$app->urlManager->createAbsoluteUrl(['main/default/view', 'alt_title' => $model->alt_title]) . '</code>']);
?>

    <?php 
echo Tabs::widget(['items' => [['label' => 'Основная информация', 'content' => DetailView::widget(['model' => $model, 'attributes' => [['attribute' => 'category_id', 'format' => 'html', 'value' => Html::a($model->category->title, ['category/view', 'id' => $model->category->id], ['target' => 'blank'])], 'title', ['attribute' => 'alt_title', 'format' => 'html', 'value' => Html::decode('<strong>' . $model->alt_title . '</strong>') . '<br/>' . $model->getArticleUrl()], ['attribute' => 'author_id', 'format' => 'html', 'value' => Html::a($model->author->username, ['user/view', 'id' => $model->author->id], ['target' => 'blank'])], ['attribute' => 'status', 'format' => 'html', 'value' => $model->getArticleStatusSwitch()], 'tags', ['attribute' => 'anons_img', 'format' => 'html', 'value' => Html::img(Yii::$app->request->baseUrl . $model->anons_img, ['class' => 'img-responsive'])], 'anons:ntext', 'post:ntext']]), 'active' => true], ['label' => 'Рендер статьи', 'content' => $this->render('_article', ['model' => $model])]]]);
?>

    <?php 
AdminBoxWidget::end();
?>

</div>
示例#28
0

    <?php 
$this->beginBlock('logs');
?>
    <div class="table-responsive">
        <?php 
\yii\widgets\Pjax::begin(['id' => 'logs']);
?>
        <?php 
echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $logDataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['attribute' => 'started_at', 'format' => 'raw', 'value' => function ($m) {
    return Html::a(Yii::$app->getFormatter()->asDatetime($m->started_at), ['view-log', 'id' => $m->id]);
}], 'ended_at:datetime', ['label' => 'Duration', 'value' => function ($m) {
    return $m->getDuration();
}], ['label' => 'Result', 'format' => 'raw', 'contentOptions' => ['class' => 'text-center'], 'value' => function ($m) {
    return Html::tag('span', '', ['class' => $m->error == 0 ? 'text-success glyphicon glyphicon-ok-circle' : 'text-danger glyphicon glyphicon-remove-circle']);
}]]]);
?>
        <?php 
\yii\widgets\Pjax::end();
?>
    </div>
    <?php 
$this->endBlock();
?>

    <?php 
echo Tabs::widget(['encodeLabels' => false, 'id' => 'customer', 'items' => ['overview' => ['label' => Yii::t('app', 'Overview'), 'content' => $this->blocks['main'], 'active' => true], 'logs' => ['label' => 'Logs', 'content' => $this->blocks['logs']]]]);
?>
</div>
<?php

use yii\helpers\Html;
use kartik\grid\GridView;
use yii\helpers\Url;
use yii\web\JsExpression;
use yii\bootstrap\Tabs;
echo Tabs::widget(['navType' => 'nav-pills', 'items' => [['label' => '<span class="glyphicon glyphicon-signal"></span>', 'encode' => false, 'content' => $this->render('_charts_executive_summary_by_sales_man', ['provider' => $provider, 'chart' => $chart, 'year' => $year, 'salesTitle' => isset($salesTitle) ? $salesTitle : 'All Sales']), 'active' => true], ['label' => '<span class="glyphicon glyphicon-list"></span>', 'encode' => false, 'content' => $this->render('_grid_executive_summary_by_sales_man', ['provider' => $provider, 'year' => $year, 'salesTitle' => isset($salesTitle) ? $salesTitle : 'All Sales'])]]]);
示例#30
0
<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title"><?php 
echo Yii::$app->request->get('action') == 'add' ? 'Добавление новой ссылки' : 'Редактирование ссылки';
?>
</h3>
        <div class="box-tools pull-right">
            <?php 
echo Html::a('<i class="fa fa-times"></i>', $link_close, ['class' => 'btn btn-box-tool']);
?>
        </div>
    </div>
    <div class="box-body">
        <div class="nav-tabs-custom">
            <?php 
echo Tabs::widget(['items' => [['label' => 'Основные параметры', 'content' => '<p>' . $form->field($link, 'state')->checkbox() . $form->field($link, 'start')->checkbox() . $form->field($link, 'anchor') . $form->field($link, 'name')->hint('(не обязательно)') . $form->field($link, 'title') . $form->field($link, 'gallery_images_id')->widget(GalleryManager::className(), ['group' => false, 'gallery_groups_id' => 1, 'pluginOptions' => ['type' => 'links', 'apiUrl' => 'gallery-manager', 'webRoute' => Yii::getAlias('@frontend/web')]]) . '</p>', 'active' => true], ['label' => 'Дополнительно (системные параметры)', 'content' => '<p>' . $form->field($link, 'layouts_id')->dropDownList($layouts, ['encode' => false]) . $form->field($link, 'views_id')->dropDownList($views, ['encode' => false]) . $form->field($link, 'url')->staticControl() . $form->field($link, 'css_class') . $form->field($link, 'icon') . '</p>'], ['label' => 'SEO', 'content' => '<p>' . $form->field($link, 'keywords')->textarea() . $form->field($link, 'description')->textarea() . $form->field($link, 'priority') . '</p>']]]);
?>
        </div>

        <?php 
echo Html::a('Отмена', $link_close, ['class' => 'btn btn-default btn-sm btn-flat']);
?>

        <?php 
echo Html::submitButton($link->id ? 'Изменить' : 'Добавить', ['class' => 'btn btn-primary btn-flat btn-sm', 'name' => 'signup-button', 'value' => 'Добавить']);
?>

        <?php 
if ($link->id) {
    echo Html::a('Ретактор контента', Url::to(['/map/content', 'links_id' => $link->id]), ['class' => 'btn btn-info btn-flat btn-sm']) . '&nbsp;';
    Modal::begin(['header' => $link->anchor . ' ' . Html::a('<i class="fa fa-external-link"></i>', $link->url, ['target' => '_blank']), 'toggleButton' => ['label' => 'Удалить', 'class' => 'btn btn-danger btn-flat btn-sm'], 'footer' => Html::a('Отмена', '#', ['data-dismiss' => 'modal', 'class' => 'btn btn-default btn-flat btn-sm']) . Html::a('Удалить', ['/map/link-del', 'categories_id' => Yii::$app->request->get('categories_id'), 'links_id' => $link->id], ['class' => 'btn btn-danger btn-flat btn-sm'])]);