const translate = { "Rimuovi": "Rimuovi", "Salva": "Salva", "Rifai Ricerca": "Cerca di nuovo", "Altri Scritti": "Altri scritti", "Scientifica": "Scientifica", "Pagina": capitalize("Pagina"), "pre_filter_label": "Visualizza dettagli per tipologia", "post_filter_label": "Filtra i risultati" }; // TODO mettere tutte le variabili sotto in 'translate' var SEO_CONTATTI = "CONTATTI"; var SEO_LOGIN = "LOGIN"; var SEO_BIOGRAFIA = "Biografia"; var SEO_NOTELEGALI = "NOTE LEGALI"; var SEO_REGISTRATI = "REGISTRATI"; var SEO_PASSWORD_DIMENTICATA = "Hai dimenticato la password"; var SEO_CAMBIA_PASSWORD = "Cambia password"; var SEO_CANCELLAMI_DAL_SITO = "Cancellami dal sito"; var SEO_TITLE_HOME = "Scritti di Luigi Giussani"; var SEO_DESCRIPTION_HOME = "Biblioteca digitale delle opere di don Luigi Giussani"; var SEO_RICERCA_AVANZATA = "RICERCA AVANZATA ยป"; var SEO_IN_UN_LIBRO = "IN UN LIBRO"; var SEO_INDICI_ALFABETICI = "INDICI ALFABETICI"; var SEO_DATI_BIBLIOGRAFICI = "Dati Bibliografici"; var SEO_LE_SERIE = "LE SERIE"; var SEO_COOKIES = "Gestione cookie"; var SEO_ACCOUNT = "MODIFICA I TUOI DATI"; var SEO_BIBLIOGRAFIA_SECONDARIA = "Bibliografia Secondaria"; function libro(Libro, $pag) { var bibliografia = Libro.LivelloScheda == "B" ? "bibliografia " : ""; _pag_ = $pag ? $pag.toString() : '1' $str = '
' + '
'+ '
Bibliografia Secondaria
'; $str += '

0) ? '\'' + encod(_DATA_.testocercato) + '\'' : '\'\''; $str += ','; $str += (Libro.Scheda && _DATA_['esatto'] && parseInt(Libro.Scheda) > 0) ? '\'' + _DATA_.esatto + '\'' : '\'\''; $str += ')">' + Libro.Intestazione_Titolo + '

' + '
' + '
' + '

' + translateRuoli(decodeURI(Libro.Surname)) + '

'; if (Libro.DatiBibliografici_Editore) $str += '

' + Libro.DatiBibliografici_Editore + '

'; if (Libro.Rivista) $str += '

' + Libro.Rivista + '

'; $str += (Libro.DatiBibliografici_Data == null || Libro.DatiBibliografici_Data.trim() == '' || Libro.DatiBibliografici_Data.trim() == '1900' ? '[s. d.]' : Libro.DatiBibliografici_Data) + '
' + lingLOC(Libro.Lingue) + '
' + 'Luogo di edizione' + ' : ' + Libro.LuogoDiEdizione + '
'; if (!isNaN(parseInt(Libro.NumeroPagina)) && parseInt(Libro.NumeroPagina) > 0) { $str += 'Pagine:' + ' ' + Libro.NumeroPagina.toString(); } if (Libro.Isbn != '') { $str += '
Isbn' + ' : ' + Libro.Isbn + '
'; } $str += '
' + '
' + '
' + '' + '
' + '
' + '
'; return $str; } function ritorna_libri($pag, Libri) { $ret = ''; //$ret += '
'; if (Libri) numero_libri_per_pagina = Libri.length > NumeroLibriPagina ? NumeroLibriPagina : Libri.length; else numero_libri_per_pagina = NumeroLibriPagina for (i = 0; i < numero_libri_per_pagina; i++) $ret += libro(Libri[i], $pag); return $ret; } function ritorna_occorrenze(Occorrenze, titolo) { str = ''; for (i = 0; i < Occorrenze.length; i++) { str = `${str}

${Occorrenze[i].Pagina} >>

${Occorrenze[i].Testo}`; } return str; } function carica_scheda(Scheda) { var descrizione = Scheda.Dati.Descrizione.replace('

', '').replace('

', '').replace('

', '').replace('', '').replace('', '').replace(' ', ' ').trim(); var $scheda = `

${descrizione}

${Scheda.Dati.Titolo}
`; if(Scheda.Nomi.length) { $scheda = $scheda + "
"; for (let nome of Scheda.Nomi) { $scheda = `${$scheda}
${nome.Authors}  ${nome.Ruolo}
`; } $scheda = $scheda + "
"; } $scheda = $scheda + "
"; if (Scheda.Dati.DatiBibliografici_Editore != "") $scheda += "" + Scheda.Dati.DatiBibliografici_Editore + "" if (Scheda.Dati.Lingue != "") $scheda += "" + Scheda.Dati.Lingue + "" if (Scheda.Dati.Rivista != "") $scheda += "" + Scheda.Dati.Rivista + "" //if (Scheda.Dati.DatiBibliografici_Data != "") $scheda += (Scheda.Dati.DatiBibliografici_Data == null || Scheda.Dati.DatiBibliografici_Data.trim() == '' || Scheda.Dati.DatiBibliografici_Data.trim() == '1900' ? '[s. d.]' : "" + Scheda.Dati.DatiBibliografici_Data) + "" if (Scheda.Dati.NumeroPagina != '0') { $scheda += "" + 'Pagine: ' + Scheda.Dati.NumeroPagina + ''; } if (_ISLOGGED_ && Scheda.Dati.Segnalibro == "1") { $scheda += '
' + '
'; } else { $scheda += '
' + '
'; } $scheda += '
'; /*$scheda += '

'+Scheda.LuogoDiEdizione+'

'+ '

'+Scheda.DatiBibliografici_Editore+'

'+ '

'Scheda.anno

*/ if (Scheda.Dati.UltimoAggiornamento) { $scheda += '
' $scheda += '

' + 'Ultimo aggiornamento' + '
' + Scheda.Dati.UltimoAggiornamento + '

' } if (_ADMINMODE_) $scheda += '
MODIFICA'; $scheda += '

' + descrizione + '



'; $scheda += '
'; if (Scheda.Dati.isconpdf == 1) { $scheda += '

' + 'Full Text' + '

'; } if (Scheda.PdfPresenteIn && Scheda.PdfPresenteIn.length > 0) { $scheda += '
' + '
' + '
'; for (var t in Scheda.PdfPresenteIn) { var pag_pdf = Scheda.PdfPresenteIn[t].Pagina if (!pag_pdf) pag_pdf = ''; else pag_pdf = ' ' + pag_pdf; $scheda += '' } $scheda += '
'; } else { if (Scheda.Dati.isconpdf != 1) $scheda += '

Leggi il full text nell\'edizione disponibile

' } // STORIA if (!Scheda.Dati.Storiaitalianavisibile || !Scheda.Dati.Storia) { $scheda += ''; } else { $scheda += '
' + '
' + '
' + Scheda.Dati.Storia + '
'; } //SINTESI if (!Scheda.Dati.Sintesiitalianavisibile || !Scheda.Dati.Sintesi) { $scheda += ''; } else { $scheda += '
' + '
' + '
' + Scheda.Dati.Sintesi + '
'; } //TRADUZIONI if (!Scheda.Dati.Storiaitalianavisibile || !Object.keys(Scheda.Traduzioni).length) { $scheda += ''; } else { $scheda += '
' + '
' + '
'; for (var t in Scheda.Traduzioni) { $scheda += '
' + '' + Scheda.Traduzioni[t].Titolo + ''; if (Scheda.Traduzioni[t].isconpdf) $scheda += '' $scheda += '
' } $scheda += '
'; } //OPERE COLLEGATE if (!Scheda.Dati.Storiaitalianavisibile || !Object.keys(Scheda.OpereCollegate).length) { $scheda += ''; } else { $scheda += '
' + '
' + '
'; for (var o in Scheda.OpereCollegate) { $scheda += '
' + Scheda.OpereCollegate[o].Titolo + ''; if (Scheda.OpereCollegate[o].isconpdf) $scheda += '' $scheda += '
' } $scheda += '
'; } // TRADUZIONI OPERE COLLEGATE if (!Scheda.Dati.Storiaitalianavisibile || !Object.keys(Scheda.TraduzioniOpereCollegate).length) { $scheda += ''; } else { $scheda += '
' + '' + '
' + '
'; for (var oc in Scheda.TraduzioniOpereCollegate) { $scheda += '
' + Scheda.TraduzioniOpereCollegate[oc].Titolo + ''; if (Scheda.TraduzioniOpereCollegate[oc].isconpdf) $scheda += '' $scheda += '
' } $scheda += '
'; } // TESTO MADRE //if (!Scheda.Dati.Storiaitalianavisibile || !Object.keys(Scheda.SchedaMadre).length) { if (!Object.keys(Scheda.SchedaMadre).length) { $scheda += ''; } else { $scheda += '
' + '
' + '
'; for (var m in Scheda.SchedaMadre) { var pp = Scheda.SchedaMadre[m].pagina; if (!pp) pp = ''; else pp = ' ' + pp; $scheda += '
' + Scheda.SchedaMadre[m].Titolo + pp + ''; if (Scheda.SchedaMadre[m].isconpdf) $scheda += '' $scheda += '
' } $scheda += '
'; } //NOMI if (!Object.keys(Scheda.Nomi).length) { $scheda += ''; } else { $scheda += '
' + '
' + '
'; for (var n in Scheda.Nomi) { $scheda += '
' + Scheda.Nomi[n].Authors + ' ' + Scheda.Nomi[n].Ruolo+'
'; } $scheda += '
'; } $scheda += '
'; $scheda += ''; return $scheda; } function translateRuoli(autoriRuoli) { var ls = autoriRuoli.split("
") var response = ""; ls.forEach(function (l) { for (var key in ruoliDict) { if (l.includes(key)) { response += l.replace(key, ruoliDict[key]) + "
" break; } } }); return response.slice(0, -4); }