diff options
author | Unknwon <u@gogs.io> | 2016-02-15 14:26:21 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-15 14:26:21 -0500 |
commit | dc89c51f3efec39e120dd5b3878a8a9c922721ef (patch) | |
tree | 79b0eac741fe27d1ad681dbf4dd00ed147821c71 /templates | |
parent | e9b9e6eb53d423bf7c8266a5ef9eeb463d8eb059 (diff) | |
parent | bb595666ac3bdb5f16fa10663bd8890eb320fcb1 (diff) | |
download | gitea-dc89c51f3efec39e120dd5b3878a8a9c922721ef.tar.gz gitea-dc89c51f3efec39e120dd5b3878a8a9c922721ef.zip |
Merge pull request #2624 from mhartkorn/convert-mirror-to-repo
Convert mirrors to regular repositories
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/settings/options.tmpl | 85 |
1 files changed, 65 insertions, 20 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 4bb39bb07a..4bc422c340 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -138,6 +138,19 @@ {{.i18n.Tr "repo.settings.danger_zone"}} </h4> <div class="ui attached warning table danger segment"> + {{if .Repository.IsMirror}} + <div class="item"> + <div class="ui right"> + <button class="ui basic red show-modal button" data-modal="#convert-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button> + </div> + <div> + <h5>{{.i18n.Tr "repo.settings.convert"}}</h5> + <p>{{.i18n.Tr "repo.settings.convert_desc"}}</p> + </div> + </div> + + <div class="ui divider"></div> + {{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> @@ -165,6 +178,38 @@ </div> </div> +{{if .Repository.IsMirror}} +<div class="ui small modal" id="convert-repo-modal"> + <div class="header"> + {{.i18n.Tr "repo.settings.convert"}} + </div> + <div class="content"> + <div class="ui warning message text left"> + {{.i18n.Tr "repo.settings.convert_notices_1" | Safe}} + </div> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="action" value="convert"> + <div class="field"> + <label> + {{.i18n.Tr "repo.settings.transfer_form_title"}} + <span class="text red">{{.Repository.Name}}</span> + </label> + </div> + <div class="required field"> + <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label> + <input id="repo_name" name="repo_name" required> + </div> + + <div class="text right actions"> + <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div> + <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_convert"}}</button> + </div> + </form> + </div> +</div> +{{end}} + <div class="ui small modal" id="transfer-repo-modal"> <div class="header"> {{.i18n.Tr "repo.settings.transfer"}} @@ -212,27 +257,27 @@ {{.i18n.Tr "repo.settings.delete_notices_fork_1" | Safe}} <br> {{.i18n.Tr "repo.settings.delete_notices_fork_2" | Safe}} <br> {{.i18n.Tr "repo.settings.delete_notices_fork_3" | Safe}} - {{end}} - </div> - <form class="ui form" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <input type="hidden" name="action" value="delete"> - <div class="field"> - <label> - {{.i18n.Tr "repo.settings.transfer_form_title"}} - <span class="text red">{{.Repository.Name}}</span> - </label> - </div> - <div class="required field"> - <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" required> + {{end}} </div> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="action" value="delete"> + <div class="field"> + <label> + {{.i18n.Tr "repo.settings.transfer_form_title"}} + <span class="text red">{{.Repository.Name}}</span> + </label> + </div> + <div class="required field"> + <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label> + <input id="repo_name" name="repo_name" required> + </div> - <div class="text right actions"> - <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div> - <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button> - </div> - </form> -</div> + <div class="text right actions"> + <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div> + <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button> + </div> + </form> + </div> </div> {{template "base/footer" .}} |