123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- {{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">
- {{.CSRFTokenHTML}}
- <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>
- <div class="ui selection owner dropdown">
- <input type="hidden" id="user_id" name="user_id" value="{{.ContextUser.ID}}" required>
- <span class="text">
- <img class="ui mini image" src="{{.ContextUser.RelAvatarLink}}">
- {{.ContextUser.ShortName 20}}
- </span>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="{{.LoggedUser.ID}}">
- <img class="ui mini image" src="{{.LoggedUser.RelAvatarLink}}">
- {{.LoggedUser.ShortName 20}}
- </div>
- {{range .Orgs}}
- <div class="item" data-value="{{.ID}}">
- <img class="ui mini image" src="{{.RelAvatarLink}}">
- {{.ShortName 20}}
- </div>
- {{end}}
- </div>
- </div>
- </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>
- <span class="help">{{.i18n.Tr "repo.repo_name_helper" | Safe}}</span>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.visibility"}}</label>
- <div class="ui checkbox">
- {{if .IsForcedPrivate}}
- <input name="private" type="checkbox" checked readonly>
- <label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
- {{else}}
- <input name="private" type="checkbox" {{if .private}}checked{{end}}>
- <label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
- {{end}}
- </div>
- </div>
- <div class="inline field">
- <label></label>
- <div class="ui checkbox">
- <input name="unlisted" type="checkbox">
- <label>{{.i18n.Tr "repo.unlisted_helper" | Safe}}</label>
- </div>
- </div>
- <div class="inline field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
- <textarea class="autosize" id="description" name="description" rows="3">{{.description}}</textarea>
- <span class="help">{{.i18n.Tr "repo.repo_description_helper" | Safe}}</span>
- <span class="help">{{.i18n.Tr "repo.repo_description_length"}}: <span id="descLength"></span></span>
- </div>
- <div class="ui divider"></div>
- <div class="inline field">
- <label>.gitignore</label>
- <div class="ui multiple search normal selection dropdown">
- <input type="hidden" name="gitignores" value="{{.gitignores}}">
- <div class="default text">{{.i18n.Tr "repo.repo_gitignore_helper"}}</div>
- <div class="menu">
- {{range .Gitignores}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.license"}}</label>
- <div class="ui search 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>
- </div>
- </div>
- <div class="inline field">
- <label>{{.i18n.Tr "repo.readme"}} <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/go-gogs-client/wiki/Repositories#litte-notes-on-readme-template"><span class="octicon octicon-question"></span></a></label>
- <div class="ui selection dropdown">
- <input type="hidden" name="readme" value="{{.readme}}">
- <div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div>
- <div class="menu">
- {{range .Readmes}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </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>
- </div>
- </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>
- </div>
- </form>
- </div>
- </div>
- </div>
- {{template "base/footer" .}}
|