<% _this.indentRest = false;
_.each(model.entireIssueDetails, function(item) {
shareTitle = "Unavailable"; %>
<% if(item.hasOwnProperty("imagesrc") && _this.dic) { %>
<%- item.title %>
<% if( item.renditions && item.renditions.length > 0) { %>
<% var sorts = [ "PDF", "XML","USLM","TOC","DETAILS","SHARE"];
if(item.renditions){
item.renditions = item.renditions.sort(
function(x, y)
{
return sorts.indexOf(x.renditionType) - sorts.indexOf(y.renditionType);
}
);
}
_.each(item.renditions, function(item1) { %>
<% if(item1.renditionType == "DETAILS"){
detailsLink = item1.linkAddress;
shareTitle = model.collectionCode;
var lowercase = model.collectionCode.toLowerCase();
if(_this.uiprops.collectiondescription[lowercase]){
shareTitle = _this.uiprops.collectiondescription[lowercase];
}
if(model.displayValue){
shareTitle += " " + model.displayValue;
} else {
shareTitle += " " + "Entire Issue";
}
}%>
class="btn btn-sm btn-format" href="<%- item1.linkAddress %>"><%- item1.renditionType %> <% }); %>
<% if(shareTitle !== "Unavailable" && shareTitle.indexOf("United States Government Manual") == -1) { %>
Share
<% } else { %>
Share
<% } %>
<% } %>
<% } else {%>
<% if(item.hasOwnProperty("title") && item.title !== "" && item.title != "Entire Issue") { %>
<% if( item.renditions && item.renditions.length > 0) { %>
<% var sorts = [ "PDF", "XML","USLM","TOC","DETAILS","SHARE"];
if(item.renditions){
item.renditions = item.renditions.sort(
function(x, y)
{
return sorts.indexOf(x.renditionType) - sorts.indexOf(y.renditionType);
}
);
}
_.each(item.renditions, function(item1) { %>
<% if(item1.renditionType == "DETAILS"){
detailsLink = item1.linkAddress;
shareTitle = model.collectionCode;
var lowercase = model.collectionCode.toLowerCase();
if(_this.uiprops.collectiondescription[lowercase]){
shareTitle = _this.uiprops.collectiondescription[lowercase];
}
if(model.displayValue){
shareTitle += " " + model.displayValue;
} else {
shareTitle += " " + "Entire Issue";
}
}%>
<% if(item.hasOwnProperty("title") && item.title !== "" && item.title == "View Entire Section") {
shareTitle= model.displayValue ? item.title + " - " + model.displayValue : item.title;
}%>
class="btn btn-sm btn-format" href="<%- item1.linkAddress %>"><%- item1.renditionType %> <% }); %>
<% if(shareTitle !== "Unavailable" && shareTitle.indexOf("United States Government Manual") == -1) { %>
Share
<% } else { %>
Share
<% } %>
<% } %>
<% } else if(item.hasOwnProperty("alternateTitle") && item.alternateTitle !== "") { %>
<%- item.alternateTitle %>
<% if( item.renditions && item.renditions.length > 0) { %>
<% var sorts = [ "PDF", "XML","USLM","TOC","DETAILS","SHARE"];
if(item.renditions){
item.renditions = item.renditions.sort(
function(x, y)
{
return sorts.indexOf(x.renditionType) - sorts.indexOf(y.renditionType);
}
);
}
_.each(item.renditions, function(item1) { %>
<% if(item1.renditionType == "DETAILS"){
detailsLink = item1.linkAddress;
shareTitle = model.collectionCode;
var lowercase = model.collectionCode.toLowerCase();
if(_this.uiprops.collectiondescription[lowercase]){
shareTitle = _this.uiprops.collectiondescription[lowercase];
}
if(model.displayValue){
shareTitle += " " + model.displayValue;
} else {
shareTitle += " " + "Entire Issue";
}
}%>
class="btn btn-sm btn-format" href="<%- item1.linkAddress %>"><%- item1.renditionType %> <% }); %>
<% if(shareTitle !== "Unavailable" && shareTitle.indexOf("United States Government Manual") == -1) { %>
Share
<% } else { %>
Share
<% } %>
<% } %>
<% } else {
this.indentRest = true;
%>
<% if( item.renditions && item.renditions.length > 0) { %>
<% var sorts = [ "PDF", "XML","USLM","TOC","DETAILS","SHARE"];
if(item.renditions){
item.renditions = item.renditions.sort(
function(x, y)
{
return sorts.indexOf(x.renditionType) - sorts.indexOf(y.renditionType);
}
);
}
_.each(item.renditions, function(item1) { %>
<% if(item1.renditionType == "DETAILS"){
detailsLink = item1.linkAddress;
shareTitle = model.collectionCode;
var lowercase = model.collectionCode.toLowerCase();
if(_this.uiprops.collectiondescription[lowercase]){
shareTitle = _this.uiprops.collectiondescription[lowercase];
}
if(model.displayValue){
shareTitle += " " + model.displayValue;
} else {
shareTitle += " " + "Entire Issue";
}
}%>
class="btn btn-sm btn-format" href="<%- item1.linkAddress %>"><%- item1.renditionType %> <% }); %>
<% if(shareTitle !== "Unavailable" && shareTitle.indexOf("United States Government Manual") == -1) { %>
Share
<% } else { %>
Share
<% } %>
<% } %>
<% } %>
<% } %>
<% },_this); %>