#78 - include file boxes in page children for sidebar
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e32d38e9b6
commit
1758340a7b
@ -280,6 +280,24 @@ class Page extends VersionedModel {
|
||||
})
|
||||
}
|
||||
|
||||
const FileBox = this.models.get('api:files:FileBox')
|
||||
const boxes = await FileBox.find({
|
||||
active: true,
|
||||
pageId: this.UUID,
|
||||
})
|
||||
|
||||
for ( const box of boxes ) {
|
||||
if ( box.parentUUID ) continue; // only show top-level
|
||||
|
||||
children.push({
|
||||
id: box.pageId,
|
||||
// node_id // FIXME need to track this w/ the file boxes
|
||||
children: [],
|
||||
type: 'file_box',
|
||||
name: box.name,
|
||||
})
|
||||
}
|
||||
|
||||
const Codium = this.models.get('api:Codium')
|
||||
const codiums = await Codium.find({
|
||||
PageId: this.UUID,
|
||||
|
Loading…
Reference in New Issue
Block a user