Add menu item + CSS
This commit is contained in:
@@ -80,23 +80,23 @@ export class Finding {
|
||||
* @param {number} recordId
|
||||
*/
|
||||
async biblio(recordId) {
|
||||
let record = await this.fetchData(`${window.API_URL}/finding/${recordId}`);
|
||||
let finding = await this.fetchData(`${window.API_URL}/finding/${recordId}`);
|
||||
|
||||
let citations = '';
|
||||
|
||||
if (record.bibliography.length) {
|
||||
record.bibliography.forEach(biblio => {
|
||||
if (finding.bibliography.length) {
|
||||
finding.bibliography.forEach(record => {
|
||||
citations += `
|
||||
<span class="is-clickable is-capitalized has-text-link"
|
||||
data-action="click->biblio#open"
|
||||
id="cit-${biblio.id}">
|
||||
${biblio.citation.toLowerCase()}</span>`;
|
||||
id="cit-${record.id}">
|
||||
${record.citation.toLowerCase()}</span>`;
|
||||
|
||||
citations += biblio.pages?.length ? `, ${biblio.pages};` : ';';
|
||||
citations += record.pages?.length ? `, ${record.pages};` : ';';
|
||||
|
||||
this.biblioElements.push(`
|
||||
<div class="p-2 mt-2" id="ref-${biblio.id}">
|
||||
<p class="p-3">${biblio.reference}</p>
|
||||
<div class="p-2 mt-2" id="ref-${record.id}">
|
||||
<p class="p-3">${record.reference}</p>
|
||||
</div>
|
||||
`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user