@ -358,17 +358,28 @@
</h4>
</h4>
<div class="ui attached warning table danger segment">
<div class="ui attached warning table danger segment">
{{if .Repository.IsMirror}}
{{if .Repository.IsMirror}}
<div class="item">
<div class="item">
<div class="ui right">
<div class="ui right">
<button class="ui basic red show-modal button" data-modal=" #convert - repo - modal " > {{ .i18n.Tr " repo . settings . convert " }}</button>
<button class="ui basic red show-modal button" data-modal=" #convert - mirror - 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>
<div>
<div class="ui divider"></div>
<h5>{{.i18n.Tr "repo.settings.convert"}}</h5>
{{end}}
<p>{{.i18n.Tr "repo.settings.convert_desc"}}</p>
{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
<div class="item">
<div class="ui right">
<button class="ui basic red show-modal button" data-modal=" #convert - fork - repo - modal " > {{ .i18n.Tr " repo . settings . convert_fork " }}</button>
</div>
<div>
<h5>{{.i18n.Tr "repo.settings.convert_fork"}}</h5>
<p>{{.i18n.Tr "repo.settings.convert_fork_desc"}}</p>
</div>
</div>
</div>
</div>
<div class="ui divider"></div>
<div class="ui divider"></div>
{{end}}
{{end}}
<div class="item">
<div class="item">
<div class="ui right">
<div class="ui right">
@ -437,37 +448,67 @@
{{if .Permission.IsOwner}}
{{if .Permission.IsOwner}}
{{if .Repository.IsMirror}}
{{if .Repository.IsMirror}}
<div class="ui small modal" id="convert-repo-modal">
<div class="ui small modal" id="convert-mirror-repo-modal">
<div class="header">
<div class="header">
{{.i18n.Tr "repo.settings.convert"}}
{{.i18n.Tr "repo.settings.convert"}}
</div>
<div class="content">
<div class="ui warning message text left">
{{.i18n.Tr "repo.settings.convert_notices_1"}}
</div>
</div>
<form class="ui form" action="{{.Link}}" method="post">
<div class="content">
{{.CsrfTokenHtml}}
<div class="ui warning message text left">
<input type="hidden" name="action" value="convert">
{{.i18n.Tr "repo.settings.convert_notices_1"}}
<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>
<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="text right actions">
<div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
<div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
<button class="ui red button">{{.i18n.Tr "repo.settings.convert_confirm"}}</button>
<button class="ui red button">{{.i18n.Tr "repo.settings.convert_confirm"}}</button>
</div>
</div>
</form>
</form>
</div>
</div>
</div>
</div>
{{end}}
{{end}}
{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
<div class="ui small modal" id="convert-fork-repo-modal">
<div class="header">
{{.i18n.Tr "repo.settings.convert_fork"}}
</div>
<div class="content">
<div class="ui warning message text left">
{{.i18n.Tr "repo.settings.convert_fork_notices_1"}}
</div>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="convert_fork">
<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.convert_fork_confirm"}}</button>
</div>
</form>
</div>
</div>
{{end}}
<div class="ui small modal" id="transfer-repo-modal">
<div class="ui small modal" id="transfer-repo-modal">
<div class="header">
<div class="header">
{{.i18n.Tr "repo.settings.transfer"}}
{{.i18n.Tr "repo.settings.transfer"}}