Skip to content

Commit

Permalink
Add templates to customize text when creating and migrating repositories
Browse files Browse the repository at this point in the history
These can be used to explain which types of repositories a Gitea instance is
willing to host, or other rules for creating repositories.
  • Loading branch information
brechtvl authored and techknowlogick committed Jan 25, 2023
1 parent 25f4b7d commit a31fedd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions templates/repo/create.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
3 changes: 3 additions & 0 deletions templates/repo/create_helper.tmpl
Original file line number Diff line number Diff line change
@@ -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}}
Empty file.
1 change: 1 addition & 0 deletions templates/repo/migrate/migrate.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}">
Expand Down

0 comments on commit a31fedd

Please sign in to comment.