diff options
author | Paweł Bogusławski <pawel.boguslawski@ib.pl> | 2022-06-04 13:42:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-04 19:42:17 +0800 |
commit | 14d96ff7acacf8912b05f113b8ca35f67edebd1b (patch) | |
tree | 1f76e23e6c254f0cf9fd1a9964e05e5264ffa3ce /templates | |
parent | 867b34d5e9ab8694b2928deddfaa63ae9437d269 (diff) | |
download | gitea-14d96ff7acacf8912b05f113b8ca35f67edebd1b.tar.gz gitea-14d96ff7acacf8912b05f113b8ca35f67edebd1b.zip |
Disable unnecessary mirroring elements (#18527)
* Disable unnecessary mirroring elements
This mod fixes disabling unnecessary mirroring elements.
Related: https://github.com/go-gitea/gitea/pull/16957
Related: https://github.com/go-gitea/gitea/pull/13084
Author-Change-Id: IB#1105104
* Checkbox rendering disabled instead of hiding it
Fixes: 02b45051503d4330da9757ff084c9cc5e6e60d84
Related: https://github.com/go-gitea/gitea/pull/18527#pullrequestreview-878061913
Author-Change-Id: IB#1105104
* Update custom/conf/app.example.ini
Co-authored-by: silverwind <me@silverwind.io>
* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md
Co-authored-by: silverwind <me@silverwind.io>
* Mirror filter removed only when whole mirroring feature is disabled
Fixes: 02b45051503d4330da9757ff084c9cc5e6e60d84
Related: https://github.com/go-gitea/gitea/pull/18527#discussion_r883268890
Author-Change-Id: IB#1105104
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/migrate/options.tmpl | 11 | ||||
-rw-r--r-- | templates/user/dashboard/repolist.tmpl | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/templates/repo/migrate/options.tmpl b/templates/repo/migrate/options.tmpl index 8aefaf68f1..bb2a6ed77f 100644 --- a/templates/repo/migrate/options.tmpl +++ b/templates/repo/migrate/options.tmpl @@ -1,15 +1,12 @@ +{{if not .DisableNewPullMirrors}} <div class="inline field"> <label>{{.i18n.Tr "repo.migrate_options"}}</label> <div class="ui checkbox"> - {{if .DisableNewPullMirrors}} - <input id="mirror" name="mirror" type="checkbox" readonly> - <label>{{.i18n.Tr "repo.migrate_options_mirror_disabled"}}</label> - {{else}} - <input id="mirror" name="mirror" type="checkbox" {{if .mirror}} checked{{end}}> - <label>{{.i18n.Tr "repo.migrate_options_mirror_helper" | Safe}}</label> - {{end}} + <input id="mirror" name="mirror" type="checkbox" {{if .mirror}} checked{{end}}> + <label>{{.i18n.Tr "repo.migrate_options_mirror_helper" | Safe}}</label> </div> </div> +{{end}} {{if .LFSActive}} <div class="inline field"> <label></label> diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl index 41230d3287..b2f936402d 100644 --- a/templates/user/dashboard/repolist.tmpl +++ b/templates/user/dashboard/repolist.tmpl @@ -109,10 +109,12 @@ {{.i18n.Tr "forks"}} <div v-show="reposFilter === 'forks'" class="ui circular mini grey label">${repoTypeCount}</div> </a> + {{if .MirrorsEnabled}} <a class="item" :class="{active: reposFilter === 'mirrors'}" @click="changeReposFilter('mirrors')"> {{.i18n.Tr "mirrors"}} <div v-show="reposFilter === 'mirrors'" class="ui circular mini grey label">${repoTypeCount}</div> </a> + {{end}} <a class="item" :class="{active: reposFilter === 'collaborative'}" @click="changeReposFilter('collaborative')"> {{.i18n.Tr "collaborative"}} <div v-show="reposFilter === 'collaborative'" class="ui circular mini grey label">${repoTypeCount}</div> |