diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-10-09 00:43:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 12:43:15 -0400 |
commit | f06ee37e243eb379e8b44936474ecc55a04ba955 (patch) | |
tree | 44c3eee01aa668af3be0064f91607ecbdb6aa154 /templates/admin | |
parent | 529c5ffe12854ca78696053e12bff8673ad0f219 (diff) | |
download | gitea-f06ee37e243eb379e8b44936474ecc55a04ba955.tar.gz gitea-f06ee37e243eb379e8b44936474ecc55a04ba955.zip |
Hide sync ssh keys button on admin dashboard if ssh disabled or builtin-ssh enabled (#13072)
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/dashboard.tmpl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 99c215493d..d52f82fb63 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -35,11 +35,13 @@ <td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td> <td><button type="submit" class="ui green button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td> </tr> + {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}} <tr> <td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/> {{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td> <td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td> </tr> + {{end}} <tr> <td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td> <td><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td> |