Skip to content

Commit a31fedd

Browse files
brechtvltechknowlogick
authored andcommitted
Add templates to customize text when creating and migrating repositories
These can be used to explain which types of repositories a Gitea instance is willing to host, or other rules for creating repositories.
1 parent 25f4b7d commit a31fedd

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

templates/repo/create.tmpl

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
</h3>
1010
<div class="ui attached segment">
1111
{{template "base/alert" .}}
12-
13-
{{if not $.DisableMigrations}}
14-
<p class="ui center">{{.locale.Tr "repo.new_repo_helper" ((printf "%s%s" AppSubUrl "/repo/migrate")|Escape) | Safe}}</p>
15-
{{end}}
12+
{{template "repo/create_helper" .}}
1613

1714
{{if not .CanCreateRepo}}
1815
<div class="ui negative message">

templates/repo/create_helper.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{if not $.DisableMigrations}}
2+
<p class="ui center">{{.locale.Tr "repo.new_repo_helper" ((printf "%s%s" AppSubUrl "/repo/migrate")|Escape) | Safe}}</p>
3+
{{end}}

templates/repo/migrate/helper.tmpl

Whitespace-only changes.

templates/repo/migrate/migrate.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<div class="page-content repository new migrate">
33
<div class="ui middle very relaxed page grid">
44
<div class="column">
5+
{{template "repo/migrate/helper" .}}
56
<div class="ui three stackable cards">
67
{{range .Services}}
78
<a class="ui card df ac" href="{{AppSubUrl}}/repo/migrate?service_type={{.}}&org={{$.Org}}&mirror={{$.Mirror}}">

0 commit comments

Comments
 (0)