rename builds -> bots

This commit is contained in:
Lunny Xiao
2022-11-25 17:48:48 +08:00
committed by Jason Song
parent c61ac24c1c
commit 2ecb59c092
24 changed files with 81 additions and 78 deletions
@@ -1,8 +1,8 @@
<div class="issue list">
{{range .Builds}}
{{range .Runs}}
<li class="item df py-3">
<div class="issue-item-left df">
{{template "repo/builds/status" .Status}}
{{template "repo/bots/status" .Status}}
</div>
<div class="issue-item-main f1 fc df">
<div class="issue-item-top-row">
@@ -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/builds/openclose" .}}
{{template "repo/bots/openclose" .}}
</div>
</div>
<div id="issue-actions" class="ui stackable grid hide">
<div class="six wide column">
{{template "repo/builds/openclose" .}}
{{template "repo/bots/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/builds/build_list" .}}
{{template "repo/bots/build_list" .}}
</div>
</div>
</div>
@@ -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.builds.open_tab" $.NumOpenRuns}}
{{.locale.Tr "repo.bots.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.builds.closed_tab" $.NumClosedRuns}}
{{.locale.Tr "repo.bots.closed_tab" $.NumClosedRuns}}
</a>
</div>
+3 -3
View File
@@ -183,9 +183,9 @@
</a>
{{end}}
{{ if and (not .UnitBuildsGlobalDisabled) (.Permission.CanRead $.UnitTypeBuilds)}}
<a class="{{if .PageIsBuilds}}active{{end}} item" href="{{.RepoLink}}/builds">
{{svg "octicon-play"}} {{.locale.Tr "repo.builds"}}
{{ if and (not .UnitBotsGlobalDisabled) (.Permission.CanRead $.UnitTypeBots)}}
<a class="{{if .PageIsBots}}active{{end}} item" href="{{.RepoLink}}/bots">
{{svg "octicon-play"}} {{.locale.Tr "repo.bots"}}
{{if .Repository.NumOpenRuns}}
<span class="ui blue small label">{{CountFmt .Repository.NumOpenRuns}}</span>
{{end}}
+5 -5
View File
@@ -420,16 +420,16 @@
</div>
</div>
{{$isBuildsEnabled := .Repository.UnitEnabled $.UnitTypeBuilds}}
{{$isBotsEnabled := .Repository.UnitEnabled $.UnitTypeBots}}
<div class="inline field">
<label>{{.locale.Tr "repo.builds"}}</label>
{{if .UnitTypeBuilds.UnitGlobalDisabled}}
<label>{{.locale.Tr "repo.bots"}}</label>
{{if .UnitTypeBots.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_builds" type="checkbox" {{if $isBuildsEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.builds_desc"}}</label>
<input class="enable-system" name="enable_bots" type="checkbox" {{if $isBotsEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.bots_desc"}}</label>
</div>
</div>