@model Web.Models.ILayoutModel
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  @if (Model != null && !String.IsNullOrEmpty(Model.Title)) {
    <title>@Model.Title - Stavebniny Dobeš</title>
  } else {
    <title>Stavebniny Dobeš</title>
  }

  @Styles.Render("~/Content/css")
  @Styles.Render("~/Content/dropzonescss")

  @Scripts.Render("~/bundles/modernizr")
  @Scripts.Render("~/bundles/jquery")
  @Scripts.Render("~/bundles/bootstrap")
  @Scripts.Render("~/bundles/jqueryval")
  @Scripts.Render("~/bundles/dropzonescripts")

  @RenderSection("scripts", required: false)

</head>
<body>
  <div id="wrapper">
    <div id="sidebar-wrapper">
      <ul class="sidebar-nav">
        <li class="sidebar-brand">
          <a href="@Url.Action("Index", "Home")">
            DOBEŠ-STAVBY s.r.o.
          </a>
        </li>
        @if (Request.IsAuthenticated && User.IsInRole("Vedouci")) {
          <li>
            <a href="@Url.Action("Index", "Zamestnanec")" class="btn btn-warning">
              Zaměstnanci
              <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
            </a>
          </li>
          <li>
            <a href="@Url.Action("Index", "Subjekt")" class="btn btn-warning">
              Subjekty
              <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
            </a>
          </li>
        }
        <li>
          <a href="@Url.Action("Contact", "Home")" class="btn btn-warning">
            Kontakt
            <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
          </a>
        </li>
        @if ((Request.IsAuthenticated && User.IsInRole("Vedouci")) || (Request.IsAuthenticated && User.IsInRole("Skladnici"))) {
          <li>
            <a href="@Url.Action("Index", "Karta")" class="btn btn-warning">
              Skladové karty
              <span class="glyphicon glyphicon-book" aria-hidden="true"></span>
            </a>
          </li>
          <li>
            <a href="@Url.Action("Index", "DodaciList")" class="btn btn-warning">
              Dodací listy
              <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
            </a>
          </li>
        }
        </ul>
      </div>


      <div id="page-content-wrapper">
        @Html.Partial("_LoginPartial")
        <a href="#menu-toggle" class="btn btn-default glyphicon glyphicon-menu-hamburger" id="menu-toggle"> </a>

        <div class="container-fluid">
          <div class="row">
            @{ Html.RenderPartial("_Alerts"); }
            @RenderBody()

          </div>
          <footer>
            <hr />
          </footer>

        </div>
      </div>
    </div>

    <script>
      $("#menu-toggle").click(function (e) {
        e.preventDefault();
        $("#wrapper").toggleClass("toggled");
      });


      $('#myTable').dataTable({
        language: {
          "lengthMenu": 'Zobrazit <select>' +
          '<option value="10">10</option>' +
          '<option value="20">20</option>' +
          '<option value="30">30</option>' +
          '<option value="40">40</option>' +
          '<option value="50">50</option>' +
          '<option value="-1">Vše</option>' +
          '</select> položek',
          search: "Hledej",
          "info": "Zobrazená stránka _PAGE_ z _PAGES_",
          searchPlaceholder: "Hledaný text",
          paginate: { next: "Další", previous: "Předchozí" },
          "emptyTable": "Žádná data k zobrazení",
          "infoEmpty": "Zobrazeno 0 z 0 stránek"
        }
      });
    </script>
  </body>
</html>
