@using CD67.FicheCollege.MVC.Models
@model AnneeViewModel

@{
    ViewBag.Title = "Liste";
    Layout = "~/Views/Shared/_Layout.cshtml";
    College college_model = new College();
}

@*Selection de colleges à importer*@
<div id="college-import-dlg" style="display:none">
    <ul class="college-import-list">
        @* Injection ajax *@
    </ul>
    <input class="btn btn-default" type="button" value="Importer" />
</div>

<header>
    <h2>Les collèges @Model.Annee_Lib</h2>
    <span>
        <a href="@Url.Action("Create", new { annee_id = Model.Obj.Id })"> <span class="glyphicon glyphicon-plus-sign color1"></span> Nouveau collège</a>
        <a href="@Url.Action("Import", new { annee_id = Model.Obj.Id })"> <span class="glyphicon glyphicon-import color1"></span> Importer depuis @Model.Obj.AnneePrecLib</a>
        <a class="start-trace" href="@Url.Action("Index", "TypeCollege")"> <span class="glyphicon glyphicon-cog color1"></span> Types de collège</a>
        <a class="start-trace" href="@Url.Action("Index", "Territoire")"> <span class="glyphicon glyphicon-cog color1"></span> Territoires</a>
    </span>
</header>

<table id="table-colleges" class="datatable table">
    <thead>
        <tr>
            <th>
                RNE
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.Libelle)
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.Adresse)
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.CDC)
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.Tel)
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.Fax)
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.Email)
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.Territoire.Libelle)
            </th>
            <th>
                @Html.DisplayNameFor(model => college_model.TypeCollege.Libelle)
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (College college in Model.Obj.Colleges) {
            <tr data-url="@Url.Action("Details", new { id = college.Id })">
                <td>
                    @Html.DisplayFor(modelcollege => college.CodeRne)
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.Libelle)
                    <noscript>
                        @Html.ActionLink(" > Voir", "Details", new { id = college.Id })
                    </noscript>
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.AdresseComplete)
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.CDC)
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.Tel)
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.Fax)
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.Email)
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.Territoire.Libelle)
                </td>
                <td>
                    @Html.DisplayFor(modelcollege => college.TypeCollege.Libelle)
                </td>
            </tr>
        }
    </tbody>

</table>

