Indice (TOC)
Per ripristinare devi confrontare la versione attuale con la versione desiderata, selezionando entrambe nell'Archivio Versioni.
Comparazione combinata delle revisioni
/*Questo modello riceve due parametri:
//--search: è la string da apssare a lucene per cercare le pagine
//--table_key: opzionale, è la stringa contenuta in caption di una tabella per restringere la ricerca alle sole pagine che contengono un modello (identificato appunto da quella stringa) */ /* ----------- CONFIG ------------- */ var error = FALSE; var search = $search ?? $0 ?? "path :"..page.path.."/*"; var r = wiki.getsearch(search,1000,'title');
if (#r == 0) {
web.html("<p>No page searched with ("..search..")!</p>");
let error = TRUE;
} var output = ""; var index = ""; var tables = []; var xpath = '//table[normalize-space(caption)=\''.. args.table_key ..'\']'; /* --------------------------------- */
if (error == FALSE) { var printlink = web.link("/index.php?title="..page.path.."&action=print","STAMPA PAGINA",page.path,"_blank"); var pdflink = web.link("/@api/deki/pages/"..page.id.."/pdf","ESPORTA PDF",page.path,"_blank"); web.html("<p>Questa pagina aggrega i dati nel seguente modo: <ul><li>Cerca le pagine nella wiki con il comando ("..search..")</li> <li> seleziona quelle che contengono una tabella con intestazione ("..args.table_key..")</li> <li>estrae le pagine contenute e le include qui</li> <li>utilizza le funzioni "..printlink.." e "..pdflink.."</li></ul> </p>"); foreach (var p in r) { if (string.length(args.table_key) > 0) { let tables = xml.list(wiki.Page(p.path),xpath, nil, true); }
if (#tables[0] > 0 || string.length(args.table_key) == 0 ) { let index ..="<li>"..p.path.."</li>"; let output ..= '<div style="page-break-after: always; "><span style="DISPLAY:none"> </span></div>'; let output ..="<div style='padding:5px; margin-bottom:15px; border-top:2px solid #000000; background:#eeeeee;'><h3>"..p.path.."</h3>"; let output ..= "<p>Pagina "..web.link(p.uri, p.name).." modificata da: "..p.author.name.." il "..date.format(p.date,"dd/MM/yy - HH:mm").."</p></div>"; let output ..= wiki.page(p.path)
}
} web.html("<hr><h2>Indice pagine estratte:</h2><ul>"..index.."</ul>"); web.html(output); }
Versione da 11:22, 22 Lug 2010
Questo modello riceve due parametri:-search: è la string da apssare a lucene per cercare le pagine-table_key: opzionale, è la stringa contenuta in caption di una tabella per restringere la ricerca alle sole pagine che contengono un modello (identificato appunto da quella stringa) /* ----------- CONFIG ------------- */ var error = FALSE; var search = $search ?? $0 ?? "path :"..page.path.."/*"; var r = wiki.getsearch(search,1000,'title');
if (#r == 0) {
web.html("<p>No page searched with ("..search..")!</p>");
let error = TRUE;
} var output = ""; var index = ""; var tables = []; var xpath = '//table[normalize-space(caption)=\''.. args.table_key ..'\']'; /* --------------------------------- */
if (error == FALSE) { var printlink = web.link("/index.php?title="..page.path.."&action=print","STAMPA PAGINA",page.path,"_blank"); var pdflink = web.link("/@api/deki/pages/"..page.id.."/pdf","ESPORTA PDF",page.path,"_blank"); web.html("<p>Questa pagina aggrega i dati nel seguente modo: <ul><li>Cerca le pagine nella wiki con il comando ("..search..")</li> <li> seleziona quelle che contengono una tabella con intestazione ("..args.table_key..")</li> <li>estrae le pagine contenute e le include qui</li> <li>utilizza le funzioni "..printlink.." e "..pdflink.."</li></ul> </p>"); foreach (var p in r) { if (string.length(args.table_key) > 0) { let tables = xml.list(wiki.Page(p.path),xpath, nil, true); }
if (#tables[0] > 0 || string.length(args.table_key) == 0 ) { let index ..="<li>"..p.path.."</li>"; let output ..= '<div style="page-break-after: always; "><span style="DISPLAY:none"> </span></div>'; let output ..="<div style='padding:5px; margin-bottom:15px; border-top:2px solid #000000; background:#eeeeee;'><h3>"..p.path.."</h3>"; let output ..= "<p>Pagina "..web.link(p.uri, p.name).." modificata da: "..p.author.name.." il "..date.format(p.date,"dd/MM/yy - HH:mm").."</p></div>"; let output ..= wiki.page(p.path)
}
} web.html("<hr><h2>Indice pagine estratte:</h2><ul>"..index.."</ul>"); web.html(output); }
Versione di 11:22, 22 Lug 2010
/*Questo modello riceve due parametri:
//- search: è la string da apssare a lucene per cercare le pagine
//- table_key: opzionale, è la stringa contenuta in caption di una tabella per restringere la ricerca alle sole pagine che contengono un modello (identificato appunto da quella stringa) */ /* ----------- CONFIG ------------- */ var error = FALSE; var search = $search ?? $0 ?? "path :"..page.path.."/*"; var r = wiki.getsearch(search,1000,'title');
if (#r == 0) {
web.html("<p>No page searched with ("..search..")!</p>");
let error = TRUE;
} var output = ""; var index = ""; var tables = []; var xpath = '//table[normalize-space(caption)=\''.. args.table_key ..'\']'; /* --------------------------------- */
if (error == FALSE) { var printlink = web.link("/index.php?title="..page.path.."&action=print","STAMPA PAGINA",page.path,"_blank"); var pdflink = web.link("/@api/deki/pages/"..page.id.."/pdf","ESPORTA PDF",page.path,"_blank"); web.html("<p>Questa pagina aggrega i dati nel seguente modo: <ul><li>Cerca le pagine nella wiki con il comando ("..search..")</li> <li> seleziona quelle che contengono una tabella con intestazione ("..args.table_key..")</li> <li>estrae le pagine contenute e le include qui</li> <li>utilizza le funzioni "..printlink.." e "..pdflink.."</li></ul> </p>"); foreach (var p in r) { if (string.length(args.table_key) > 0) { let tables = xml.list(wiki.Page(p.path),xpath, nil, true); }
if (#tables[0] > 0 || string.length(args.table_key) == 0 ) { let index ..="<li>"..p.path.."</li>"; let output ..= '<div style="page-break-after: always; "><span style="DISPLAY:none"> </span></div>'; let output ..="<div style='padding:5px; margin-bottom:15px; border-top:2px solid #000000; background:#eeeeee;'><h3>"..p.path.."</h3>"; let output ..= "<p>Pagina "..web.link(p.uri, p.name).." modificata da: "..p.author.name.." il "..date.format(p.date,"dd/MM/yy - HH:mm").."</p></div>"; let output ..= wiki.page(p.path)
}
} web.html("<hr><h2>Indice pagine estratte:</h2><ul>"..index.."</ul>"); web.html(output); }
