2015-08-29 14:21:59 -05:00
|
|
|
{{template "base/head" .}}
|
|
|
|
<div class="repository settings options">
|
|
|
|
{{template "repo/header" .}}
|
|
|
|
<div class="ui container">
|
|
|
|
<div class="ui grid">
|
|
|
|
{{template "repo/settings/navbar" .}}
|
|
|
|
<div class="twelve wide column content">
|
|
|
|
{{template "base/alert" .}}
|
|
|
|
<h4 class="ui top attached header">
|
2015-12-07 17:30:52 -05:00
|
|
|
{{.i18n.Tr "repo.settings.basic_settings"}}
|
2015-08-29 14:21:59 -05:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<input type="hidden" name="action" value="update">
|
|
|
|
<div class="required field {{if .Err_RepoName}}error{{end}}">
|
|
|
|
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}<span class="text red hide" id="repo-name-change-prompt"> {{.i18n.Tr "repo.settings.change_reponame_prompt"}}</span></label>
|
|
|
|
<input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
|
|
|
|
</div>
|
|
|
|
<div class="field {{if .Err_Description}}error{{end}}">
|
|
|
|
<label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
|
|
|
|
<textarea id="description" name="description" rows="2">{{.Repository.Description}}</textarea>
|
|
|
|
</div>
|
|
|
|
<div class="field {{if .Err_Website}}error{{end}}">
|
|
|
|
<label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
|
|
|
|
<input id="website" name="website" type="url" value="{{.Repository.Website}}">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{if not .Repository.IsBare}}
|
|
|
|
<div class="required inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.default_branch"}}</label>
|
|
|
|
<div class="ui selection dropdown">
|
|
|
|
<input type="hidden" id="branch" name="branch" value="{{.Repository.DefaultBranch}}">
|
|
|
|
<div class="text">{{.Repository.DefaultBranch}}</div>
|
|
|
|
<i class="dropdown icon"></i>
|
|
|
|
<div class="menu">
|
|
|
|
{{range .Branches}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if not .Repository.IsFork}}
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.i18n.Tr "repo.visiblity_fork_helper"}}</span>{{end}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if .Repository.IsMirror}}
|
|
|
|
<div class="inline field {{if .Err_Interval}}error{{end}}">
|
|
|
|
<label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
|
|
|
|
<input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
|
|
|
|
</div>
|
2015-12-08 20:06:12 -05:00
|
|
|
<div class="field">
|
|
|
|
<label for="mirror_address">{{.i18n.Tr "repo.mirror_address"}}</label>
|
|
|
|
<input id="mirror_address" name="mirror_address" value="{{.Mirror.FullAddress}}">
|
|
|
|
<p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<div class="field">
|
|
|
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "repo.settings.advanced_settings"}}
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="advanced">
|
|
|
|
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.wiki"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="enable_wiki" type="checkbox" {{if .Repository.EnableWiki}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-11 04:55:08 -05:00
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="enable_external_wiki" type="checkbox" {{if .Repository.EnableExternalWiki}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.use_external_wiki"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="external_wiki_url">{{.i18n.Tr "repo.settings.external_wiki_url"}}</label>
|
|
|
|
<input id="external_wiki_url" name="external_wiki_url" type="url" value="{{.Repository.ExternalWikiURL}}">
|
|
|
|
<p class="help">{{.i18n.Tr "repo.settings.external_wiki_url_desc"}}</p>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.issues"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="enable_issues" type="checkbox" {{if .Repository.EnableIssues}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="enable_external_tracker" type="checkbox" {{if .Repository.EnableExternalTracker}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
|
2015-12-11 04:55:08 -05:00
|
|
|
<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{.Repository.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
|
2015-12-07 17:30:52 -05:00
|
|
|
<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
|
|
|
|
</div>
|
2016-04-22 17:28:08 -05:00
|
|
|
<div class="inline fields">
|
|
|
|
<label for="issue_style">{{.i18n.Tr "repo.settings.tracker_issue_style"}}</label>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
|
|
|
<input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="numeric" {{if eq .Repository.ExternalTrackerStyle "numeric"}}checked=""{{end}}/>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.tracker_issue_style.numeric" | Safe}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
|
|
|
<input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="alphanumeric" {{if eq .Repository.ExternalTrackerStyle "alphanumeric"}}checked=""{{end}}/>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.tracker_issue_style.alphanumeric" | Safe}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
|
2016-02-19 14:33:06 -05:00
|
|
|
{{if .Repository.CanEnablePulls}}
|
|
|
|
<div class="ui divider"></div>
|
2015-12-07 17:30:52 -05:00
|
|
|
|
2016-02-19 14:33:06 -05:00
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.pulls"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="enable_pulls" type="checkbox" {{if .Repository.EnablePulls}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2016-02-19 14:33:06 -05:00
|
|
|
{{end}}
|
2015-12-07 17:30:52 -05:00
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<div class="field">
|
|
|
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
|
|
|
</div>
|
2015-08-29 14:21:59 -05:00
|
|
|
</form>
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
{{if .IsRepositoryOwner}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<h4 class="ui top attached warning header">
|
|
|
|
{{.i18n.Tr "repo.settings.danger_zone"}}
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached warning table danger segment">
|
2016-02-14 15:12:00 -05:00
|
|
|
{{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}}
|
2015-08-29 14:21:59 -05:00
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<h5>{{.i18n.Tr "repo.settings.transfer"}}</h5>
|
|
|
|
<p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
|
2016-03-03 15:38:25 -05:00
|
|
|
{{if .Repository.EnableWiki}}
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
2016-03-03 23:24:22 -05:00
|
|
|
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.i18n.Tr "repo.settings.wiki_delete"}}</button>
|
2016-03-03 15:38:25 -05:00
|
|
|
</div>
|
|
|
|
<div>
|
2016-03-03 23:24:22 -05:00
|
|
|
<h5>{{.i18n.Tr "repo.settings.wiki_delete"}}</h5>
|
|
|
|
<p>{{.i18n.Tr "repo.settings.wiki_delete_desc"}}</p>
|
2016-03-03 15:38:25 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2015-08-29 14:21:59 -05:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
|
|
|
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.i18n.Tr "repo.settings.delete"}}</button>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<h5>{{.i18n.Tr "repo.settings.delete"}}</h5>
|
|
|
|
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
{{end}}
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-29 14:21:59 -05:00
|
|
|
</div>
|
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
{{if .IsRepositoryOwner}}
|
|
|
|
{{if .Repository.IsMirror}}
|
|
|
|
<div class="ui small modal" id="convert-repo-modal">
|
|
|
|
<div class="header">
|
|
|
|
{{.i18n.Tr "repo.settings.convert"}}
|
2016-02-14 15:12:00 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
|
|
|
{{.i18n.Tr "repo.settings.convert_notices_1" | Safe}}
|
2016-02-14 15:12:00 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<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>
|
2016-02-14 15:12:00 -05:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
<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_confirm"}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2016-02-14 15:12:00 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
{{end}}
|
2016-02-14 15:12:00 -05:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
<div class="ui small modal" id="transfer-repo-modal">
|
|
|
|
<div class="header">
|
|
|
|
{{.i18n.Tr "repo.settings.transfer"}}
|
2015-09-01 05:31:47 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
|
|
|
{{.i18n.Tr "repo.settings.transfer_notices_1" | Safe}} <br>
|
|
|
|
{{.i18n.Tr "repo.settings.transfer_notices_2" | Safe}}
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<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>
|
2015-12-07 17:30:52 -05:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
<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>
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2015-08-29 14:21:59 -05:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
<div class="ui small modal" id="delete-repo-modal">
|
|
|
|
<div class="header">
|
|
|
|
{{.i18n.Tr "repo.settings.delete"}}
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
|
|
|
{{.i18n.Tr "repo.settings.delete_notices_1" | Safe}} <br>
|
|
|
|
{{.i18n.Tr "repo.settings.delete_notices_2" | Safe}}
|
|
|
|
{{if .Repository.NumForks}}<br>
|
|
|
|
{{.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}}
|
2016-02-14 15:12:00 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<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>
|
2015-12-07 17:30:52 -05:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
<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>
|
2016-02-14 15:12:00 -05:00
|
|
|
</div>
|
2016-03-03 15:38:25 -05:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
{{if .Repository.EnableWiki}}
|
|
|
|
<div class="ui small modal" id="delete-wiki-modal">
|
|
|
|
<div class="header">
|
|
|
|
{{.i18n.Tr "repo.settings.wiki-delete"}}
|
2016-03-03 15:38:25 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
|
|
|
{{.i18n.Tr "repo.settings.delete_notices_1" | Safe}}<br>
|
|
|
|
{{.i18n.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}}
|
2016-03-03 15:38:25 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="delete-wiki">
|
|
|
|
<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>
|
2016-03-03 15:38:25 -05:00
|
|
|
|
2016-03-05 20:45:23 -05:00
|
|
|
<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>
|
2016-03-03 15:38:25 -05:00
|
|
|
</div>
|
2016-03-05 20:45:23 -05:00
|
|
|
{{end}}
|
2016-03-03 23:24:22 -05:00
|
|
|
{{end}}
|
2016-03-03 15:38:25 -05:00
|
|
|
|
2015-12-07 17:30:52 -05:00
|
|
|
{{template "base/footer" .}}
|