mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
🎨 Database gallery view https://github.com/siyuan-note/siyuan/issues/10414
This commit is contained in:
parent
d05010a71f
commit
041c4102cd
3 changed files with 6 additions and 6 deletions
|
@ -1266,7 +1266,7 @@ func GetCurrentAttributeViewImages(avID, viewID, query string) (ret []string, er
|
|||
view = attrView.GetView(attrView.ViewID)
|
||||
}
|
||||
|
||||
table := sql.RenderAttributeViewTable(attrView, view, query)
|
||||
table := getAttrViewTable(attrView, view, query)
|
||||
table.Filter(attrView)
|
||||
table.Sort(attrView)
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ func ExportAv2CSV(avID, blockID string) (zipPath string, err error) {
|
|||
}
|
||||
|
||||
name := util.FilterFileName(getAttrViewName(attrView))
|
||||
table := getAttrViewTable(attrView, view)
|
||||
table := getAttrViewTable(attrView, view, "")
|
||||
|
||||
// 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474
|
||||
table.Filter(attrView)
|
||||
|
@ -2492,7 +2492,7 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold, avHiddenCol bool,
|
|||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
table := getAttrViewTable(attrView, view)
|
||||
table := getAttrViewTable(attrView, view, "")
|
||||
|
||||
// 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474
|
||||
table.Filter(attrView)
|
||||
|
@ -3394,7 +3394,7 @@ func loadTreeWithCache(id string, treeCache *map[string]*parse.Tree) (tree *pars
|
|||
return
|
||||
}
|
||||
|
||||
func getAttrViewTable(attrView *av.AttributeView, view *av.View) (ret *av.Table) {
|
||||
func getAttrViewTable(attrView *av.AttributeView, view *av.View, query string) (ret *av.Table) {
|
||||
switch view.LayoutType {
|
||||
case av.LayoutTypeGallery:
|
||||
view.Table = av.NewLayoutTable()
|
||||
|
@ -3405,6 +3405,6 @@ func getAttrViewTable(attrView *av.AttributeView, view *av.View) (ret *av.Table)
|
|||
view.Table.RowIDs = append(view.Table.RowIDs, cardID)
|
||||
}
|
||||
}
|
||||
ret = sql.RenderAttributeViewTable(attrView, view, "")
|
||||
ret = sql.RenderAttributeViewTable(attrView, view, query)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ func RenderTemplate(p, id string, preview bool) (tree *parse.Tree, dom string, e
|
|||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
table := sql.RenderAttributeViewTable(attrView, view, "")
|
||||
table := getAttrViewTable(attrView, view, "")
|
||||
|
||||
var aligns []int
|
||||
for range table.Columns {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue