This commit is contained in:
@@ -939,6 +939,35 @@ class BibtexbrowserTest extends PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals('foo bar title, howpublished. [bibtex]', strip_tags($data[0]->toHTML()));
|
||||
}
|
||||
|
||||
function test_note() {
|
||||
// fix https://github.com/monperrus/bibtexbrowser/issues/131
|
||||
bibtexbrowser_configure('BIBLIOGRAPHYSTYLE','DefaultBibliographyStyle');
|
||||
bibtexbrowser_configure('BIBTEXBROWSER_BIBTEX_LINKS',false);
|
||||
bibtexbrowser_configure('BIBTEXBROWSER_PDF_LINKS',false);
|
||||
$bibtex = "
|
||||
@inproceedings{exampleEntry,
|
||||
author = {Aurora Macías and Elena Navarro and Carlos E. Cuesta and Uwe Zdun},
|
||||
title = {Architecting Digital Twins Using a Domain-Driven Design-Based Approach},
|
||||
booktitle = {XXVII Jornadas de Ingenier'{\i}a del Software y Bases de Datos (JISBD 2023)},
|
||||
month = {September},
|
||||
note = {handle: 11705/JISBD/2023/7321},
|
||||
year = {2023},
|
||||
url = {https://hdl.handle.net/11705/JISBD/2023/7321},
|
||||
month = {September},
|
||||
pages = {1--1},
|
||||
publisher = {SISTEDES},
|
||||
editor = {Amador Dur'{a}n Toro},
|
||||
}";
|
||||
$test_data = fopen('php://memory','x+');
|
||||
fwrite($test_data, $bibtex);
|
||||
fseek($test_data,0);
|
||||
$db = new BibDataBase();
|
||||
$db->update_internal("inline", $test_data);
|
||||
// print_r($db);
|
||||
$data = array_values($db->bibdb);
|
||||
$this->assertEquals(' Architecting Digital Twins Using a Domain-Driven Design-Based Approach (Aurora Macías, Elena Navarro, Carlos E. Cuesta and Uwe Zdun), In XXVII Jornadas de Ingenier\'ia del Software y Bases de Datos (JISBD 2023) (Amador Dur\'an Toro, ed.), SISTEDES, 2023, handle: 11705/JISBD/2023/7321. ', strip_tags($data[0]->toHTML()));
|
||||
}
|
||||
|
||||
|
||||
} // end class
|
||||
|
||||
|
||||
+8
-4
@@ -2095,22 +2095,22 @@ function get_HTML_tag_for_layout() {
|
||||
function bib2links_default($bibentry) {
|
||||
$links = array();
|
||||
|
||||
if (BIBTEXBROWSER_BIBTEX_LINKS) {
|
||||
if (c('BIBTEXBROWSER_BIBTEX_LINKS')) {
|
||||
$link = $bibentry->getBibLink();
|
||||
if ($link != '') { $links[] = $link; };
|
||||
}
|
||||
|
||||
if (BIBTEXBROWSER_PDF_LINKS) {
|
||||
if (c('BIBTEXBROWSER_PDF_LINKS')) {
|
||||
$link = $bibentry->getUrlLink();
|
||||
if ($link != '') { $links[] = $link; };
|
||||
}
|
||||
|
||||
if (BIBTEXBROWSER_DOI_LINKS) {
|
||||
if (c('BIBTEXBROWSER_DOI_LINKS')) {
|
||||
$link = $bibentry->getDoiLink();
|
||||
if ($link != '') { $links[] = $link; };
|
||||
}
|
||||
|
||||
if (BIBTEXBROWSER_GSID_LINKS) {
|
||||
if (c('BIBTEXBROWSER_GSID_LINKS')) {
|
||||
$link = $bibentry->getGSLink();
|
||||
if ($link != '') { $links[] = $link; };
|
||||
}
|
||||
@@ -2451,6 +2451,10 @@ function DefaultBibliographyStyle($bibentry) {
|
||||
|
||||
if ($bibentry->hasField(YEAR)) $entry[] = '<span itemprop="datePublished">'.$bibentry->getYear().'</span>';
|
||||
|
||||
if ($bibentry->hasField("note")) {
|
||||
$entry[] = $bibentry->getField("note");
|
||||
}
|
||||
|
||||
$result = implode(", ",$entry).'.';
|
||||
|
||||
// add the Coin URL
|
||||
|
||||
Reference in New Issue
Block a user