Exemplo n.º 1
0
<?php

/**
 * @var $this yii\web\View
 * @var $widget gromver\platform\core\modules\main\widgets\PlatformPanel
 */
use gromver\platform\core\Application;
use yii\bootstrap\NavBar;
use yii\bootstrap\Nav;
use yii\helpers\Html;
$this->registerAssetBundle(\gromver\platform\core\modules\main\widgets\assets\PlatformAsset::className());
$navBar = NavBar::begin(\yii\helpers\ArrayHelper::merge(['brandLabel' => Yii::$app->name, 'brandUrl' => ['/main/backend/default/index'], 'options' => ['class' => 'navbar-inverse navbar-fixed-top platform-panel platform-panel_backend']], $widget->options));
?>

<?php 
echo \gromver\platform\core\modules\search\widgets\SearchFormBackend::widget(['id' => 'bPanelForm', 'options' => ['class' => 'navbar-form'], 'wrapperOptions' => ['class' => 'navbar-left'], 'query' => '', 'context' => '']);
?>

<?php 
if (Yii::$app->user->can('customizeWidget')) {
    ?>
    <div class="input-group navbar-left">
        <?php 
    echo Html::tag('span', Yii::t('gromver.platform', 'Editing mode'), ['class' => 'navbar-text']) . '&nbsp;';
    ?>
        <div class="btn-group">
            <?php 
    if (Yii::$app->mode === Application::MODE_EDIT) {
        echo Html::button(Yii::t('gromver.platform', 'On'), ['class' => 'btn btn-success navbar-btn btn-xs active']);
        echo Html::a(Yii::t('gromver.platform', 'Off'), ['/main/backend/default/mode', 'mode' => Application::MODE_VIEW, 'backUrl' => Yii::$app->request->getUrl()], ['class' => 'btn btn-default navbar-btn btn-xs']);
    } else {
Exemplo n.º 2
0
<?php

/* @var $this yii\web\View */
/* @var $query string */
$this->title = Yii::t('gromver.platform', 'Search');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="search-default-index">
    <h1><?php 
echo Yii::t('gromver.platform', 'Search');
?>
</h1>

    <?php 
echo \gromver\platform\core\modules\search\widgets\SearchFormBackend::widget(['id' => 'bSqlForm', 'url' => '', 'query' => $query, 'configureAccess' => 'none']);
echo \gromver\platform\core\modules\search\modules\sql\widgets\SearchResultsBackend::widget(['id' => 'bSqlResults', 'query' => $query]);
?>
</div>