@model PantheonRA.WebApi.Contracts.TravelOrderAllData

@{ 
    var basicActive = !Model.RedirectToDocumentTab ? "active" : string.Empty;
    var docsActive = Model.RedirectToDocumentTab ? "active" : string.Empty;
    var docNr = Model.Files == null ? 0 : Model.Files.Count();
}

<div class="tabs-container">
    <ul class="nav nav-tabs horizontal-menu" style="margin-left:0px !important">

        <li class="divided-tab-3 @basicActive">
            <a data-toggle="tab" href="#home" class="local-tab">@Loc.BasicData</a>
        </li>

        <li class="divided-tab-3 @docsActive">
            <a data-toggle="tab" href="#documents" class="local-tab">
                @Loc.Documents <span class="badge">@docNr</span>
            </a>
        </li>

        <li class="divided-tab-3">
            <a data-toggle="tab" href="#map" class="local-tab" onclick="initializeMap()">@Loc.Map</a>
        </li>
    </ul>
</div>

<div class="tab-content">
    <div id="home" class="tab-pane fade in @basicActive">
        <div class="form-horizontal form-md form-right m-t-lg">
            @Html.Partial("~/Views/TravelOrderAllData/_HeaderSideContent.cshtml", Model)
        </div>
    </div>

    <div id="documents" class="tab-pane fade in @docsActive">
        @if (!string.IsNullOrEmpty(Model.Header.AcKey))
        {
            <div class="form-horizontal form-md form-right m-t-lg">
                @Html.Partial("~/Views/TravelOrderAllData/_Attachments.cshtml", Model.Files != null ? Model.Files : new List<PantheonRA.WebApi.Contracts.PaFile>())
            </div>
        }
    </div>

    <div id="map" class="tab-pane fade in">
        @Html.Partial("~/Views/TravelOrderAllData/_GoogleMap.cshtml", Model.Distances)
    </div>
</div>