<% //Function to add commas to large numbers function commaSeparateNumber(val){ while (/(\d+)(\d{3})/.test(val.toString())){ val = val.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); } return val; } %> <% if (typeof southBoundCoord != "undefined"){ print('
'); } else{ print('
'); } %>
<% if((typeof abstract == 'undefined') || (abstract == "")){ print('
'); print(''); print('
'); } else{ var safeAbstract = abstract.replace(/\"/g, "'"); safeAbstract = "
"+safeAbstract+"
"; print('
'); print(''); print('
'); } %>
<% if (typeof southBoundCoord != "undefined"){ print(''); } else{ print(''); } %>
<% if (resourceMap) { // handle multiple resourceMaps if(resourceMap.length > 1){ print(''); } else{ print(''); } print(''); if(resourceMap.length > 1){ print(''); } print(''); print(''); if(resourceMap.length > 1){ print(''); } } %>
<% var count=0; _.each(origin, function(author) { count++; if (count > 1) { print(", ") } if (count > 1 && count == origin.length) { print("and ") } print(author) if (count == origin.length) { print(". ") } }) %> <% if(pubDate) { var pubDateFormatted = moment(pubDate).format('YYYY'); if(!isNaN(pubDateFormatted)) print(pubDateFormatted, '. '); } if(dateUploaded && isNaN(pubDateFormatted)){ var dateUploadedFormatted = moment(dateUploaded).format('YYYY'); if(!isNaN(dateUploadedFormatted)) print(dateUploadedFormatted, '. '); } %> <% if (title) { print('', title, '. '); } %> <%- id %>
<% if (typeof read_count_i != "undefined"){ print('', commaSeparateNumber(read_count_i), ''); } %>