mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
✨ Database kanban view https://github.com/siyuan-note/siyuan/issues/8873
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
3211d331fa
commit
7acf6f5225
6 changed files with 395 additions and 9 deletions
|
|
@ -167,6 +167,8 @@ func renderAttributeViewGroups(viewable av.Viewable, attrView *av.AttributeView,
|
|||
groupView.Table.Columns = nil
|
||||
case av.LayoutTypeGallery:
|
||||
groupView.Gallery.CardFields = nil
|
||||
case av.LayoutTypeKanban:
|
||||
groupView.Kanban.Fields = nil
|
||||
}
|
||||
}
|
||||
viewable.SetGroups(groups)
|
||||
|
|
@ -402,6 +404,19 @@ func renderViewableInstance(viewable av.Viewable, view *av.View, attrView *av.At
|
|||
end = len(gallery.Cards)
|
||||
}
|
||||
gallery.Cards = gallery.Cards[start:end]
|
||||
case av.LayoutTypeKanban:
|
||||
kanban := viewable.(*av.Kanban)
|
||||
kanban.CardCount = 0
|
||||
kanban.PageSize = view.PageSize
|
||||
if 1 > pageSize {
|
||||
pageSize = kanban.PageSize
|
||||
}
|
||||
start := (page - 1) * pageSize
|
||||
end := start + pageSize
|
||||
if len(kanban.Cards) < end {
|
||||
end = len(kanban.Cards)
|
||||
}
|
||||
kanban.Cards = kanban.Cards[start:end]
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue