mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 21:08:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b46100b29c
2 changed files with 19 additions and 4 deletions
|
|
@ -80,7 +80,7 @@ func ExportAv2CSV(avID, blockID string) (zipPath string, err error) {
|
|||
}
|
||||
|
||||
name := util.FilterFileName(getAttrViewName(attrView))
|
||||
table := sql.RenderAttributeViewTable(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 := sql.RenderAttributeViewTable(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)
|
||||
|
|
@ -3380,3 +3380,18 @@ func loadTreeWithCache(id string, treeCache *map[string]*parse.Tree) (tree *pars
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getAttrViewTable(attrView *av.AttributeView, view *av.View) (ret *av.Table) {
|
||||
switch view.LayoutType {
|
||||
case av.LayoutTypeGallery:
|
||||
view.Table = av.NewLayoutTable()
|
||||
for _, field := range view.Gallery.CardFields {
|
||||
view.Table.Columns = append(view.Table.Columns, &av.ViewTableColumn{ID: field.ID})
|
||||
}
|
||||
for _, cardID := range view.Gallery.CardIDs {
|
||||
view.Table.RowIDs = append(view.Table.RowIDs, cardID)
|
||||
}
|
||||
}
|
||||
ret = sql.RenderAttributeViewTable(attrView, view, "")
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query
|
|||
galleryCard.Values = append(galleryCard.Values, fieldValue)
|
||||
}
|
||||
|
||||
fillGalleryCardCover(attrView, view, cardValues, &galleryCard, cardID, luteEngine)
|
||||
fillAttributeViewGalleryCardCover(attrView, view, cardValues, &galleryCard, cardID, luteEngine)
|
||||
ret.Cards = append(ret.Cards, &galleryCard)
|
||||
}
|
||||
|
||||
|
|
@ -336,7 +336,7 @@ func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query
|
|||
return
|
||||
}
|
||||
|
||||
func fillGalleryCardCover(attrView *av.AttributeView, view *av.View, cardValues []*av.KeyValues, galleryCard *av.GalleryCard, cardID string, luteEngine *lute.Lute) {
|
||||
func fillAttributeViewGalleryCardCover(attrView *av.AttributeView, view *av.View, cardValues []*av.KeyValues, galleryCard *av.GalleryCard, cardID string, luteEngine *lute.Lute) {
|
||||
switch view.Gallery.CoverFrom {
|
||||
case av.CoverFromNone:
|
||||
case av.CoverFromContentImage:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue