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
|
|
@ -72,6 +72,8 @@ func RenderGroupView(attrView *av.AttributeView, view, groupView *av.View, query
|
|||
groupView.Table.Columns = view.Table.Columns
|
||||
case av.LayoutTypeGallery:
|
||||
groupView.Gallery.CardFields = view.Gallery.CardFields
|
||||
case av.LayoutTypeKanban:
|
||||
groupView.Kanban.Fields = view.Kanban.Fields
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,6 +104,8 @@ func renderView(attrView *av.AttributeView, view *av.View, query string, depth *
|
|||
ret = RenderAttributeViewTable(attrView, view, query, depth, cachedAttrViews)
|
||||
case av.LayoutTypeGallery:
|
||||
ret = RenderAttributeViewGallery(attrView, view, query, depth, cachedAttrViews)
|
||||
case av.LayoutTypeKanban:
|
||||
ret = RenderAttributeViewKanban(attrView, view, query, depth, cachedAttrViews)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -784,6 +788,16 @@ func removeMissingField(attrView *av.AttributeView, view *av.View, missingKeyID
|
|||
}
|
||||
}
|
||||
|
||||
if nil != view.Kanban {
|
||||
for i, kanbanField := range view.Kanban.Fields {
|
||||
if kanbanField.ID == missingKeyID {
|
||||
view.Kanban.Fields = append(view.Kanban.Fields[:i], view.Kanban.Fields[i+1:]...)
|
||||
changed = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if changed {
|
||||
av.SaveAttributeView(attrView)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue