Zooflow: Finish user relations

This commit is contained in:
Jonathan Jenne
2022-03-10 15:15:11 +01:00
parent 8ace2fe11f
commit 721732c0af
13 changed files with 171 additions and 70 deletions

View File

@@ -49,12 +49,14 @@ Public Class ClassDetailForm
{PAGE_IDB_ATTRIBUTE_REL, New DetailSettings With {
.GridTitle = "Attribute-Relations",
.[Module] = MODULE_IDB,
.Entity = PAGE_IDB_ATTRIBUTES
.Entity = PAGE_IDB_ATTRIBUTES,
.IsRelationPage = True
}},
{PAGE_GI_RELATIONS, New DetailSettings With {
.GridTitle = "Globix profile-relations",
.[Module] = MODULE_GI,
.Entity = PAGE_GI_RELATIONS
.Entity = PAGE_GI_RELATIONS,
.IsRelationPage = True
}},
{PAGE_IDB_DOCTYPE_CONFIG, New DetailSettings With {
.GridTitle = "Detail Doctype Configuration",
@@ -70,7 +72,8 @@ Public Class ClassDetailForm
{PAGE_IDB_DOCTYPE_BE, New DetailSettings With {
.GridTitle = "Doctype BE Relations",
.[Module] = MODULE_IDB,
.Entity = PAGE_IDB_DOCTYPE_BE
.Entity = PAGE_IDB_DOCTYPE_BE,
.IsRelationPage = True
}},
{PAGE_USERS_USERLIST, New DetailSettings With {
.GridTitle = "User Overview",
@@ -87,7 +90,8 @@ Public Class ClassDetailForm
{PAGE_USERS_USER_GROUP_RELATIONS, New DetailSettings With {
.GridTitle = "User Group Relations",
.[Module] = MODULE_USERS,
.Entity = PAGE_USERS_USER_GROUP_RELATIONS
.Entity = PAGE_USERS_USER_GROUP_RELATIONS,
.IsRelationPage = True
}}
}
@@ -194,11 +198,21 @@ Public Class ClassDetailForm
End Try
End Function
Public Function TestPageIsRelation(pPageName As String) As Boolean
Return DetailSettingsList.Any(Function(page) page.Key = pPageName And page.Value.IsRelationPage = True)
End Function
Public Class DetailSettings
Public Property GridTitle As String
Public Property [Module] As String
Public Property Entity As String
''' <summary>
''' This makes sure that the page can be opened even if there are no entries
''' </summary>
''' <returns></returns>
Public Property IsRelationPage As Boolean = False
''' <summary>
''' If this is empty, the button "New Record will be hidden"
''' </summary>