2014-03-13 14:08:49 +08:00
{{template "base/head" .}}
{{template "base/navbar" .}}
{{template "repo/nav" .}}
{{template "repo/toolbar" .}}
2014-03-25 18:44:37 +08:00
<div id="body" class="container">
2014-05-01 23:32:12 +08:00
{{template "repo/setting_nav" .}}
2014-05-01 17:44:22 +08:00
<div id="repo-setting-container" class="col-md-10">
2014-04-11 10:03:31 +08:00
{{template "base/alert" .}}
2014-03-17 14:36:28 +08:00
<div class="panel panel-default">
<div class="panel-heading">
Repository Options
</div>
2014-03-20 19:50:26 +08:00
2014-03-17 14:36:28 +08:00
<div class="panel-body">
2014-03-23 16:06:07 +08:00
<form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="form-horizontal">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="update">
2014-04-04 03:50:55 +08:00
<div class="form-group">
2014-04-06 16:48:02 +08:00
<label class="col-md-3 text-right" for="repo-setting-name">Name</label>
2014-04-04 03:50:55 +08:00
<div class="col-md-9">
2014-04-06 16:48:02 +08:00
<input class="form-control" name="name" value="{{.Repository.Name}}" title="{{.Repository.Name}}" id="repo-setting-name"/>
<p class="help-block hidden"><span class="text-danger">Cautious : </span>your repository name is changing !</p>
2014-04-04 03:50:55 +08:00
</div>
</div>
2014-03-23 16:06:07 +08:00
<div class="form-group">
<label class="col-md-3 text-right">Description</label>
<div class="col-md-9">
2014-03-23 18:27:01 +08:00
<textarea class="form-control" name="desc" id="repo-desc" rows="3">{{.Repository.Description}}</textarea>
2014-03-23 16:06:07 +08:00
</div>
</div>
2014-04-04 03:50:55 +08:00
2014-03-23 16:06:07 +08:00
<div class="form-group">
<label class="col-md-3 text-right">Official Site</label>
<div class="col-md-9">
2014-03-23 18:27:01 +08:00
<input type="url" class="form-control" name="site" value="{{.Repository.Website}}" />
2014-03-23 16:06:07 +08:00
</div>
</div>
2014-04-10 09:42:25 +08:00
<hr>
2014-04-11 10:03:31 +08:00
<div class="form-group">
2014-03-23 16:06:07 +08:00
<label class="col-md-3 text-right">Default Branch</label>
2014-04-13 10:30:00 +08:00
<div class="col-md-3">
2014-03-23 16:06:07 +08:00
<select name="branch" id="repo-default-branch" class="form-control">
2014-04-11 10:03:31 +08:00
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
{{range .Branches}}
{{if eq . $.Repository.DefaultBranch}}{{else}}<option value="{{.}}">{{.}}</option>{{end}}
{{end}}
2014-03-23 16:06:07 +08:00
</select>
</div>
2014-04-11 10:03:31 +08:00
</div>
2014-04-10 09:42:25 +08:00
2014-04-13 10:30:00 +08:00
{{if .Repository.IsMirror}}<div class="form-group">
<label class="col-md-3 text-right">Mirror Interval(hours)</label>
<div class="col-md-3">
<input class="form-control" name="interval" value="{{.MirrorInterval}}"/>
</div>
</div>{{end}}
2014-04-10 09:42:25 +08:00
<div class="form-group">
<div class="col-md-offset-3 col-md-9">
2014-04-19 18:00:08 +08:00
<div class="checkbox">
<label style="line-height: 15px;">
<input type="checkbox" name="private" {{if .Repository.IsPrivate}}checked{{end}}>
<strong>Make this repository private</strong>
</label>
</div>
2014-04-10 09:42:25 +08:00
<div class="checkbox">
<label style="line-height: 15px;">
<input type="checkbox" name="goget" {{if .Repository.IsGoget}}checked{{end}}>
<strong>Enable 'go get' meta</strong>
</label>
</div>
</div>
</div>
2014-03-23 16:06:07 +08:00
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<button class="btn btn-primary" type="submit">Save Options</button>
</div>
</div>
</form>
2014-03-17 14:36:28 +08:00
</div>
2014-03-13 14:08:49 +08:00
</div>
2014-03-20 19:50:26 +08:00
2014-03-17 14:36:28 +08:00
<div class="panel panel-warning">
<div class="panel-heading">
Danger Zone
</div>
2014-03-20 19:50:26 +08:00
2014-04-05 06:31:09 +08:00
<div class="panel-body">
<button type="button" class="btn btn-default pull-right" href=" #transfer - repository - modal " data-toggle= " modal " >
Transfer ownership
</button>
<dd>
<dt>Transfer ownership</dt>
<dl>Transfer this repo to another user or to an organization where you have admin rights.</dl>
</dd>
<div class="modal fade" id="transfer-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="transfer">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Do you really want to transfer this repo?</h4>
</div>
<div class="modal-body">
<div class="alert alert-warning">This is important, pay attention.</div>
<ul>
<!-- <li>Transferring may be delayed until the new owner approves the transfer.</li> -->
<!-- <li>If you are transferring into an org, teams <strong>will not be set</strong>. An owner on the org will need to set teams for the repo.</li> -->
<li>Admin rights will be transferred to the new owner, you <strong>will lose admin rights</strong>.</li>
<!-- <li>Admin rights will be transferred to the new owner, you <strong>may lose admin rights</strong> if you are transferring into an organization account.</li> -->
<li>Redirect entries <strong>will NOT be</strong> set up from the previous location.</li>
<li>Git access <strong>will NOT continue</strong> to work from the previous location.</li>
</ul>
<div class="form-group">
<label>Please type the name of the repository to confirm "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
<input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
</div>
<div class="form-group">
<label>Please type the name of the new owner:</label>
<input name="owner" class="form-control" type="text" placeholder="Type new owner's name" required="required">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button class="btn btn-danger btn-lg">I understand the consequences, transfer this repository</button>
</div>
</form>
</div>
</div>
</div>
<hr>
2014-03-17 14:36:28 +08:00
<div class="panel-body">
<button type="button" class="btn btn-default pull-right" href=" #delete - repository - modal " data-toggle= " modal " >
Delete this repository
</button>
<dd>
2014-04-05 06:31:09 +08:00
<dt>Delete this repository</dt>
2014-03-17 14:36:28 +08:00
<dl>Once you delete a repository, there is no going back. Please be certain.</dl>
</dd>
2014-03-13 14:08:49 +08:00
2014-03-17 14:36:28 +08:00
<div class="modal fade" id="delete-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
2014-03-23 01:44:02 +08:00
{{.CsrfTokenHtml}}
2014-03-17 14:36:28 +08:00
<input type="hidden" name="action" value="delete">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Delete repository</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label>Please enter your repository name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
<input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button class="btn btn-danger btn-lg">I understand the consequences, delete this repository</button>
</div>
</form>
</div>
</div>
</div>
2014-03-13 14:08:49 +08:00
</div>
</div>
</div>
{{template "base/footer" .}}