Skip to content

Commit a6a674e

Browse files
authored
1 parent 976a992 commit a6a674e

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

modules/context/repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
563563
ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(unit_model.TypeCode)
564564
ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(unit_model.TypeIssues)
565565
ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(unit_model.TypePullRequests)
566+
ctx.Data["CanWriteActions"] = ctx.Repo.CanWrite(unit_model.TypeActions)
566567

567568
canSignedUserFork, err := repo_module.CanUserForkRepo(ctx, ctx.Doer, ctx.Repo.Repository)
568569
if err != nil {

options/locale/locale_en-US.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,6 +3529,9 @@ runs.status = Status
35293529
runs.actors_no_select = All actors
35303530
runs.status_no_select = All status
35313531
runs.no_results = No results matched.
3532+
runs.no_workflows = There are no workflows yet.
3533+
runs.no_workflows.quick_start = Don't know how to start with Gitea Action? See <a target="_blank" rel="noopener noreferrer" href="%s">the quick start guide</a>.
3534+
runs.no_workflows.documentation = For more information on the Gitea Action, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>.
35323535
runs.no_runs = The workflow has no runs yet.
35333536
runs.empty_commit_message = (empty commit message)
35343537

templates/repo/actions/list.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<div class="ui container">
55
{{template "base/alert" .}}
66

7+
{{if .workflows}}
78
<div class="ui stackable grid">
89
<div class="four wide column">
910
<div class="ui fluid vertical menu">
@@ -78,6 +79,9 @@
7879
{{template "repo/actions/runs_list" .}}
7980
</div>
8081
</div>
82+
{{else}}
83+
{{template "repo/actions/no_workflows" .}}
84+
{{end}}
8185
</div>
8286
</div>
8387
{{template "base/footer" .}}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div class="empty-placeholder">
2+
{{svg "octicon-no-entry" 48}}
3+
<h2>{{ctx.Locale.Tr "actions.runs.no_workflows"}}</h2>
4+
{{if and .CanWriteCode .CanWriteActions}}
5+
<p>{{ctx.Locale.Tr "actions.runs.no_workflows.quick_start" "https://docs.gitea.com/usage/actions/quickstart/" | Safe}}</p>
6+
{{end}}
7+
<p>{{ctx.Locale.Tr "actions.runs.no_workflows.documentation" "https://docs.gitea.com/usage/actions/overview/" | Safe}}</p>
8+
</div>

0 commit comments

Comments
 (0)