@using GBLab.Common.Expand;
@using System.Text;
@{
    Layout = "~/Views/School_Pre/Shared/_Layout.cshtml";
    var data = ViewData["data"] as GBLab.Entities.T_CmsTeacher;
    var pre = ViewData["pre"] as GBLab.Entities.T_CmsTeacher;
    var next = ViewData["next"] as GBLab.Entities.T_CmsTeacher;
    var top10data = ViewData["top10data"] as List<GBLab.Entities.T_CmsTeacher>;

    StringBuilder sb = new StringBuilder();
    int count = 0;
}
@section HeadStyle{
}
@section HeadScript{
}
@section JavaScript{
}
@{Html.RenderPartial("~/Views/School_Pre/Shared/_Part/_HeaderAd.cshtml");}
@{Html.RenderPartial("~/Views/School_Pre/Views/Module/Common/HeadPath.cshtml");}

<div class="box">
    <div class="col-md-8" id="teachersdetail">
        @{
            sb.AppendFormat(@"
            <div class='detailhead'>
                <div>
                    <a href='#this' target='_blank' class='thumbnail'>
                        <img src='{0}' alt='{1}' data-bd-imgshare-binded='1'>
                    </a>
                    <div>
                        <a href='#this' class='fs14'>{1}</a>
                        <br>
                        <a href='#this' class='minfo'>{2}</a>
                        <div>
                            <span>更新：{3}</span>
                            <span>点击：{4}</span>
                        </div>
                    </div>
                </div>
            </div>"
, data.F_Logo.ChangeToImageUrl("")
, data.F_Name
, data.F_Info.RemoveHTML().SubstringEllipsis(30, "...")
, data.F_UpdateDate.ToString("yyyy-MM-dd")
, data.F_ViewNum.ToString()
);
        }
        @Html.Raw(sb.ToString())

        <div class="container-detail-head bs-info">教师介绍</div>
        <div class="container-detail-info col-xs-12 col-md-12">
            @Html.Raw(data.F_Info.DefaultIsNullOrEmpty(""))
        </div>

        <div class="container-detail-head bs-info">更多教师</div>
        <div class="detailimage col-xs-12 col-md-12">
            @{
                sb.Clear();
                sb = new StringBuilder();
                foreach (var item in top10data)
                {
                    sb.AppendFormat(@"
<div class='col-xs-6 col-md-4'>
            <a href='{2}' class='thumbnail'>
                <img src='{0}' alt='{1}' data-bd-imgshare-binded='1'>
            </a>
            <h5>{1}</h5>
</div>"
                            , item.F_Logo.ChangeToImageUrl("")
                            , item.F_Name
                            , "/CmsTeacher/" + item.F_TypeId.ToString() + "/" + item.F_Id.ToString() + ".html"
                        );
                }
            }
            @Html.Raw(sb.ToString())
        </div>
    </div>
    <div class="col-xs-12 col-md-4">
        @{Html.RenderPartial("~/Views/School_Pre/Views/Module/Common/Menu.cshtml");}
        @{Html.RenderPartial("~/Views/School_Pre/Views/Module/CmsTeacher/_Part/Top10.cshtml");}
        <div class="container-right-head bs-info">相关教师</div>
        <div class="container-right-info col-xs-12 col-md-12">
            @{sb.Clear();}
            @if (pre != null)
            {
                sb.AppendFormat(@"
<div class='col-xs-12 col-sm-6 col-md-12'>
<a href='{0}'>上一篇：{1}</a>
</div>"
        , ("/CmsTeacher/" + pre.F_TypeId.ToString() + "/" + pre.F_Id.ToString() + ".html")
        , pre.F_Name
        );
            }
            @if (next != null)
            {
                sb.AppendFormat(@"
<div class='col-xs-12 col-sm-6 col-md-12'>
<a href='{0}'>下一篇：{1}</a>
</div>"
        , ("/CmsTeacher/" + next.F_TypeId.ToString() + "/" + next.F_Id.ToString() + ".html")
        , next.F_Name
        );
            }
            @Html.Raw(sb.ToString())
        </div>
    </div>
</div>