diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-03-06 14:26:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 14:26:32 +0800 |
commit | 5cddab4f74bbb307ddf13e458c7ac22f93b9283a (patch) | |
tree | 2eee924ffdbc2e1bedb6b63020e7b7fdd86417c3 /templates | |
parent | da15d6127c8d430dfc069f9815ce783dd9ca35f7 (diff) | |
download | gitea-5cddab4f74bbb307ddf13e458c7ac22f93b9283a.tar.gz gitea-5cddab4f74bbb307ddf13e458c7ac22f93b9283a.zip |
Make wiki default branch name changable (#29603)
Fix #29000
Fix #28685
Fix #18568
Related: #27497
And by the way fix #24036, add a Cancel button there (one line)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/settings/options.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/wiki/new.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/wiki/pages.tmpl | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 0de42b34ea..a699396a84 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -335,6 +335,10 @@ <label>{{ctx.Locale.Tr "repo.settings.use_internal_wiki"}}</label> </div> </div> + <div class="inline field gt-pl-4"> + <label>{{ctx.Locale.Tr "repo.settings.default_wiki_branch_name"}}</label> + <input name="default_wiki_branch" value="{{.Repository.DefaultWikiBranch}}"> + </div> <div class="field"> <div class="ui radio checkbox{{if $isExternalWikiGlobalDisabled}} disabled{{end}}"{{if $isExternalWikiGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}> <input class="enable-system-radio" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}> diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index ff31df0c32..640f8ca9cd 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -36,9 +36,8 @@ </div> <div class="divider"></div> <div class="text right"> - <button class="ui primary button"> - {{ctx.Locale.Tr "repo.wiki.save_page"}} - </button> + <a class="ui basic cancel button" href="{{.Link}}">{{ctx.Locale.Tr "cancel"}}</a> + <button class="ui primary button">{{ctx.Locale.Tr "repo.wiki.save_page"}}</button> </div> </form> </div> diff --git a/templates/repo/wiki/pages.tmpl b/templates/repo/wiki/pages.tmpl index 22eb2619f9..cace0d48e0 100644 --- a/templates/repo/wiki/pages.tmpl +++ b/templates/repo/wiki/pages.tmpl @@ -10,6 +10,7 @@ {{end}} </span> </h2> + {{if .IsRepositoryAdmin}}<div>{{ctx.Locale.Tr "repo.default_branch"}}: {{.Repository.DefaultWikiBranch}}</div>{{end}} <table class="ui table wiki-pages-list"> <tbody> {{range .Pages}} |