mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
917a5125af
commit
9ae527c9a5
15 changed files with 34 additions and 23 deletions
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "اليوم",
|
||||
"262": "غدًا",
|
||||
"263": "التالي %d أيام",
|
||||
"264": "الحقل [%s] فارغ"
|
||||
"264": "الحقل [%s] فارغ",
|
||||
"265": "خارج النطاق"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Heute",
|
||||
"262": "Morgen",
|
||||
"263": "Nächste %d Tage",
|
||||
"264": "Das Feld [%s] ist leer"
|
||||
"264": "Das Feld [%s] ist leer",
|
||||
"265": "Außerhalb des Bereichs"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Today",
|
||||
"262": "Tomorrow",
|
||||
"263": "Next %d days",
|
||||
"264": "Field [%s] is empty"
|
||||
"264": "Field [%s] is empty",
|
||||
"265": "Out of range"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Hoy",
|
||||
"262": "Mañana",
|
||||
"263": "Próximos %d días",
|
||||
"264": "El campo [%s] está vacío"
|
||||
"264": "El campo [%s] está vacío",
|
||||
"265": "Fuera de rango"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Aujourd'hui",
|
||||
"262": "Demain",
|
||||
"263": "Les %d prochains jours",
|
||||
"264": "Le champ [%s] est vide"
|
||||
"264": "Le champ [%s] est vide",
|
||||
"265": "Hors de portée"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "היום",
|
||||
"262": "מחר",
|
||||
"263": "ה-%d ימים הבאים",
|
||||
"264": "השדה [%s] ריק"
|
||||
"264": "השדה [%s] ריק",
|
||||
"265": "מחוץ לטווח"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Oggi",
|
||||
"262": "Domani",
|
||||
"263": "Prossimi %d giorni",
|
||||
"264": "Il campo [%s] è vuoto"
|
||||
"264": "Il campo [%s] è vuoto",
|
||||
"265": "Fuori intervallo"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "今日",
|
||||
"262": "明日",
|
||||
"263": "次の %d 日間",
|
||||
"264": "フィールド [%s] の値が空です"
|
||||
"264": "フィールド [%s] の値が空です",
|
||||
"265": "範囲外"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Dzisiaj",
|
||||
"262": "Jutro",
|
||||
"263": "Następne %d dni",
|
||||
"264": "Pole [%s] jest puste"
|
||||
"264": "Pole [%s] jest puste",
|
||||
"265": "Poza zakresem"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Hoje",
|
||||
"262": "Amanhã",
|
||||
"263": "Próximos %d dias",
|
||||
"264": "O campo [%s] está vazio"
|
||||
"264": "O campo [%s] está vazio",
|
||||
"265": "Fora do intervalo"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Сегодня",
|
||||
"262": "Завтра",
|
||||
"263": "Следующие %d дней",
|
||||
"264": "Поле [%s] имеет пустое значение"
|
||||
"264": "Поле [%s] имеет пустое значение",
|
||||
"265": "Вне диапазона"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "今天",
|
||||
"262": "明天",
|
||||
"263": "未來 %d 天",
|
||||
"264": "字段 [%s] 值為空"
|
||||
"264": "字段 [%s] 值為空",
|
||||
"265": "不在範圍內"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "今天",
|
||||
"262": "明天",
|
||||
"263": "未来 %d 天",
|
||||
"264": "字段 [%s] 值为空"
|
||||
"264": "字段 [%s] 值为空",
|
||||
"265": "不在范围内"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ type BaseInstance struct {
|
|||
PageSize int `json:"pageSize"` // 每页项目数
|
||||
ShowIcon bool `json:"showIcon"` // 是否显示字段图标
|
||||
WrapField bool `json:"wrapField"` // 是否换行字段内容
|
||||
Folded bool `json:"folded,omitempty"` // 是否折叠
|
||||
Hidden bool `json:"hidden,omitempty"` // 是否隐藏
|
||||
|
||||
Groups []Viewable `json:"groups,omitempty"` // 分组实例列表
|
||||
GroupCalc *GroupCalc `json:"groupCalc,omitempty"` // 分组计算规则和结果
|
||||
|
|
|
|||
|
|
@ -1373,7 +1373,6 @@ func renderAttributeView(attrView *av.AttributeView, blockID, viewID, query stri
|
|||
}
|
||||
|
||||
if "" == viewID && "" != blockID {
|
||||
if "" != blockID {
|
||||
node, _, getErr := getNodeByBlockID(nil, blockID)
|
||||
if nil != getErr {
|
||||
logging.LogWarnf("get node by block ID [%s] failed: %s", blockID, getErr)
|
||||
|
|
@ -1381,7 +1380,6 @@ func renderAttributeView(attrView *av.AttributeView, blockID, viewID, query stri
|
|||
viewID = node.IALAttr(av.NodeAttrView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var view *av.View
|
||||
if "" != viewID {
|
||||
|
|
@ -1438,7 +1436,7 @@ func renderAttributeView(attrView *av.AttributeView, blockID, viewID, query stri
|
|||
}
|
||||
}
|
||||
|
||||
// 如果存在分组的话渲染分组视图视图
|
||||
// 如果存在分组的话渲染分组视图
|
||||
var groups []av.Viewable
|
||||
for _, groupView := range view.Groups {
|
||||
switch groupView.LayoutType {
|
||||
|
|
@ -1619,6 +1617,8 @@ func genAttrViewViewGroups(view *av.View, attrView *av.AttributeView) {
|
|||
|
||||
if defaultGroupName == name {
|
||||
name = fmt.Sprintf(Conf.language(264), groupKey.Name)
|
||||
} else if notInRange == name {
|
||||
name = fmt.Sprintf(Conf.language(265))
|
||||
}
|
||||
v.Name = name
|
||||
view.Groups = append(view.Groups, v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue