<% if(_preloadData && _preloadData.childNodes ) { var baseurl = window.location.protocol + '//' + window.location.hostname + '/app'; var data = _preloadData; var children = data.childNodes; var model=data.nodeValue; var children=data.childNodes; console.log("value --> " + model.value); if(model.hasDocumentResults === true) { if(model.value === "BILLNUMBERLIST") { // sort by lastpage for billnumberlist order as follows (hjres,house,senate,sjres) children = _.sortBy(children, function(item) {return item.nodeValue.lastpage;}); var previouslp = ""; _.each(children, function(item){ if(item.nodeValue["lastpage"] === previouslp) { previouslp = item.nodeValue['lastpage']; item.nodeValue["lastpage"] = ""; } else { previouslp = item.nodeValue['lastpage']; } },_this); } else if(model.value === "CONRES") { // sort by section children = _.sortBy(children, function(item) {return item.nodeValue.section}); var previouslp = ""; _.each(children, function(item){ if(item.nodeValue["lastpage"] === previouslp) { previouslp = item.nodeValue['lastpage']; item.nodeValue["lastpage"] = ""; } else { previouslp = item.nodeValue['lastpage']; } },_this); } else if(model.value === "POPULARNAMELIST") { // sort by shorttitle and title children = _.sortBy(children, function(item) {return (item.nodeValue.shorttitle !== "") ? item.nodeValue.shorttitle : item.nodeValue.title}); _.each(children, function(item){ item.nodeValue["lastpage"] = ""; },_this); } else { _.each(children, function(item){ item.nodeValue["lastpage"] = ""; },_this); } } var volume = model.value - 1886; var toggleiconclass = children.length > 0 ? ' fa-minus-circle':' fa-plus-circle'; var collapse = children.length > 0 ? 'collapse in':'collapse'; var sort = children.length > 1 ? 'none':'none'; var href = '/' + model.collectionCode.toLowerCase() + '/' + model.browsePathAlias ; var rand = model.level + Math.floor(Math.random() * 9999);%>
<% if(model.hasOwnProperty("level") && model.level === 1) { %>
<% } %>
<% if(model.hasOwnProperty("entireIssueDetails")) { %> <%=_this.snippet('entireissue', { _preloadData : model })%> <%} %> <% if((data.nodeValue.hasDocumentResults === true) && (children && children.length > 1) && !_this.dic) { %> <% if(_this.paginationenabledleaf === true) { %> <%= _this.snippet('pagination', { _preloadData : _preloadData,_this :_this}) %> <% } %> Sort " > <%} %> <% for(var i=0,l=children.length;i <%=_this.snippet('statuteleaf', { _preloadData : children[i] })%> <%} else {%> <%=_this.snippet('statutenode', { _preloadData : children[i]})%> <%} %> <%} %>
<% } else { %> <%=_this.snippet('errornotification', {errorText: 'Error Occured. Please try again later ..'})%> <% } %>