@model Anidopt.Models.Animal

@{
    ViewData["Title"] = "Details";
}

<h1>Details</h1>

<div>
    <h4>Animal</h4>
    <hr />
    <dl class="row">
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Id)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Id)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Name)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Name)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.BirthDay)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.BirthDay)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Breed.Species)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Breed.Species.Name)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Breed)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Breed.Name)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Height)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Height)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Weight)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Weight)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Sex)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Sex.Name)
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Organisation)
        </dt>
        <dd class="col-sm-10">
            @Html.DisplayFor(model => model.Organisation.Name)
        </dd>
        <dt class="col-sm-2">
            Descriptors
        </dt>
        <dd class="col-sm-10">
            <table class="table">
                <thead>
                    <tr>
                        <th>
                            Id
                        </th>
                        <th>
                            Name
                        </th>
                        <th>
                            Type
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model.DescriptorLinks)
                    {
                        <tr>
                            <td>
                                @Html.DisplayFor(modelItem => item.Descriptor.Id)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.Descriptor.Name)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.Descriptor.DescriptorType.Name)
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </dd>
        <dt class="col-sm-2">
            @Html.DisplayNameFor(model => model.Description)
        </dt>
        <dd class="col-sm-10">
            <textarea style="width:100%;" readonly>@Html.DisplayFor(model => model.Description)</textarea>
        </dd>
    </dl>
</div>
<div>
    <a asp-action="Edit" asp-route-id="@Model?.Id">Edit</a> |
    <a asp-action="Index">Back to List</a>
</div>
