Example #1
0
<?php

/* @var $this yii\web\View */
/* @var $model icalab\mediafile\models\Mediafile */
use yii\helpers\Url;
use icalab\mediafile\MediafileModule;
$this->title = MediafileModule::t('mediafile', 'Update example');
$this->params['breadcrumbs'][] = ['label' => MediafileModule::t('mediafile', 'Examples'), 'url' => Url::toRoute(['voorbeeld/index'])];
$this->params['breadcrumbs'][] = $model->waarde;
?>

<div class="voorbeeld-update">
<?php 
echo $this->render('_form', ['model' => $model]);
?>
</div>


Example #2
0
<?php

/* @var $this yii\web\View */
/* @var $dataProvider dataProvider */
//namespace icalab\mediafile\views\mediafiletype;
//use Yii;
use yii\widgets\ListView;
use yii\helpers\Html;
use yii\helpers\Url;
use icalab\mediafile\MediafileModule;
$this->title = MediafileModule::t('mediafile', 'File types');
?>

<div class="mediafiletype-index">
<?php 
echo ListView::widget(['dataProvider' => $dataProvider, 'itemView' => function ($model, $key, $index, $widget) {
    return Html::a($model->waarde, Url::toRoute(['voorbeeld/update', 'id' => $model->primaryKey]));
}]);
?>
    
</div>
Example #3
0
<?php

/* @var $form yii\bootstrap\ActiveForm */
/* @var $model icalab\mediafile\models\Mediafile */
use icalab\mediafile\MediafileModule;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
use yii\helpers\Url;
use icalab\mediafile\components\AttachMediafileWidget;
?>

<?php 
$form = ActiveForm::begin(['id' => 'voorbeeld-form', 'layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data']]);
echo $form->errorSummary($model);
echo AttachMediafileWidget::widget(['model' => $model, 'form' => $form]);
echo $form->field($model, 'waarde');
if ($model->isNewRecord) {
    echo Html::submitButton(MediafileModule::t('mediafile', 'Create'), ['class' => 'btn btn-primary']);
} else {
    echo Html::submitButton(MediafileModule::t('mediafile', 'Update'), ['class' => 'btn btn-primary']);
}
ActiveForm::end();
Example #4
0
<?php

/* @var $this yii\web\View */
/* @var $model icalab\mediafile\models\Mediafile */
use yii\helpers\Url;
use icalab\mediafile\MediafileModule;
$this->title = MediafileModule::t('mediafile', 'Create new media file');
$this->params['breadcrumbs'][] = ['label' => MediafileModule::t('mediafile', 'Media files'), 'url' => Url::toRoute(['mediafile/index'])];
$this->params['breadcrumbs'][] = MediafileModule::t('mediafile', 'New media file');
?>

<div class="mediafile-update">
<?php 
echo $this->render('_form', ['model' => $model]);
?>
</div>