var item_debug var item_id = 0 function addpaper(item) { var new_row = document.getElementById("cont_paper") if (item === undefined) { } else { item_debug = item var authors = ""; for (var i = 0; i < item.item.authors.length; i++) { authors += item.item.authors[i].lastName + ", " + item.item.authors[i].firstName.substring(0, 1) + "., " //Do something } var keywords = ""; // check if there is keywords in item if (item.item.keywords !== undefined) { for (var i = 0; i < item.item.keywords.length; i++) { keywords += '' + item.item.keywords[i] + '' //Do something } } authors = authors.substring(0, authors.length - 2); last_item = item var PDF_HTML = '' var PDF_HTML = item.links.pdf != "" ? ` PDF ` : "" var UrlHTML = '' if ('url' in item.links) { // to be replaced by if (item.YouTubelink) or so... var url = item.links.url // to be replaced by item.pdf or so... UrlHTML = ` Link ` } // Do Authors and Keywords var doi = "" if ('journal' in item.item) { doi += ' ' doi += item.item.conference.name && item.item.journal.name != "" ? item.item.journal.name + ' ' : "" doi += item.item.conference.volume && item.item.journal.volume != "" ? item.item.journal.volume + ' ' : "" doi += item.item.conference.pages && item.item.journal.pages != "" ? item.item.journal.pages + ' ' : "" doi += item.item.conference.DOI && item.item.DOI != "" && item.item.DOI != undefined ? item.item.journal.DOI + ' ' : "" doi += `` } if ('conference' in item.item) { doi += ' ' doi += item.item.conference.name && item.item.conference.name != "" ? item.item.conference.name + ' ' : "" doi += item.item.conference.date && item.item.conference.date != "" ? item.item.conference.date + ' ' : "" doi += item.item.conference.DOI && item.item.conference.DOI != "" ? item.item.conference.DOI + ' ' : "" doi += `` } item_id += 1 var bibtex_content = item.bibtex ? ` Bib
${item.bibtex}
` : "" new_row.innerHTML = new_row.innerHTML + '
' + '
' + '
' + '...' + '
' + '
' + '
' + '
' + '' + authors + '' + '
' + item.item.title + '
' + '' + keywords + '' + '
' + doi + '
' + PDF_HTML + ' ' + //BIBTEX BUTTON'BIB' + UrlHTML + '' + // BIBTEX area bibtex_content + '
' + '
' + '
' + '
' } }