%
var restrictedClass='';
if(IS_IP_RESTRICTED){ restrictedClass = RESTRICTED_CLASS}
var options = items.options;
var showCheckbox = !items.hideCheckbox;
for(var counter = startIndex; counter < endIndex; counter++){
var item = items[counter];
%>
<% if(item.type === 'list'){
var className ="";
//var selectCount = item.totalCountObj.get("selectCount");
//var totalCount = item.totalCountObj.get("totalCount");
var selectedCount = item.selectedCount;
var totalCount = item.totalCount;
var isSelected = false;
if(selectedCount>0 && selectedCount != totalCount){
className += 'checkbox-custom-label-part';
}else if(selectedCount === 0){
className += "";
} else if(selectedCount===totalCount){
isSelected=true;
}
%>
<%}%>
<% if(item.type === 'grid'){
var model = item.model;
var className = model.attributes.isLandscape ? 'landscape' : 'portrait';
var width = item.isMobileView ? item.width : item.width-10;
var height = item.isMobileView ? item.height : item.height - 50;
var favoriteClass = model.get('favorite')? 'fa-star selected' : 'fa-star';
var url = model.attributes.thumbnail;
var mediaType = model.attributes.uiMediaType;
var defaultUrl = (model.attributes.uiMediaType === 'video') ? window.svgSrcHome["error_no_video"] : window.svgSrcHome["error_no_photo"];
var iconClass = mediaType == 'video' ? 'video-icon' : "";
%>
<% if(showCheckbox){ %>
checked <%}%>/>
<% } %>
<% var gridInfoElem = gridInfo({model:model,viewType:viewType}) %>
<%= gridInfoElem %>
<%
for(var index = 0; index < options.length; index++){
var action = options[index];
%>
<% if(action==='favorite'){ %>
<%}%>
<% if(action==='download'){ %>
<%}%>
<% if(action==='share'){ %>
<%}%>
<% if(action==='remove'){ %>
<%}%>
<%}%>
<%}%>
<% if(adObj.displayAd && !adObj.adLoaded){
var adItem = adObj.item;
adObj.adLoaded = true;
adObj.loadAdScript = true;
%>
<% if(adObj.adId==4323055) {%>
<%} else if(adObj.adId==4498569){%>
<%} else if(adObj.adId==4498571) {%>
<%} else if(adObj.adId==4498570) {%>
<%} else if(adObj.adId==4498572) {%>
<%}%>
<%}%>
<%}%>