<?php if (auth()->user()->can_edit_by_controller($controller)): ?> 
    <a class="button" href="<?= url_to($urltoedit, intval($id)) ?>">Edit</a>
    <?php if (count($inputs) == 0): ?>
        <a href="<?= url_to($urltodelete, intval($id)) ?>"><button
                style="background-color: red;">Delete</button></a>
    <?php else: ?>
        <a href="<?= url_to($urltodelete, intval($id)) ?>" ><button
                style="background-color: red;" disabled>Delete</button></a>
        <div> Delete is disabled until this item is not used in any inputs (see below)</div>
    <?php endif; ?>
<?php endif; ?>
