2015-08-28 03:44:04 -05:00
|
|
|
{{template "base/head" .}}
|
2020-11-30 22:00:14 -06:00
|
|
|
<div class="page-content repository new repo">
|
2015-12-07 16:30:52 -06:00
|
|
|
<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" .}}
|
2021-01-21 17:44:37 -06:00
|
|
|
{{if not .CanCreateRepo}}
|
|
|
|
<div class="ui negative message">
|
|
|
|
<p>{{.i18n.Tr (TrN .i18n.Lang .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n") .MaxCreationLimit}}</p>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-12-07 16:30:52 -06:00
|
|
|
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
|
|
|
<label>{{.i18n.Tr "repo.owner"}}</label>
|
|
|
|
<div class="ui selection owner dropdown">
|
2016-07-23 12:08:22 -05:00
|
|
|
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
|
2021-02-11 19:29:07 -06:00
|
|
|
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
|
2020-12-03 12:46:11 -06:00
|
|
|
{{avatar .ContextUser 28 "mini"}}
|
2021-02-11 19:29:07 -06:00
|
|
|
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
|
2015-12-07 16:30:52 -06:00
|
|
|
</span>
|
2020-10-31 17:15:11 -05:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2015-12-07 16:30:52 -06:00
|
|
|
<div class="menu">
|
2021-02-11 19:29:07 -06:00
|
|
|
<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}">
|
2020-12-03 12:46:11 -06:00
|
|
|
{{avatar .SignedUser 28 "mini"}}
|
2021-02-11 19:29:07 -06:00
|
|
|
<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
|
|
|
{{range .Orgs}}
|
2021-02-11 19:29:07 -06:00
|
|
|
<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
|
2020-12-03 12:46:11 -06:00
|
|
|
{{avatar . 28 "mini"}}
|
2021-02-11 19:29:07 -06:00
|
|
|
<span class="truncated-item-name">{{.ShortName 40}}</span>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-21 07:12:13 -06:00
|
|
|
<span class="help">{{.i18n.Tr "repo.owner_helper"}}</span>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
2015-08-28 03:44:04 -05:00
|
|
|
|
2015-12-07 16:30:52 -06:00
|
|
|
<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>
|
2018-04-09 22:43:37 -05:00
|
|
|
<span class="help">{{.i18n.Tr "repo.repo_name_helper"}}</span>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
2019-09-05 04:13:51 -05:00
|
|
|
<div class="inline field">
|
2015-12-07 16:30:52 -06:00
|
|
|
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
{{if .IsForcedPrivate}}
|
|
|
|
<input name="private" type="checkbox" checked readonly>
|
2018-07-04 06:43:21 -05:00
|
|
|
<label>{{.i18n.Tr "repo.visibility_helper_forced" | Safe}}</label>
|
2015-12-07 16:30:52 -06:00
|
|
|
{{else}}
|
|
|
|
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
2018-07-04 06:43:21 -05:00
|
|
|
<label>{{.i18n.Tr "repo.visibility_helper" | Safe}}</label>
|
2015-12-07 16:30:52 -06:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2019-09-05 04:13:51 -05:00
|
|
|
<span class="help">{{.i18n.Tr "repo.visibility_description"}}</span>
|
2015-12-07 16:30:52 -06: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>
|
2019-09-08 03:28:40 -05:00
|
|
|
<div class="inline field">
|
2019-11-11 09:15:29 -06:00
|
|
|
<label>{{.i18n.Tr "repo.template"}}</label>
|
|
|
|
<div id="repo_template_search" class="ui search normal selection dropdown">
|
|
|
|
<input type="hidden" id="repo_template" name="repo_template" value="{{.repo_template}}">
|
|
|
|
<div class="default text">{{.repo_template_name}}</div>
|
2019-09-08 03:28:40 -05:00
|
|
|
<div class="menu">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-11-11 09:15:29 -06:00
|
|
|
<div id="template_units" style="display: none;">
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.template.items"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="git_content" type="checkbox" tabindex="0" {{if .git_content}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.template.git_content"}}</label>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
2020-11-10 12:28:07 -06:00
|
|
|
<div class="ui checkbox{{if not .SignedUser.CanEditGitHook}} poping up{{end}}"{{if not .SignedUser.CanEditGitHook}} data-content="{{.i18n.Tr "repo.template.git_hooks_tooltip"}}"{{end}}>
|
2019-11-24 11:57:52 -06:00
|
|
|
<input class="hidden" name="git_hooks" type="checkbox" tabindex="0" {{if .git_hooks}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.template.git_hooks"}}</label>
|
|
|
|
</div>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
2019-11-11 09:15:29 -06:00
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
2019-11-24 11:57:52 -06:00
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="webhooks" type="checkbox" tabindex="0" {{if .webhooks}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.template.webhooks"}}</label>
|
|
|
|
</div>
|
2019-11-11 09:15:29 -06:00
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="topics" type="checkbox" tabindex="0" {{if .topics}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.template.topics"}}</label>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-11-24 23:17:51 -06:00
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="avatar" type="checkbox" tabindex="0" {{if .avatar}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.template.avatar"}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="labels" type="checkbox" tabindex="0" {{if .labels}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.template.issue_labels"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
2015-08-28 03:44:04 -05:00
|
|
|
|
2019-11-11 09:15:29 -06:00
|
|
|
<div id="non_template">
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.issue_labels"}}</label>
|
|
|
|
<div class="ui search normal selection dropdown">
|
|
|
|
<input type="hidden" name="issue_labels" value="{{.issueLabels}}">
|
|
|
|
<div class="default text">{{.i18n.Tr "repo.issue_labels_helper"}}</div>
|
|
|
|
<div class="menu">
|
|
|
|
<div class="item" data-value="">{{.i18n.Tr "repo.issue_labels_helper"}}</div>
|
2019-12-06 20:13:19 -06:00
|
|
|
{{range $template, $labels := .LabelTemplates}}
|
|
|
|
<div class="item" data-value="{{$template}}">{{$template}}<br/><i>({{$labels}})</i></div>
|
2019-11-11 09:15:29 -06:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-11-11 09:15:29 -06:00
|
|
|
|
|
|
|
<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">
|
|
|
|
<div class="item" data-value="">{{.i18n.Tr "repo.license_helper"}}</div>
|
|
|
|
{{range .Licenses}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.readme"}}</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>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
2020-03-26 14:14:51 -05:00
|
|
|
<div class="inline field">
|
|
|
|
<label for="default_branch">{{.i18n.Tr "repo.default_branch"}}</label>
|
2020-06-17 15:53:55 -05:00
|
|
|
<input id="default_branch" name="default_branch" value="{{.default_branch}}" placeholder="{{.default_branch}}">
|
2020-03-26 14:14:51 -05:00
|
|
|
</div>
|
2020-09-19 11:44:55 -05:00
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.settings.trust_model"}}</label>
|
|
|
|
<div class="ui selection owner dropdown">
|
2020-09-23 16:53:06 -05:00
|
|
|
<input type="hidden" id="trust_model" name="trust_model" value="default" required>
|
|
|
|
<div class="default text">{{.i18n.Tr "repo.settings.trust_model"}}</div>
|
2020-10-31 17:15:11 -05:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2020-09-23 16:53:06 -05:00
|
|
|
<div class="menu">
|
|
|
|
<div class="item" data-value="default">{{.i18n.Tr "repo.settings.trust_model.default"}}</div>
|
|
|
|
<div class="item" data-value="collaborator">{{.i18n.Tr "repo.settings.trust_model.collaborator"}}</div>
|
|
|
|
<div class="item" data-value="committer">{{.i18n.Tr "repo.settings.trust_model.committer"}}</div>
|
|
|
|
<div class="item" data-value="collaboratorcommitter">{{.i18n.Tr "repo.settings.trust_model.collaboratorcommitter"}}</div>
|
|
|
|
</div>
|
2020-09-19 11:44:55 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-09-25 00:18:37 -05:00
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.i18n.Tr "repo.template"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="template" type="checkbox" tabindex="0">
|
|
|
|
<label>{{.i18n.Tr "repo.template_helper"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 16:30:52 -06:00
|
|
|
</div>
|
|
|
|
|
2019-11-11 09:15:29 -06:00
|
|
|
<br/>
|
2015-12-07 16:30:52 -06:00
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
2021-01-21 17:44:37 -06:00
|
|
|
<button class="ui green button{{if not .CanCreateRepo}} disabled{{end}}">
|
2015-12-07 16:30:52 -06:00
|
|
|
{{.i18n.Tr "repo.create_repo"}}
|
|
|
|
</button>
|
|
|
|
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-02-19 20:45:43 -06:00
|
|
|
</div>
|
2015-12-07 16:30:52 -06:00
|
|
|
{{template "base/footer" .}}
|