<p>Блюда в категории:</p>
<table cellpadding="0" cellspacing="0" class="my_admin_table" width="600">
    <tr>
        <td colspan="4" style="line-height: 23px;">
            Название <a class="lui_pseudo" style="float: right" href="<?php echo url_for('@restauran_food_new?spec_id='.$cat_id) ?>">Добавить позицию</a>
        </td>
    </tr>
    <?php
    foreach ($children as $food)
    {
        if (!$food['parent_id'])
        {
            if (count($food['SpecialsFood']) > 0)
            {
                $new_price = $food['SpecialsFood'][0]['new_price'];
                $price = '<s class="small_text">' . $food['price'] . ' руб</s><br> ' . $new_price;
            }
            else
            {
                if ($food['price'])
                {
                    $price = $food['price'];
                }
                else
                {
                    $price = 0;
                }
            }
            ?>
            <tr class="hovered elem_<?php echo $food['id'] ?>">
                <td>
                    <a href="<?php echo url_for('@restauran_food_edit?id=' . $food['id']) ?>"><?php echo $food['title'] ?></a>
                </td>
                <td class="tcenter">
                    <?php echo $price ?> руб
                </td>
                <td style="text-align: center">
                    Позиция: <input style="width: 60px;" type="number" data-cat-id="<?php echo $food['menu_category_id'] ?>" data-id="<?php echo $food['id'] ?>" data-table="RestauranFood" class="change_pos" value="<?php echo $food['sort'] ?>">
                </td>
                <td class="tcenter" width="80">
                    <a class="my_edit" href="<?php echo url_for('@restauran_food_edit?id=' . $food['id']) ?>"></a>
                    <a onclick="if (confirm('Вы уверены что хотите удалить объект?')) { f.createHiddenFormAndSubmit($(this).attr('href'), {'sf_method': 'delete', '_csrf_token': 'd7fd71d9d52932863f7b44eec40f7dda'}); };return false;" class="my_delete" href="<?php echo url_for('@restauran_food_delete?id=' . $food['id']) ?>"></a>
                </td>
            </tr>

            <?php
        }

    }
    ?>
</table>