Commit 68ba456f authored by Traboulsi's avatar Traboulsi
Browse files

Update public/js/add_paper.js

parent 549f2bcd
Pipeline #8721 passed with stage
in 11 seconds
...@@ -3,6 +3,8 @@ var item_id = 0 ...@@ -3,6 +3,8 @@ var item_id = 0
function addpaper(item) { function addpaper(item) {
var new_row = document.getElementById("cont_paper") var new_row = document.getElementById("cont_paper")
if (item === undefined) { if (item === undefined) {
} else { } else {
...@@ -23,6 +25,10 @@ function addpaper(item) { ...@@ -23,6 +25,10 @@ function addpaper(item) {
authors = authors.substring(0, authors.length - 2); authors = authors.substring(0, authors.length - 2);
last_item = item last_item = item
// check if abstract is available in the item object
var abstract = item.item.abtract ? '<p>' + item.item.abstract + '</p>' : '' ;
var PDF_HTML = '' var PDF_HTML = ''
var PDF_HTML = item.links.pdf != "" ? `<a type="button" href="${item.links.pdf}" class="btn btn-outline-success btn-circle" target="_blank"> <i class="far fa-file-pdf"> </i></a> PDF ` : "" var PDF_HTML = item.links.pdf != "" ? `<a type="button" href="${item.links.pdf}" class="btn btn-outline-success btn-circle" target="_blank"> <i class="far fa-file-pdf"> </i></a> PDF ` : ""
...@@ -67,6 +73,7 @@ function addpaper(item) { ...@@ -67,6 +73,7 @@ function addpaper(item) {
keywords + keywords +
'</small>' + '</small>' +
'</h5>' + '</h5>' +
abstract + // Include the abstract here
doi + doi +
'<br>' + '<br>' +
PDF_HTML + ' ' + PDF_HTML + ' ' +
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment