<div class="admin-block">
    <div class="admin-block__title">Ingredients</div>
    <div class="admin-block__content">
        <div class="admin-block__table">
            <?php if (!empty($ingredients)): ?>
                <?php foreach ($ingredients as $ing): ?>
                    <div class="row">
                        <div class="column"><a href="<?php the_permalink('admin:ing-cat-rel', [$ing->get_id()]) ?>"><?php echo $ing->ingredient_name ?></a></div>

                        <div class="column"><?php echo $ing->get_count() ?></div>
                    </div>
                <?php endforeach; ?>
            <?php else: ?>
                <div class="nothing">No ingredients</div>
            <?php endif ?>
        </div>
        <div class="btn-control">
            <a href="<?php the_permalink('admin:ing-cat-rel-list', [$recipe->get_id()]) ?>" class="btn btn-secondary hover-anim">Show all</a>
            <a href="<?php the_permalink('admin:ing-cat-rel-new', [$recipe->get_id()]) ?>" class="btn btn-primary hover-anim">Add ingredient</a>
        </div>
    </div>
</div>