@using GBLab.Common.Expand;
@{
    Layout = "~/Views/School_Pre/Shared/_Layout.cshtml";
    var cmsnews = ViewData["cmsnews"] as GBLab.Web.indexModels;
    var cmsimgs = ViewData["cmsimgs"] as GBLab.Web.indexModels;
    var cmsteachers = ViewData["cmsteachers"] as GBLab.Web.indexModels;
    var cmsdownloads = ViewData["cmsdownloads"] as GBLab.Web.indexModels;
    var cmsvedios = ViewData["cmsvedios"] as GBLab.Web.indexModels;
    var count = 0;
}

@section HeadStyle{}

@{Html.RenderPartial("~/Views/School_Pre/Shared/_Part/_HeaderAd.cshtml");}

@if (cmsnews.models.Count > 0) {
    <div class="container-head">学校资讯</div>
    <div id="head-news" class="row container-info">
        @foreach (var item in cmsnews.models) {
            var news = item.models.ConvertAll(s => (GBLab.Entities.T_CmsNews)s);
            count = 0;
            <div class="col-xs-14 col-md-4 list">
                <div class="head"><span>@(item.type.F_Name)</span><a href="@Url.Domain_RouteUrl("Site.CmsNews.Node.List", new { typeId = item.type.F_Id})" target="_blank">更多&gt;&gt;</a></div>
                <div class="item col-xs-12 col-md-12 p10">
                    @foreach (var midItem in news) {
                        string detailurl = Url.Domain_RouteUrl("Site.CmsNews.Node.Detail", new { typeId = midItem.F_TypeId, id = midItem.F_Id });
                        count++;
                        <div class="col-xs-12 col-sm-6 col-md-12 @(count==news.Count?"bottomendline":"")">
                            <div>
                                <a href="@detailurl" target="_blank" class="thumbnail"><img src="@(midItem.F_Logo.ChangeToImageUrl(""))" alt="@(midItem.F_Name)" data-bd-imgshare-binded="1"></a><div>
                                    <a href="@detailurl">@(midItem.F_Name)</a><br>
                                    <a href="#this" class="minfo">@(midItem.F_Name.RemoveHTML().SubstringEllipsis(10, "..."))</a><div></div>
                                </div>
                            </div>
                        </div>
                    }
                </div>
            </div>
        }
    </div>
}


@if (cmsteachers.models.Count > 0)
{
    foreach (var item in cmsteachers.models)
    {
        var models = item.models.ConvertAll(s => (GBLab.Entities.T_CmsTeacher)s);
        <div class="container-head">@(item.type.F_Name)<a href="@Url.Domain_RouteUrl("Site.CmsTeacher.Node.List", new { typeId = item.type.F_Id})" target="_blank" class="right">更多&gt;&gt;</a></div>
        <div id="teacher-module" class="row">
            @foreach (var midItem in models)
            {
                <div class="col-xs-4 col-md-2"><a href="@Url.Domain_RouteUrl("Site.CmsTeacher.Node.Detail",new {typeId = midItem.F_TypeId, id = midItem.F_Id })" target="_blank" class="thumbnail"><img src="@(midItem.F_Logo.ChangeToImageUrl(""))" alt="@(midItem.F_Name)" data-bd-imgshare-binded="1"></a><h5>@(midItem.F_Name)</h5></div>
            }
        </div>
    }
}


@if (cmsvedios.models.Count > 0)
{
    foreach (var item in cmsvedios.models)
    {
        var models = item.models.ConvertAll(s => (GBLab.Entities.T_CmsVedio)s);
        <div class="container-head">@(item.type.F_Name)<a href="@Url.Domain_RouteUrl("Site.CmsVedios.Node.List", new { typeId = item.type.F_Id})" target="_blank" class="right">更多&gt;&gt;</a></div>
        <div id="logoslist" class="row">
            @foreach (var midItem in models)
            {
                <div class="col-xs-4 col-md-2"><a href="@Url.Domain_RouteUrl("Site.CmsVedios.Node.Detail", new { typeId = midItem.F_TypeId, id = midItem.F_Id })" target="_blank" class="thumbnail"><img src="@(midItem.F_Logo.DefaultIsNullOrEmpty("/App_Themes/Skin_Site/School_Pre/cmsIcon/视频.png").ChangeToImageUrl(""))" alt="@(midItem.F_Name)" data-bd-imgshare-binded="1"></a><h5>@(midItem.F_Name)</h5></div>
            }
        </div>
    }
}


@if (cmsimgs.models.Count > 0) {
    foreach (var item in cmsimgs.models) {
        var models = item.models.ConvertAll(s => (GBLab.Entities.T_CmsImg)s);
        <div class="container-head">@(item.type.F_Name)<a href="@Url.Domain_RouteUrl("Site.CmsImg.Node.List", new { typeId = item.type.F_Id})" target="_blank" class="right">更多&gt;&gt;</a></div>
        <div id="logoslist" class="row">
            @foreach (var midItem in models) {
                <div class="col-xs-4 col-md-2"><a href="@Url.Domain_RouteUrl("Site.CmsImg.Node.Detail", new { typeId = midItem.F_TypeId, id = midItem.F_Id })" target="_blank" class="thumbnail"><img src="@(midItem.F_Logo.ChangeToImageUrl(""))" alt="@(midItem.F_Name)" data-bd-imgshare-binded="1"></a><h5>@(midItem.F_Name)</h5></div>
            }
        </div>
    }
}


@if (cmsdownloads.models.Count > 0) {
    foreach (var item in cmsdownloads.models) {
        var models = item.models.ConvertAll(s => (GBLab.Entities.T_CmsDownload)s);
        <div class="container-head">@(item.type.F_Name)<a href="@Url.Domain_RouteUrl("Site.CmsDownloads.Node.List", new { typeId = item.type.F_Id})" target="_blank" class="right">更多&gt;&gt;</a></div>
        <div id="logoslist" class="row">
            @foreach (var midItem in models) {
                <div class="col-xs-4 col-md-2"><a href="@Url.Domain_RouteUrl("Site.CmsDownloads.Node.Detail", new { typeId = midItem.F_TypeId, id = midItem.F_Id })" target="_blank" class="thumbnail"><img src="@(midItem.F_Logo.ChangeToImageUrl(""))" alt="@(midItem.F_Name)" data-bd-imgshare-binded="1"></a><h5>@(midItem.F_Name)</h5></div>
            }
        </div>
    }
}


@section JavaScript{
}