diff options
Diffstat (limited to 'templates/repo/settings')
-rw-r--r-- | templates/repo/settings/navbar.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 15 | ||||
-rw-r--r-- | templates/repo/settings/runner_edit.tmpl | 9 | ||||
-rw-r--r-- | templates/repo/settings/runners.tmpl | 9 |
4 files changed, 38 insertions, 0 deletions
diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl index 236a82f348..2119f6b5a4 100644 --- a/templates/repo/settings/navbar.tmpl +++ b/templates/repo/settings/navbar.tmpl @@ -32,5 +32,10 @@ {{.locale.Tr "repo.settings.lfs"}} </a> {{end}} + {{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}} + <a class="{{if .PageIsSettingsRunners}}active {{end}}item" href="{{.RepoLink}}/settings/runners"> + {{.locale.Tr "actions.runners"}} + </a> + {{end}} </div> </div> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index e1f53072b8..5b7b9ec5f8 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -433,6 +433,21 @@ </div> </div> + {{if .EnableActions}} + {{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}} + <div class="inline field"> + <label>{{.locale.Tr "actions.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_actions" type="checkbox" {{if $isActionsEnabled}}checked{{end}}> + <label>{{.locale.Tr "repo.settings.actions_desc"}}</label> + </div> + </div> + {{end}} + {{if not .IsMirror}} <div class="ui divider"></div> {{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}} diff --git a/templates/repo/settings/runner_edit.tmpl b/templates/repo/settings/runner_edit.tmpl new file mode 100644 index 0000000000..10d410f096 --- /dev/null +++ b/templates/repo/settings/runner_edit.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +<div class="page-content repository settings runners"> + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} + <div class="ui container"> + {{template "shared/actions/runner_edit" .}} + </div> +</div> +{{template "base/footer" .}} diff --git a/templates/repo/settings/runners.tmpl b/templates/repo/settings/runners.tmpl new file mode 100644 index 0000000000..d3a0b64fc5 --- /dev/null +++ b/templates/repo/settings/runners.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +<div class="page-content repository settings runners"> + {{template "repo/header" .}} + {{template "repo/settings/navbar" .}} + <div class="ui container"> + {{template "shared/actions/runner_list" .}} + </div> +</div> +{{template "base/footer" .}} |