diff options
author | Brecht Van Lommel <brecht@blender.org> | 2023-01-24 20:01:39 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2023-01-24 22:36:48 -0500 |
commit | a31fedd2c2def13e29a962c751c449491d5a1588 (patch) | |
tree | bce4730500a2ab5496ce94047575ccd3c9355100 /templates | |
parent | 25f4b7d7cd490384d8e714109036bbbbed2473ba (diff) | |
download | gitea-a31fedd2c2def13e29a962c751c449491d5a1588.tar.gz gitea-a31fedd2c2def13e29a962c751c449491d5a1588.zip |
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.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/create.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/create_helper.tmpl | 3 | ||||
-rw-r--r-- | templates/repo/migrate/helper.tmpl | 0 | ||||
-rw-r--r-- | templates/repo/migrate/migrate.tmpl | 1 |
4 files changed, 5 insertions, 4 deletions
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 6272b19bc6..455bbf757e 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -9,10 +9,7 @@ </h3> <div class="ui attached segment"> {{template "base/alert" .}} - - {{if not $.DisableMigrations}} - <p class="ui center">{{.locale.Tr "repo.new_repo_helper" ((printf "%s%s" AppSubUrl "/repo/migrate")|Escape) | Safe}}</p> - {{end}} + {{template "repo/create_helper" .}} {{if not .CanCreateRepo}} <div class="ui negative message"> diff --git a/templates/repo/create_helper.tmpl b/templates/repo/create_helper.tmpl new file mode 100644 index 0000000000..ec253e961d --- /dev/null +++ b/templates/repo/create_helper.tmpl @@ -0,0 +1,3 @@ +{{if not $.DisableMigrations}} + <p class="ui center">{{.locale.Tr "repo.new_repo_helper" ((printf "%s%s" AppSubUrl "/repo/migrate")|Escape) | Safe}}</p> +{{end}} diff --git a/templates/repo/migrate/helper.tmpl b/templates/repo/migrate/helper.tmpl new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/templates/repo/migrate/helper.tmpl diff --git a/templates/repo/migrate/migrate.tmpl b/templates/repo/migrate/migrate.tmpl index a38302a663..ff96e6793b 100644 --- a/templates/repo/migrate/migrate.tmpl +++ b/templates/repo/migrate/migrate.tmpl @@ -2,6 +2,7 @@ <div class="page-content repository new migrate"> <div class="ui middle very relaxed page grid"> <div class="column"> + {{template "repo/migrate/helper" .}} <div class="ui three stackable cards"> {{range .Services}} <a class="ui card df ac" href="{{AppSubUrl}}/repo/migrate?service_type={{.}}&org={{$.Org}}&mirror={{$.Mirror}}"> |