File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
main/kotlin/org/modelix/model/server/handlers/ui
test/kotlin/org/modelix/model/server/handlers/ui Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,10 @@ class RepositoryOverview(private val repoManager: IRepositoriesManager) {
47
47
table {
48
48
thead {
49
49
tr {
50
- th { + " Repository" }
50
+ th {
51
+ colSpan = " 2"
52
+ + " Repository"
53
+ }
51
54
th { + " Branch" }
52
55
th {
53
56
colSpan = " 3"
@@ -58,11 +61,16 @@ class RepositoryOverview(private val repoManager: IRepositoriesManager) {
58
61
tbody {
59
62
for (repository in repositories) {
60
63
val branches = repoManager.getBranches(repository)
64
+ val repoRowSpan = branches.size.coerceAtLeast(1 ).plus(1 ).toString()
61
65
tr {
62
66
td {
63
- rowSpan = branches.size.coerceAtLeast( 1 ).plus( 1 ).toString()
67
+ rowSpan = repoRowSpan
64
68
+ repository.id
65
69
}
70
+ td {
71
+ rowSpan = repoRowSpan
72
+ buildDeleteRepositoryForm(repository.id)
73
+ }
66
74
}
67
75
if (branches.isEmpty()) {
68
76
tr {
@@ -85,9 +93,6 @@ class RepositoryOverview(private val repoManager: IRepositoriesManager) {
85
93
td {
86
94
buildExploreLatestLink(branch.repositoryId.id, branch.branchName)
87
95
}
88
- td {
89
- buildDeleteForm(branch.repositoryId.id)
90
- }
91
96
}
92
97
}
93
98
}
@@ -110,7 +115,7 @@ fun FlowOrInteractiveOrPhrasingContent.buildExploreLatestLink(repositoryId: Stri
110
115
}
111
116
}
112
117
113
- fun FlowContent.buildDeleteForm (repositoryId : String ) {
118
+ fun FlowContent.buildDeleteRepositoryForm (repositoryId : String ) {
114
119
form {
115
120
postButton {
116
121
name = " delete"
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class RepositoryOverviewTest {
28
28
val html = createHTML(prettyPrint = false ).span {
29
29
buildHistoryLink(" repository/v1" , " branch/v2" )
30
30
buildExploreLatestLink(" repository/v1" , " branch/v2" )
31
- buildDeleteForm (" repository/v1" )
31
+ buildDeleteRepositoryForm (" repository/v1" )
32
32
}
33
33
assertEquals(
34
34
"""
You can’t perform that action at this time.
0 commit comments