@{
    ViewBag.Title = "Table";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Tabulka soutěže</h2>

<table>
    <tr>
        <th>P</th><th>Tým</th><th>V</th><th>R</th><th>P</th><th>Skóre</th><th>Body</th>
    </tr>

    @{var i = 1;}
    @foreach (var club in ViewBag.clubs)
    {
        <tr>
            <td>@i</td>
            <td>@club.clubName</td>
            <td>@club.wins</td>
            <td>@club.draws</td>
            <td>@club.losts</td>
            <td>@string.Format(club.homeGoals + ":"+ club.awayGoals)</td>
            <td>@club.points</td>
        </tr>
        i++;
    }
</table>
