/**
  * Lists all Firma models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Firma::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Esempio n. 2
0
/* @var $this yii\web\View */
/* @var $model app\models\Projekt */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="projekt-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'firma_id')->dropDownList(ArrayHelper::map(Firma::find()->all(), 'id', 'name'));
?>

    <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>
Esempio n. 3
0
    <div class="row">
        <div class="col-sm-2">
            <?php 
echo $form->field($modelDatenblatt, 'nummer')->textInput(['maxlength' => true]);
?>
        </div>
    </div>
    
    <?php 
if ($modelDatenblatt->id) {
    ?>
    <div class="row">
        <div class="col-sm-2">
            <?php 
    echo $form->field($modelDatenblatt, 'firma_id')->dropDownList(ArrayHelper::map(Firma::find()->all(), 'id', 'name'), ['prompt' => 'Firma auswählen']);
    ?>
        </div>
        <div class="col-sm-2">
            <?php 
    $projekte = $modelDatenblatt->firma ? $modelDatenblatt->firma->projekts : [];
    echo $form->field($modelDatenblatt, 'projekt_id')->dropDownList(ArrayHelper::map($projekte, 'id', 'name'), ['prompt' => 'Projekt auswählen']);
    ?>
        </div>
        <div class="col-sm-2">
            <?php 
    $haeuser = $modelDatenblatt->firma && $modelDatenblatt->projekt ? $modelDatenblatt->projekt->hauses : [];
    echo $form->field($modelDatenblatt, 'haus_id')->dropDownList(ArrayHelper::map($haeuser, 'id', 'id'), ['prompt' => 'Haus auswählen']);
    ?>
        </div>
    </div>