Exemplo n.º 1
0
<?php

/* @var yii\web\View $this */
/* @var \yii\data\ActiveDataProvider $objects */
use app\modules\data\assets\DataAsset;
$bundle = DataAsset::register($this);
$this->title = Yii::t('app', 'Data');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo \app\widgets\Alert::widget();
?>
<div class="row">
<div class="col-md-12">
    <div class="row">
        <?php 
\app\backend\widgets\BackendWidget::begin(['icon' => 'cogs', 'title' => Yii::t('app', 'CommerceML')]);
?>
        <?php 
echo \yii\helpers\Html::a(Yii::t('app', 'Import from CommerceML'), \yii\helpers\Url::to(['/data/commerceml']), ['class' => 'btn btn-primary']);
?>
        <?php 
echo \yii\helpers\Html::a(Yii::t('app', 'Configure CommerceML'), \yii\helpers\Url::to(['/data/commerceml/configure']), ['class' => 'btn btn-primary']);
?>
        <?php 
\app\backend\widgets\BackendWidget::end();
?>
    </div>
</div>
</div>
<?php

/* @var $this yii\web\View */
/* @var string $type */
/* @var \app\modules\data\models\ImportModel $model */
/* @var array $fields */
/* @var \app\models\Object $object */
/* @var array $availablePropertyGroups */
use app\backend\widgets\BackendWidget;
use kartik\helpers\Html;
use kartik\icons\Icon;
use kartik\widgets\ActiveForm;
use app\modules\data\assets\DataAsset;
DataAsset::register($this);
$this->title = $object->name . ' ' . ($importMode ? Yii::t('app', 'Import') : Yii::t('app', 'Export'));
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Data'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
if (isset($fields['object']) && !empty($fields['object'])) {
    ?>
    <?php 
    $form = ActiveForm::begin(['id' => 'form-data', 'type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
    ?>
    <?php 
    BackendWidget::begin(['icon' => 'list', 'title' => $object->name . ' - ' . Yii::t('app', 'Fields'), 'footer' => Html::submitButton(Icon::show('save') . Yii::t('app', 'Submit'), ['class' => 'btn btn-primary'])]);
    ?>
    <?php 
    echo \yii\helpers\Html::activeHiddenInput($model, 'object');
    ?>