@model crud.Models.Category

@*@using (Html.BeginForm(null, null, FormMethod.Get, new { @action = "/Category/Delete/" + Model.Id }))
    {
        <button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#modal_delete_@{@Model.Id}">Eliminar</button>
    }
*@
@{
    if (Model.Articles.Count == 0)
    {
        <button type="button" class="btn btn-danger btn-sm text-white" data-toggle="modal" data-target="#modal_delete_@{@Model.Id}"><span class="fa fa-trash"></span></button>
        @Html.Partial("_Delete", Model)
    }
    else
    {
        <button class="btn btn-warning btn-sm text-white" title="@ViewBag.TooltipText" data-toggle="tooltip" data-placement="top" disabled><span class="fa fa-exclamation-circle"></span></button>
    }
}

@section BootstrapCustom {
    @Scripts.Render("~/bundles/bootstrap-custom")
}