﻿@model IEnumerable<Unit>

<div class="page-header">
    <h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default" })</h1>
</div>

<table class="table table-striped">
    <thead>
        <tr>
            <th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th>
            <th>@Html.DisplayNameFor(_ => _.FirstOrDefault().UIC)</th>
            <th></th>
        </tr>
    </thead>

    <tbody>
        @foreach (var unit in Model)
            {
            <tr>
                <td>@Html.DisplayFor(s => unit)</td>
                <td>@Html.DisplayFor(s => unit.UIC)</td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { unit.Id })
                    @Html.ActionLink("Soldiers", "Index", "Soldiers", new { unit = unit.Id })
                </td>
            </tr>
        }
    </tbody>
</table>

﻿@model IEnumerable<Unit>

<div class="page-header">
    <h1>Units @Html.ActionLink("Add New", "New", "Units", null, new { @class = "btn btn-default" })</h1>
</div>

<table class="table table-striped">
    <thead>
        <tr>
            <th>@Html.DisplayNameFor(_ => _.FirstOrDefault().Name)</th>
            <th>@Html.DisplayNameFor(_ => _.FirstOrDefault().UIC)</th>
            <th></th>
        </tr>
    </thead>

    <tbody>
        @foreach (var unit in Model)
            {
            <tr>
                <td>@Html.DisplayFor(s => unit)</td>
                <td>@Html.DisplayFor(s => unit.UIC)</td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { unit.Id })
                    @Html.ActionLink("Soldiers", "Index", "Soldiers", new { unit = unit.Id })
                    @Html.ActionLink("Org Chart", "Details", new { unit.Id })
                </td>
            </tr>
        }
    </tbody>
</table>

Add link to org chart
Add link to org chart
