diff options
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/header.tmpl | 18 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 18 |
2 files changed, 33 insertions, 3 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}}> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index e85451ac39..b69f90f9c5 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -444,11 +444,23 @@ {{end}} <div class="item"> <div class="ui right"> - <button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button> + {{if .RepoTransfer}} + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="action" value="cancel_transfer"> + <button class="ui red button">{{.i18n.Tr "repo.settings.transfer_abort"}}</button> + </form> + {{ else }} + <button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button> + {{ end }} </div> <div> <h5>{{.i18n.Tr "repo.settings.transfer"}}</h5> - <p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p> + {{if .RepoTransfer}} + <p>{{.i18n.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}}</p> + {{else}} + <p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p> + {{end}} </div> </div> @@ -599,7 +611,7 @@ <div class="text right actions"> <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div> - <button class="ui red button">{{.i18n.Tr "repo.settings.make_transfer"}}</button> + <button class="ui red button">{{.i18n.Tr "repo.settings.transfer_perform"}}</button> </div> </form> </div> |