refactor: rename to actions

This commit is contained in:
Jason Song
2022-12-06 15:16:25 +08:00
parent 56368f3963
commit 223782ca4c
50 changed files with 247 additions and 247 deletions

View File

@@ -33,7 +33,7 @@
{{.locale.Tr "settings.applications"}}
</a>
{{end}}
{{if .EnableBots}}
{{if .EnableActions}}
<a class="{{if .PageIsAdminRunners}}active{{end}} item" href="{{AppSubUrl}}/admin/runners">
{{.locale.Tr "admin.runners"}}
</a>

View File

@@ -22,7 +22,7 @@
{{.locale.Tr "packages.title"}}
</a>
{{end}}
{{if .EnableBots}}
{{if .EnableActions}}
<a class="{{if .PageIsOrgSettingsRunners}}active{{end}} item" href="{{.OrgLink}}/settings/runners">
{{.locale.Tr "repo.runners"}}
</a>

View File

@@ -2,7 +2,7 @@
{{range .Runs}}
<li class="item df py-3">
<div class="issue-item-left df">
{{template "repo/bots/status" .Status}}
{{template "repo/actions/status" .Status}}
</div>
<div class="issue-item-main f1 fc df">
<div class="issue-item-top-row">

View File

@@ -16,12 +16,12 @@
<div class="twelve wide column content">
<div id="issue-filters" class="ui stackable grid">
<div class="six wide column">
{{template "repo/bots/openclose" .}}
{{template "repo/actions/openclose" .}}
</div>
</div>
<div id="issue-actions" class="ui stackable grid hide">
<div class="six wide column">
{{template "repo/bots/openclose" .}}
{{template "repo/actions/openclose" .}}
</div>
<div class="ui divider"></div>
{{/* Ten wide does not cope well and makes the columns stack.
@@ -41,7 +41,7 @@
</div>
</div>
</div>
{{template "repo/bots/build_list" .}}
{{template "repo/actions/build_list" .}}
</div>
</div>
</div>

View File

@@ -1,10 +1,10 @@
<div class="ui compact tiny menu">
<a class="{{if not .IsShowClosed}}active{{end}} item" href="{{$.Link}}?workflow={{.CurWorkflow}}&state=open">
{{svg "octicon-issue-opened" 16 "mr-3"}}
{{.locale.Tr "repo.bots.open_tab" $.NumOpenRuns}}
{{.locale.Tr "repo.actions.open_tab" $.NumOpenRuns}}
</a>
<a class="{{if .IsShowClosed}}active{{end}} item" href="{{$.Link}}?workflow={{.CurWorkflow}}&state=closed">
{{svg "octicon-issue-closed" 16 "mr-3"}}
{{.locale.Tr "repo.bots.closed_tab" $.NumClosedRuns}}
{{.locale.Tr "repo.actions.closed_tab" $.NumClosedRuns}}
</a>
</div>

View File

@@ -183,9 +183,9 @@
</a>
{{end}}
{{if and .EnableBots (not .UnitBotsGlobalDisabled) (.Permission.CanRead $.UnitTypeBots)}}
<a class="{{if .PageIsBots}}active{{end}} item" href="{{.RepoLink}}/bots">
{{svg "octicon-play"}} {{.locale.Tr "repo.bots"}}
{{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}}
<a class="{{if .PageIsActions}}active{{end}} item" href="{{.RepoLink}}/actions">
{{svg "octicon-play"}} {{.locale.Tr "repo.actions"}}
{{if .Repository.NumOpenRuns}}
<span class="ui blue small label">{{CountFmt .Repository.NumOpenRuns}}</span>
{{end}}

View File

@@ -32,7 +32,7 @@
{{.locale.Tr "repo.settings.lfs"}}
</a>
{{end}}
{{if and .EnableBots (not .UnitBotsGlobalDisabled) (.Permission.CanRead $.UnitTypeBots)}}
{{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}}
<a class="{{if .PageIsSettingsRunners}}active{{end}} item" href="{{.RepoLink}}/settings/runners">
{{.locale.Tr "repo.settings.runners"}}
</a>

View File

@@ -420,17 +420,17 @@
</div>
</div>
{{if .EnableBots}}
{{$isBotsEnabled := .Repository.UnitEnabled $.UnitTypeBots}}
{{if .EnableActions}}
{{$isActionsEnabled := .Repository.UnitEnabled $.UnitTypeActions}}
<div class="inline field">
<label>{{.locale.Tr "repo.bots"}}</label>
{{if .UnitTypeBots.UnitGlobalDisabled}}
<label>{{.locale.Tr "repo.actions"}}</label>
{{if .UnitTypeActions.UnitGlobalDisabled}}
<div class="ui checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_bots" type="checkbox" {{if $isBotsEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.bots_desc"}}</label>
<input class="enable-system" name="enable_actions" type="checkbox" {{if $isActionsEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.actions_desc"}}</label>
</div>
</div>
{{end}}