diff options
Diffstat (limited to 'uploader/templates/publications/index.html')
-rw-r--r-- | uploader/templates/publications/index.html | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/uploader/templates/publications/index.html b/uploader/templates/publications/index.html index f6f6fa0..369812b 100644 --- a/uploader/templates/publications/index.html +++ b/uploader/templates/publications/index.html @@ -9,6 +9,12 @@ {%block contents%} {{flash_all_messages()}} +<div class="row" style="padding-bottom: 1em;"> + <a href="{{url_for('publications.create_publication')}}" + class="btn btn-primary"> + add new publication</a> +</div> + <div class="row"> <table id="tbl-list-publications" class="table compact stripe"> <thead> @@ -35,26 +41,32 @@ [ {data: "index"}, { + searchable: true, data: (pub) => { if(pub.PubMed_ID) { return `<a href="https://pubmed.ncbi.nlm.nih.gov/` + - `${pub.PubMed_ID}/" target="_blank">` + + `${pub.PubMed_ID}/" target="_blank" ` + + `title="Link to publication on NCBI.">` + `${pub.PubMed_ID}</a>`; } return ""; } }, { + searchable: true, data: (pub) => { var title = "βΈ»"; if(pub.Title) { title = pub.Title } return `<a href="/publications/view/${pub.Id}" ` + - `target="_blank">${title}</a>`; + `target="_blank" ` + + `title="Link to view publication details">` + + `${title}</a>`; } }, { + searchable: true, data: (pub) => { authors = pub.Authors.split(",").map( (item) => {return item.trim();}); @@ -66,16 +78,21 @@ } ], { + serverSide: true, ajax: { url: "/publications/list", dataSrc: "publications" }, scrollY: 700, - paging: false, + scroller: true, + scrollCollapse: true, + paging: true, deferRender: true, layout: { topStart: "info", - topEnd: "search" + topEnd: "search", + bottomStart: "pageLength", + bottomEnd: false } }); }); |