<%= new IndexVideoByInstance(this) { CacheEnable = 60, PageSize = 10, OrderBy = AVA.ResourcesPlatform.Config.OrderType.播放量, TransferControl = "/Index/IndexVideoByHot_orders",ParentSubjectGuid = this.Subject.Guid }.ToHtml()%>
<%= Define.Get("Category_学科") %>排行榜
<%
var listCategory = CreateInstance.VideoDao.Where(l => l.Status == (int)AVA.ResourcesPlatform.Model.Pub.VideoStatusEnum.有效
&& l.ParentCategory.ParentCategory !=null
&& l._ListSubjectVideo.Any(li=>li.ParentSubject == this.Subject)).GroupBy(l => new
{
l.ParentCategory.Guid,
l.ParentCategory.Name,
}).Select(s => new
{
Count = s.Count(),
Guid = s.Key.Guid,
Name = s.Key.Name
})
.ToList()
.OrderByDescending(l => l.Count)
.Take(10)
.ToList();
%>
<% if (listCategory.Count > 0)
{ %>
<%
for (var i = 0; i < listCategory.Count; i++)
{
var domain = listCategory[i];
if (i < 3)
{
%>
-
<% var label = "0" + (i + 1); %>
<%= new HtmlAnchor( new HtmlLabel("label",label){Class=" hots"}+"" +
new HtmlSpan( domain.Name){ Class="text", TextLength=18,Suffix=".."}+""+
new HtmlSpan(domain.Count){Class="total_num"}
){ Class="nums", Title=domain.Name, Href="#" }%>
<%
}
else
{
if (i + 1 < 10)
{
%>
-
<% var label = "0" + (i + 1); %>
<%= new HtmlAnchor( new HtmlLabel("label",label){Class=" "}+ ""+
new HtmlSpan( domain.Name){ Class="text", TextLength=18,Suffix=".."}+""+
new HtmlSpan(domain.Count){Class="total_num"}
){ Class="nums", Title=domain.Name, Href="#" }%>
<%
}
else
{
%>
-
<% var label = (i + 1).ToString(); %>
<%= new HtmlAnchor( new HtmlLabel("label", label){Class=" "}+""+
new HtmlSpan( domain.Name){ Class="text", TextLength=18,Suffix=".."}+""+
new HtmlSpan(domain.Count){Class="total_num"}
){ Class="nums", Title=domain.Name, Href="#" }%>
<%
}
}
}
%>
<%
}
else
{ %>
暂无数据
<%
}
%>
<%-- <%= new IndexVideoByInstance(this) { CacheEnable = 60, PageSize = 10, OrderBy = AVA.ResourcesPlatform.Config.OrderType.周播放量, TransferControl = "/Index/IndexVideoByHot_orders" }.ToHtml()%>--%>