1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-27 09:11:53 -05:00

Fix the runs will not be displayed bug when the main branch have no workflows but other branches have (#28359) (#28365)

Backport #28359 by @lunny

The left menu will only display the default branch's workflows but the
right side will display the runs triggered by all branches' workflows.
So we cannot hide right side if default branch has no workflows.

Fix #28332
Replace #28333

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit b7e3adc66c)
This commit is contained in:
Giteabot 2023-12-06 15:28:00 +08:00 committed by Earl Warren
parent 6812c5d634
commit 3a788340f0
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 2 additions and 1 deletions

View file

@ -201,6 +201,7 @@ func List(ctx *context.Context) {
pager.AddParamString("actor", fmt.Sprint(actorID))
pager.AddParamString("status", fmt.Sprint(status))
ctx.Data["Page"] = pager
ctx.Data["HasWorkflowsOrRuns"] = len(workflows) > 0 || len(runs) > 0
ctx.HTML(http.StatusOK, tplListActions)
}

View file

@ -4,7 +4,7 @@
<div class="ui container">
{{template "base/alert" .}}
{{if .workflows}}
{{if .HasWorkflowsOrRuns}}
<div class="ui stackable grid">
<div class="four wide column">
<div class="ui fluid vertical menu">