@model Web.Models.DodaciList.DodaciListListModel

@{
  Layout = "~/Views/Shared/_Layout.cshtml";
}
<hr />
<p>
  @Html.ActionLink("Přidat nový dodací list", "Vytvor", null, new { @class = "btn btn-primary" })
</p>
<table id="myTable" class="tablec col-md-8 table-striped">
  <thead class="thead-inverse">
    <tr>
      <th class="col-md-2">
        Název
      </th>
      <th class="col-md-2">
        Celková cena
      </th>
      <th class="col-md-2">
        Info o modifikaci
      </th>
      <th class="col-md-2">
        Subjekt
      </th>
      <td class="col-md-2">
        <div class="pull-right">
        </div>
      </td>
    </tr>
  </thead>
  <tbody class="table-bordered">
    @foreach (var dodaciList in Model.DodaciListy) {
      <tr>
        <td class="col-md-2">
          @Html.DisplayFor(modelItem => dodaciList.KodDodacihoListu)
        </td>
        <td class="col-md-2">
          @Html.DisplayFor(modelItem => dodaciList.CelkovaCena)
        </td>
        <td class="col-md-2">
          @Html.DisplayFor(modelItem => dodaciList.InfoOModifikaci)
        </td>
        <td class="col-md-2">
          @Html.DisplayFor(modelItem => dodaciList.Subjekt.Jmeno)
        </td>
        <td class="col-md-2">
          <div class="pull-right">
            @Html.ActionLink("Detail", "Detail", new { id = dodaciList.Id }, new { @class = "btn btn-default" })

          </div>
        </td>
      </tr>
    }
  </tbody>
</table>

<div class="col-md-4"> </div>

<script>
  $(document).ready(function () {
    $('#myTable').DataTable();
  });
</script>
