diff options
author | 6543 <6543@obermui.de> | 2021-03-01 01:47:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 01:47:30 +0100 |
commit | a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8 (patch) | |
tree | 92edf61ff2447e067a676832844a129050b4ec0f /templates/repo/header.tmpl | |
parent | e0900310c4354311362ef69d15c302c215eaa2a2 (diff) | |
download | gitea-a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8.tar.gz gitea-a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8.zip |
Repository transfer has to be confirmed, if user can not create repo for new owner (#14792)
* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination
* if new pending transfer ocured, create UI & Mail notifications
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r-- | templates/repo/header.tmpl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 31bcd5c48a..2f593567d5 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -42,6 +42,24 @@ </div> {{if not .IsBeingCreated}} <div class="repo-buttons"> + {{if $.RepoTransfer}} + <form method="post" action="{{$.RepoLink}}/action/accept_transfer?redirect_to={{$.RepoLink}}"> + {{$.CsrfTokenHtml}} + <div class="ui poping up" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.accept_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_accept"}}{{end}}" data-position="bottom center" data-variation="tiny"> + <button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}green {{end}} ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}> + {{$.i18n.Tr "repo.transfer.accept"}} + </button> + </div> + </form> + <form method="post" action="{{$.RepoLink}}/action/reject_transfer?redirect_to={{$.RepoLink}}"> + {{$.CsrfTokenHtml}} + <div class="ui poping up" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.reject_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_reject"}}{{end}}" data-position="bottom center" data-variation="tiny"> + <button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}red {{end}}ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}> + {{$.i18n.Tr "repo.transfer.reject"}} + </button> + </div> + </form> + {{end}} <form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <div class="ui labeled button{{if not $.IsSigned}} poping up{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.watch_guest_user" }}" data-position="top center" data-variation="tiny"{{end}}> |