<div data-control="toolbar">

    <?php foreach ($relationToolbarButtons as $button): ?>

        <?php if ($button == 'update'): ?>
            <?= $this->relationMakePartial('button_update', [
                'relationManageId' => $relationViewModel->id
            ]) ?>
        <?php else: ?>
            <?= $this->relationMakePartial('button_'.$button) ?>
        <?php endif ?>

    <?php endforeach ?>

<?php /*
    <?php if ($relationType == 'hasMany'): ?>

        <?= $this->relationMakePartial('button_create') ?>
        <?= $this->relationMakePartial('button_delete') ?>

    <?php elseif ($relationType == 'belongsToMany'): ?>

        <?= $this->relationMakePartial('button_add') ?>
        <?= $this->relationMakePartial('button_remove') ?>

    <?php elseif ($relationType == 'belongsTo'): ?>

        <?= $this->relationMakePartial('button_link') ?>
        <?= $this->relationMakePartial('button_unlink') ?>

    <?php elseif ($relationType == 'hasOne'): ?>

        <?php if ($relationViewWidget->model->exists): ?>
            <?= $this->relationMakePartial('button_update', ['relationManageId' => $relationViewWidget->model->id]) ?>
            <?= $this->relationMakePartial('button_delete') ?>
        <?php else: ?>
            <?= $this->relationMakePartial('button_create') ?>
        <?php endif ?>

    <?php endif ?>
*/ ?>


</div>
