2015-08-28 04:44:04 -04:00
|
|
|
{{template "base/head" .}}
|
|
|
|
<div class="repository new repo">
|
|
|
|
<div class="ui middle very relaxed page grid">
|
|
|
|
<div class="column">
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
2014-03-22 13:44:02 -04:00
|
|
|
{{.CsrfTokenHtml}}
|
2015-08-28 04:44:04 -04:00
|
|
|
<h3 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "new_repo"}}
|
|
|
|
</h3>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
{{template "base/alert" .}}
|
|
|
|
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
|
|
|
<label>{{.i18n.Tr "repo.owner"}}</label>
|
2015-09-01 11:43:53 -04:00
|
|
|
<div class="ui selection owner dropdown">
|
2015-08-28 04:44:04 -04:00
|
|
|
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
|
|
|
|
<span class="text">
|
|
|
|
<img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
|
|
|
|
{{.ContextUser.Name}}
|
|
|
|
</span>
|
|
|
|
<i class="dropdown icon"></i>
|
|
|
|
<div class="menu">
|
|
|
|
<div class="item" data-value="{{.SignedUser.Id}}">
|
|
|
|
<img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
|
|
|
|
{{.SignedUser.Name}}
|
2014-06-25 00:22:08 -04:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
{{range .Orgs}}
|
|
|
|
{{if .IsOwnedBy $.SignedUser.Id}}
|
|
|
|
<div class="item" data-value="{{.Id}}">
|
|
|
|
<img class="ui mini image" src="{{.AvatarLink}}">
|
|
|
|
{{.Name}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2014-06-25 00:22:08 -04:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
|
|
|
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
|
|
|
<input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required>
|
2015-08-28 23:49:59 -04:00
|
|
|
<span class="help">{{.i18n.Tr "repo.repo_name_helper" | Safe}}</span>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
2015-08-29 03:49:14 -04:00
|
|
|
<div class="ui checkbox">
|
2015-08-28 04:44:04 -04:00
|
|
|
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
|
2014-08-02 13:47:33 -04:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
|
|
|
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
|
|
|
|
<textarea id="description" name="description">{{.description}}</textarea>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.repo_lang"}}</label>
|
|
|
|
<div class="ui multiple search normal selection dropdown">
|
2015-08-28 06:33:09 -04:00
|
|
|
<input type="hidden" name="gitignores" value="{{.gitignores}}">
|
2015-08-28 04:44:04 -04:00
|
|
|
<div class="default text">{{.i18n.Tr "repo.repo_lang_helper"}}</div>
|
|
|
|
<div class="menu">
|
|
|
|
{{range .Gitignores}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2014-03-07 16:05:18 -05:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.license"}}</label>
|
|
|
|
<div class="ui selection dropdown">
|
|
|
|
<input type="hidden" name="license" value="{{.license}}">
|
|
|
|
<div class="default text">{{.i18n.Tr "repo.license_helper"}}</div>
|
|
|
|
<div class="menu">
|
|
|
|
{{range .Licenses}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2014-08-02 13:47:33 -04:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline field">
|
2015-08-28 07:23:02 -04:00
|
|
|
<label>{{.i18n.Tr "repo.readme"}} <a target="_blank" href="https://github.com/gogits/go-gogs-client/wiki/Repositories#litte-notes-on-readme-template"><span class="octicon octicon-question"></span></a></label>
|
2015-08-28 04:44:04 -04:00
|
|
|
<div class="ui selection dropdown">
|
2015-08-28 06:33:09 -04:00
|
|
|
<input type="hidden" name="readme" value="{{.readme}}">
|
2015-08-28 04:44:04 -04:00
|
|
|
<div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div>
|
|
|
|
<div class="menu">
|
|
|
|
{{range .Readmes}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2014-08-02 13:47:33 -04:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox" id="auto-init">
|
|
|
|
<input class="hidden" name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.auto_init"}}</label>
|
2014-08-02 13:47:33 -04:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
|
|
|
<button class="ui green button">
|
|
|
|
{{.i18n.Tr "repo.create_repo"}}
|
|
|
|
</button>
|
|
|
|
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
|
|
|
</div>
|
2014-03-02 11:22:20 -05:00
|
|
|
</div>
|
|
|
|
</form>
|
2015-08-28 04:44:04 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-02-19 21:45:43 -05:00
|
|
|
</div>
|
2015-08-28 04:44:04 -04:00
|
|
|
{{template "base/footer" .}}
|