2015-08-28 14:14:04 +05:30
|
|
|
{{template "base/head" .}}
|
2023-02-02 04:26:10 +05:30
|
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository new repo">
|
2021-09-12 23:54:57 +05:30
|
|
|
<div class="ui middle very relaxed page one column grid">
|
2015-12-08 04:00:52 +05:30
|
|
|
<div class="column">
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<h3 class="ui top attached header">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "new_repo"}}
|
2015-12-08 04:00:52 +05:30
|
|
|
</h3>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
{{template "base/alert" .}}
|
2023-01-25 00:31:39 +05:30
|
|
|
{{template "repo/create_helper" .}}
|
2021-02-21 15:29:31 +05:30
|
|
|
|
2021-01-22 05:14:37 +05:30
|
|
|
{{if not .CanCreateRepo}}
|
|
|
|
<div class="ui negative message">
|
2023-09-25 14:26:50 +05:30
|
|
|
<p>{{ctx.Locale.TrN .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .MaxCreationLimit}}</p>
|
2021-01-22 05:14:37 +05:30
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-12-08 04:00:52 +05:30
|
|
|
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.owner"}}</label>
|
2015-12-08 04:00:52 +05:30
|
|
|
<div class="ui selection owner dropdown">
|
2016-07-23 22:38:22 +05:30
|
|
|
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
|
2021-02-12 06:59:07 +05:30
|
|
|
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
|
2021-02-12 06:59:07 +05:30
|
|
|
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
|
2015-12-08 04:00:52 +05:30
|
|
|
</span>
|
2020-11-01 03:45:11 +05:30
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2015-12-08 04:00:52 +05:30
|
|
|
<div class="menu">
|
2021-02-12 06:59:07 +05:30
|
|
|
<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}">
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
|
2021-02-12 06:59:07 +05:30
|
|
|
<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
|
|
|
{{range .Orgs}}
|
2021-02-12 06:59:07 +05:30
|
|
|
<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
|
2023-08-10 08:49:39 +05:30
|
|
|
{{ctx.AvatarUtils.Avatar . 28 "mini"}}
|
2021-02-12 06:59:07 +05:30
|
|
|
<span class="truncated-item-name">{{.ShortName 40}}</span>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.owner_helper"}}</span>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2015-08-28 14:14:04 +05:30
|
|
|
|
2015-12-08 04:00:52 +05:30
|
|
|
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
|
2023-05-26 15:12:54 +05:30
|
|
|
<input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required maxlength="100">
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.repo_name_helper"}}</span>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2019-09-05 14:43:51 +05:30
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
2015-12-08 04:00:52 +05:30
|
|
|
<div class="ui checkbox">
|
|
|
|
{{if .IsForcedPrivate}}
|
|
|
|
<input name="private" type="checkbox" checked readonly>
|
2024-02-22 22:32:33 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
2015-12-08 04:00:52 +05:30
|
|
|
{{else}}
|
|
|
|
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
2024-02-22 22:32:33 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
2015-12-08 04:00:52 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
|
|
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
2024-01-16 18:24:48 +05:30
|
|
|
<textarea id="description" rows="2" name="description" placeholder="{{ctx.Locale.Tr "repo.repo_desc_helper"}}" maxlength="2048">{{.description}}</textarea>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2019-09-08 13:58:40 +05:30
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template"}}</label>
|
2024-04-22 16:51:06 +05:30
|
|
|
<div id="repo_template_search" class="ui search selection dropdown">
|
2019-11-11 20:45:29 +05:30
|
|
|
<input type="hidden" id="repo_template" name="repo_template" value="{{.repo_template}}">
|
|
|
|
<div class="default text">{{.repo_template_name}}</div>
|
2019-09-08 13:58:40 +05:30
|
|
|
<div class="menu">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-03-24 23:53:38 +05:30
|
|
|
<div id="template_units" class="tw-hidden">
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template.items"}}</label>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="ui checkbox">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="git_content" type="checkbox" {{if .git_content}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template.git_content"}}</label>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="ui checkbox" {{if not .SignedUser.CanEditGitHook}}data-tooltip-content="{{ctx.Locale.Tr "repo.template.git_hooks_tooltip"}}"{{end}}>
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="git_hooks" type="checkbox" {{if .git_hooks}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template.git_hooks"}}</label>
|
2019-11-24 23:27:52 +05:30
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
2019-11-24 23:27:52 +05:30
|
|
|
<div class="ui checkbox">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="webhooks" type="checkbox" {{if .webhooks}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template.webhooks"}}</label>
|
2019-11-24 23:27:52 +05:30
|
|
|
</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="ui checkbox">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="topics" type="checkbox" {{if .topics}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template.topics"}}</label>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2019-11-25 10:47:51 +05:30
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
|
|
|
<div class="ui checkbox">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="avatar" type="checkbox" {{if .avatar}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template.avatar"}}</label>
|
2019-11-25 10:47:51 +05:30
|
|
|
</div>
|
|
|
|
<div class="ui checkbox">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="labels" type="checkbox" {{if .labels}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template.issue_labels"}}</label>
|
2019-11-25 10:47:51 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-21 10:02:47 +05:30
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
|
|
|
<div class="ui checkbox">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="protected_branch" type="checkbox" {{if .protected_branch}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.settings.protected_branch"}}</label>
|
2023-07-21 10:02:47 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2015-08-28 14:14:04 +05:30
|
|
|
|
2019-11-11 20:45:29 +05:30
|
|
|
<div id="non_template">
|
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.issue_labels"}}</label>
|
2024-04-22 16:51:06 +05:30
|
|
|
<div class="ui search selection dropdown">
|
2019-11-11 20:45:29 +05:30
|
|
|
<input type="hidden" name="issue_labels" value="{{.issueLabels}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="default text">{{ctx.Locale.Tr "repo.issue_labels_helper"}}</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="menu">
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="item" data-value="">{{ctx.Locale.Tr "repo.issue_labels_helper"}}</div>
|
2023-04-10 14:14:02 +05:30
|
|
|
{{range .LabelTemplateFiles}}
|
2024-04-29 19:56:26 +05:30
|
|
|
<div class="item" data-value="{{.DisplayName}}">{{.DisplayName}}<br><p>({{.Description}})</p></div>
|
2019-11-11 20:45:29 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
|
2023-06-29 17:54:22 +05:30
|
|
|
<div class="divider"></div>
|
2019-11-11 20:45:29 +05:30
|
|
|
|
|
|
|
<div class="inline field">
|
|
|
|
<label>.gitignore</label>
|
2024-04-22 16:51:06 +05:30
|
|
|
<div class="ui multiple search selection dropdown">
|
2019-11-11 20:45:29 +05:30
|
|
|
<input type="hidden" name="gitignores" value="{{.gitignores}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="default text">{{ctx.Locale.Tr "repo.repo_gitignore_helper"}}</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="menu">
|
|
|
|
{{range .Gitignores}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.repo_gitignore_helper_desc"}}</span>
|
2019-11-11 20:45:29 +05:30
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.license"}}</label>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="ui search selection dropdown">
|
|
|
|
<input type="hidden" name="license" value="{{.license}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="default text">{{ctx.Locale.Tr "repo.license_helper"}}</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="menu">
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="item" data-value="">{{ctx.Locale.Tr "repo.license_helper"}}</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
{{range .Licenses}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-10 14:21:19 +05:30
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.license_helper_desc" "https://choosealicense.com/"}}</span>
|
2019-11-11 20:45:29 +05:30
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.readme"}}</label>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="ui selection dropdown">
|
|
|
|
<input type="hidden" name="readme" value="{{.readme}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<div class="default text">{{ctx.Locale.Tr "repo.readme_helper"}}</div>
|
2019-11-11 20:45:29 +05:30
|
|
|
<div class="menu">
|
|
|
|
{{range .Readmes}}
|
|
|
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.readme_helper_desc"}}</span>
|
2019-11-11 20:45:29 +05:30
|
|
|
</div>
|
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox" id="auto-init">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="auto_init" type="checkbox" {{if .auto_init}}checked{{end}}>
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.auto_init"}}</label>
|
2019-11-11 20:45:29 +05:30
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2020-03-27 00:44:51 +05:30
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label for="default_branch">{{ctx.Locale.Tr "repo.default_branch"}}</label>
|
2020-06-18 02:23:55 +05:30
|
|
|
<input id="default_branch" name="default_branch" value="{{.default_branch}}" placeholder="{{.default_branch}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.default_branch_helper"}}</span>
|
2020-03-27 00:44:51 +05:30
|
|
|
</div>
|
2024-01-19 21:35:02 +05:30
|
|
|
<div class="inline field">
|
|
|
|
<label>{{ctx.Locale.Tr "repo.object_format"}}</label>
|
|
|
|
<div class="ui selection owner dropdown">
|
|
|
|
<input type="hidden" id="object_format_name" name="object_format_name" value="{{.DefaultObjectFormat.Name}}" required>
|
|
|
|
<div class="default text">{{.DefaultObjectFormat.Name}}</div>
|
|
|
|
<div class="menu">
|
|
|
|
{{range .SupportedObjectFormats}}
|
|
|
|
<div class="item" data-value="{{.Name}}">{{.Name}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.object_format_helper"}}</span>
|
|
|
|
</div>
|
2020-09-25 10:48:37 +05:30
|
|
|
<div class="inline field">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template"}}</label>
|
2020-09-25 10:48:37 +05:30
|
|
|
<div class="ui checkbox">
|
2023-08-26 08:14:00 +05:30
|
|
|
<input name="template" type="checkbox">
|
2023-09-25 14:26:50 +05:30
|
|
|
<label>{{ctx.Locale.Tr "repo.template_helper"}}</label>
|
2020-09-25 10:48:37 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2023-03-27 21:35:51 +05:30
|
|
|
<br>
|
2015-12-08 04:00:52 +05:30
|
|
|
<div class="inline field">
|
|
|
|
<label></label>
|
2023-09-19 03:35:31 +05:30
|
|
|
<button class="ui primary button{{if not .CanCreateRepo}} disabled{{end}}">
|
2023-09-25 14:26:50 +05:30
|
|
|
{{ctx.Locale.Tr "repo.create_repo"}}
|
2015-12-08 04:00:52 +05:30
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-02-20 08:15:43 +05:30
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
{{template "base/footer" .}}
|