Esempio n. 1
0
 public function run()
 {
     MultiAsset::register($this->getView());
     echo $this->render('_create', ['model' => $this->model, 'relation' => $this->relation, 'rowViewPath' => $this->rowViewPath, 'createLabel' => $this->createLabel, 'deleteLabel' => $this->deleteLabel, 'mainLabel' => $this->mainLabel, 'multi_url' => $this->url]);
 }
Esempio n. 2
0
<?php

use yii\helpers\Html;
/**
 * @var \yii\db\ActiveRecord $model
 * @var string $relation
 * @var string $rowViewPath
 * @var string $mainLabel
 * @var string $deleteLabel
 * @var string $createLabel
 * @var string $multi_url
 */
\mitalcoi\multi\MultiAsset::register($this);
?>
<div id="<?php 
echo $relation;
?>
">
    <?php 
echo Html::hiddenInput('multi_url-' . $relation, $multi_url, ['class' => 'multi_url']);
?>
    <?php 
echo Html::label($mainLabel);
?>
    <ul class="multi-ul">
        <?php 
foreach ($model->multiHold[$relation] as $i => $r) {
    ?>
            <?php 
    echo $this->render($rowViewPath, ['model' => $r, 'i' => $i, 'deleteLabel' => $deleteLabel]);
    ?>