mirror of https://github.com/gogits/gogs.git
Unknwon
10 years ago
10 changed files with 196 additions and 155 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,144 +1,157 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="repository settings options"> |
||||||
<div id="repo-wrapper"> |
{{template "repo/header" .}} |
||||||
{{template "repo/header_old" .}} |
<div class="ui container"> |
||||||
<div id="setting-wrapper" class="main-wrapper"> |
<div class="ui grid"> |
||||||
<div id="repo-setting" class="container clear"> |
{{template "repo/settings/navbar" .}} |
||||||
{{template "repo/settings/nav" .}} |
<div class="twelve wide column content"> |
||||||
<div class="grid-4-5 left"> |
{{template "base/alert" .}} |
||||||
<div class="setting-content"> |
<h4 class="ui top attached header"> |
||||||
{{template "ng/base/alert" .}} |
{{.i18n.Tr "repo.settings.basic_settings"}} |
||||||
<div id="setting-content"> |
</h4> |
||||||
<div class="panel panel-radius"> |
<div class="ui attached segment"> |
||||||
<div class="panel-header"> |
<form class="ui form" action="{{.Link}}" method="post"> |
||||||
<strong>{{.i18n.Tr "repo.settings.basic_settings"}}</strong> |
{{.CsrfTokenHtml}} |
||||||
</div> |
<input type="hidden" name="action" value="update"> |
||||||
<form class="form form-align panel-body" id="repo-setting-form" action="{{.RepoLink}}/settings" method="post"> |
<div class="required field {{if .Err_RepoName}}error{{end}}"> |
||||||
{{.CsrfTokenHtml}} |
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label> |
||||||
<input type="hidden" name="action" value="update"> |
<input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required> |
||||||
<div class="field"> |
</div> |
||||||
<label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label> |
<div class="field {{if .Err_Description}}error{{end}}"> |
||||||
<input class="ipt ipt-large ipt-radius {{if .Err_RepoName}}ipt-error{{end}}" id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" required /> |
<label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label> |
||||||
</div> |
<textarea id="description" name="description" rows="2">{{.Repository.Description}}</textarea> |
||||||
<div class="white-popup-block mfp-hide" id="change-reponame-modal"> |
</div> |
||||||
<h1 class="text-red">{{.i18n.Tr "repo.settings.change_reponame"}}</h1> |
<div class="field {{if .Err_Website}}error{{end}}"> |
||||||
<p>{{.i18n.Tr "repo.settings.change_reponame_desc"}}</p> |
<label for="website">{{.i18n.Tr "repo.settings.site"}}</label> |
||||||
<br> |
<input id="website" name="website" type="url" value="{{.Repository.Website}}"> |
||||||
<button class="btn btn-red btn-large btn-radius" id="change-reponame-submit">{{.i18n.Tr "settings.continue"}}</button> |
</div> |
||||||
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button> |
|
||||||
</div> |
<div class="ui divider"></div> |
||||||
<div class="field clear"> |
{{if not .Repository.IsBare}} |
||||||
<label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label> |
<div class="required inline field"> |
||||||
<textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Repository.Description}}</textarea> |
<label>{{.i18n.Tr "repo.default_branch"}}</label> |
||||||
</div> |
<div class="ui selection dropdown"> |
||||||
<div class="field"> |
<input type="hidden" id="branch" name="branch" value="{{.Repository.DefaultBranch}}"> |
||||||
<label for="website">{{.i18n.Tr "repo.settings.site"}}</label> |
<div class="default text">{{.Repository.DefaultBranch}}</div> |
||||||
<input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="site" type="url" value="{{.Repository.Website}}" /> |
<i class="dropdown icon"></i> |
||||||
</div> |
<div class="menu"> |
||||||
<hr> |
{{range .Branches}} |
||||||
<br> |
<div class="item" data-value="{{.}}">{{.}}</div> |
||||||
{{if not .Repository.IsBare}} |
{{end}} |
||||||
<div class="field"> |
</div> |
||||||
<label>{{.i18n.Tr "repo.default_branch"}}</label> |
</div> |
||||||
<select name="branch"> |
</div> |
||||||
{{if .Repository.DefaultBranch}}<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>{{end}} |
{{end}} |
||||||
{{range .Branches}} |
{{if not .Repository.IsFork}} |
||||||
{{if not (eq . $.Repository.DefaultBranch)}}<option value="{{.}}">{{.}}</option>{{end}} |
<div class="inline field"> |
||||||
{{end}} |
<label>{{.i18n.Tr "repo.visibility"}}</label> |
||||||
</select> |
<div class="ui checkbox"> |
||||||
</div> |
<input name="private" type="checkbox" {{if .private}}checked{{end}}> |
||||||
{{end}} |
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label> |
||||||
{{if .Repository.IsMirror}} |
|
||||||
<div class="field"> |
|
||||||
<label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label> |
|
||||||
<input class="ipt ipt-large ipt-radius {{if .Err_Interval}}ipt-error{{end}}" id="interval" name="interval" type="number" value="{{.MirrorInterval}}" /> |
|
||||||
</div> |
|
||||||
{{end}} |
|
||||||
<div class="field"> |
|
||||||
<label for="visibility">{{.i18n.Tr "repo.visibility"}}</label> |
|
||||||
<input class="ipt-chk" id="visibility" name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}} /> |
|
||||||
<span>{{.i18n.Tr "repo.visiblity_helper" | Str2html}}</span> |
|
||||||
</div> |
|
||||||
<div class="field"> |
|
||||||
<span class="form-label"></span> |
|
||||||
<button class="btn btn-green btn-large btn-radius" id="change-reponame-btn" href="#change-reponame-modal">{{.i18n.Tr "repo.settings.update_settings"}}</button> |
|
||||||
</div> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
<br> |
</div> |
||||||
<div class="setting-content"> |
{{end}} |
||||||
<div id="setting-content"> |
{{if .Repository.IsMirror}} |
||||||
<div id="user-profile-setting-content" class="panel panel-warning panel-radius"> |
<div class="inline field {{if .Err_Interval}}error{{end}}"> |
||||||
<div class="panel-header"> |
<label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label> |
||||||
<strong>{{.i18n.Tr "repo.settings.danger_zone"}}</strong> |
<input id="interval" name="interval" type="number" value="{{.MirrorInterval}}"> |
||||||
</div> |
</div> |
||||||
<div class="panel-body"> |
{{end}} |
||||||
<div class="repo-setting-zone"> |
|
||||||
<button class="btn btn-gray btn-large btn-radius right" id="transfer-repo-btn" href="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button> |
<div class="field"> |
||||||
<dt>{{.i18n.Tr "repo.settings.transfer"}}</dt> |
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button> |
||||||
<dl>{{.i18n.Tr "repo.settings.transfer_desc"}}</dl> |
</div> |
||||||
<div class="white-popup-block mfp-hide" id="transfer-repo-modal"> |
</form> |
||||||
<h1 class="text-red">{{.i18n.Tr "repo.settings.transfer"}}</h1> |
</div> |
||||||
{{.i18n.Tr "repo.settings.transfer_notices" | Str2html}} |
|
||||||
<br> |
<h4 class="ui top attached warning header"> |
||||||
<form class="form-align form panel container panel-radius" id="transfer-repo-form" action="{{.RepoLink}}/settings" method="post"> |
{{.i18n.Tr "repo.settings.danger_zone"}} |
||||||
{{.CsrfTokenHtml}} |
</h4> |
||||||
<input type="hidden" name="action" value="transfer"> |
<div class="ui attached warning table danger segment"> |
||||||
<div class="panel-content"> |
<div class="item"> |
||||||
<div class="field"> |
<div class="ui right"> |
||||||
<label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label> |
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button> |
||||||
<input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required /> |
</div> |
||||||
</div> |
<div> |
||||||
<div class="field"> |
<h5>{{.i18n.Tr "repo.settings.transfer"}}</h5> |
||||||
<label class="req" for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label> |
<p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p> |
||||||
<input class="ipt ipt-large ipt-radius" id="new_owner_name" name="new_owner_name" required/> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="field"> |
|
||||||
<label class="req" for="password">{{.i18n.Tr "password"}}</label> |
<div class="ui divider"></div> |
||||||
<input class="ipt ipt-large ipt-radius" id="password" name="password" type="password" required/> |
|
||||||
</div> |
<div class="item"> |
||||||
</div> |
<div class="ui right"> |
||||||
</form> |
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.i18n.Tr "repo.settings.delete"}}</button> |
||||||
<br> |
</div> |
||||||
<button class="btn btn-large btn-red btn-radius" id="transfer-repo-submit">{{.i18n.Tr "repo.settings.make_transfer"}}</button> |
<div> |
||||||
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button> |
<h5>{{.i18n.Tr "repo.settings.delete"}}</h5> |
||||||
</div> |
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p> |
||||||
</div> |
</div> |
||||||
<hr> |
</div> |
||||||
<div class="repo-setting-zone"> |
</div> |
||||||
<button class="btn btn-gray btn-large btn-radius pull-right" id="delete-repo-btn" href="#delete-repo-modal">{{.i18n.Tr "repo.settings.delete"}}</button> |
</div> |
||||||
<dt>{{.i18n.Tr "repo.settings.delete"}}</dt> |
|
||||||
<dl>{{.i18n.Tr "repo.settings.delete_desc"}}</dl> |
|
||||||
<div class="white-popup-block mfp-hide" id="delete-repo-modal"> |
|
||||||
<h1 class="text-red">{{.i18n.Tr "repo.settings.delete"}}</h1> |
|
||||||
<br> |
|
||||||
<form class="form-align form panel container panel-radius" id="delete-repo-form" action="{{.RepoLink}}/settings" method="post"> |
|
||||||
{{.CsrfTokenHtml}} |
|
||||||
<input type="hidden" name="action" value="delete"> |
|
||||||
<div class="panel-content"> |
|
||||||
<div class="field"> |
|
||||||
<label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label> |
|
||||||
<input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required /> |
|
||||||
</div> |
|
||||||
<div class="field"> |
|
||||||
<label class="req" for="password">{{.i18n.Tr "password"}}</label> |
|
||||||
<input class="ipt ipt-large ipt-radius" id="password" name="password" type="password" required/> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</form> |
|
||||||
<br> |
|
||||||
<button class="btn btn-large btn-red btn-radius" id="delete-repo-submit">{{.i18n.Tr "repo.settings.confirm_delete"}}</button> |
|
||||||
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="ui small modal" id="transfer-repo-modal"> |
||||||
|
<div class="header"> |
||||||
|
{{.i18n.Tr "repo.settings.transfer"}} |
||||||
|
</div> |
||||||
|
<div class="content"> |
||||||
|
<div class="ui warning message text left">{{.i18n.Tr "repo.settings.transfer_notices" | Str2html}}</div> |
||||||
|
<form class="ui form" action="{{.Link}}" method="post"> |
||||||
|
{{.CsrfTokenHtml}} |
||||||
|
<input type="hidden" name="action" value="transfer"> |
||||||
|
<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="required field"> |
||||||
|
<label for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label> |
||||||
|
<input id="new_owner_name" name="new_owner_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.make_transfer"}}</button> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="ui small modal" id="delete-repo-modal"> |
||||||
|
<div class="header"> |
||||||
|
{{.i18n.Tr "repo.settings.delete"}} |
||||||
|
</div> |
||||||
|
<div class="content"> |
||||||
|
<div class="ui warning message text left">{{.i18n.Tr "repo.settings.delete_notices" | Str2html}}</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> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
Loading…
Reference in new issue