diff --git a/public/js/add_paper.js b/public/js/add_paper.js index 0d434e3512e98dcc3671494016924fd9128984bd..62fa9efb2f3eece8454b10b0949f8ebc9924d59a 100644 --- a/public/js/add_paper.js +++ b/public/js/add_paper.js @@ -20,12 +20,18 @@ function addpaper(item) { } authors = authors.substring(0, authors.length - 2); - // Prepare YouTube Link - // var array_contains_youtube = true - var YouTubeHTML = '' + last_item = item + var PDF_HTML = '' if ('pdf' in item.links) { // to be replaced by if (item.YouTubelink) or so... - var YouTubelink = item.links.youtube // to be replaced by item.YouTubelink or so... - YouTubeHTML = `<button type="button" href="${YouTubelink}" class="btn btn-outline-info btn-circle"> <i class="fas fa-globe"></i> </button>Link` + + var pdf_link = item.links.pdf // to be replaced by item.pdf_link or so... + PDF_HTML = `<a type="button" href="${pdf_link}" class="btn btn-outline-success btn-circle" target="_blank"> <i class="far fa-file-pdf"> </i></a> 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 = `<a type="button" href="${url}" class="btn btn-outline-info btn-circle" target="_blank"> <i class="fas fa-globe"></i> </a> Link ` } // Do Authors and Keywords var doi @@ -37,13 +43,7 @@ function addpaper(item) { doi = '<small class="text-muted"> ' + item.item.conference.name + ',' + item.item.conference.date + ', ' + item.item.DOI } - // Prepare Explore Link - // var array_contains_explore_link = true - var ExploreHTML = '' - if ('demo' in item.links) { // to be replaced by if (item.YouTubelink) or so... - var ExploreLink = item.links.demo // to be replaced by item.ExploreLink or so... - ExploreHTML = `<button type="button" href="${ExploreLink}" class="btn btn-outline-success btn-circle"> <i class="far fa-file-pdf"> </i></button>PDF` - } + new_row.innerHTML = new_row.innerHTML + '<div class="card" style="max-width: 1080px;">' + '<div class="row">' + @@ -63,11 +63,11 @@ function addpaper(item) { '</h5>' + doi + '<br>' + - ExploreHTML + + PDF_HTML + ' ' + //BIBTEX BUTTON // '<button type="button" class="btn btn-outline-danger btn-circle" data-toggle="collapse" data-target="#bibtex-paper-vision" aria-expanded="false" aria-controls="bibtex-paper-vision"> <i class="fas fa-code"></i> </button>BIB' + - YouTubeHTML + + UrlHTML + '</small>' + // BIBTEX area