You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
874 B

3 years ago
let {sourcetype, dateadded, language, author, publicationd, theme, readingd} = input;
3 years ago
const {globalFunc} = customJS
const DataType = 'Source'
let page = dv.pages()
3 years ago
.filter(p => {return !p.file.path.contains('00.01') && p.DocType !== undefined && p.DocType !== null && p.DocType.contains(DataType) && p.Source.Type !== undefined && p.Source.Type !== null && p.Source.Type.contains(`${sourcetype}`)})
3 years ago
const iArray = [sourcetype, dateadded, language, author, publicationd, theme, readingd];
const dArray = ["sourcetype", "dateadded", "language", "author", "publicationd", "theme", "readingd"];
3 years ago
if (page.length === 0) {
return '"No result matching your query"'
}
3 years ago
dv.table(globalFunc.GetTableHeaders(DataType, 0), page
.where(p => p && globalFunc.IsInSearch(p, DataType, dArray, iArray))
.sort(p => p.file.name, `asc`)
3 years ago
.map(p => globalFunc.GetTableMap(DataType, 0,p)));