mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 09:38:00 +03:00
f384b13f1c
Closes #20955 This PR adds the possibility to disable blank Issues, when the Repo has templates. This can be done by creating the file `.gitea/issue_config.yaml` with the content `blank_issues_enabled` in the Repo.
59 lines
2.2 KiB
Handlebars
59 lines
2.2 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository new issue">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
<div class="navbar">
|
|
{{template "repo/issue/navbar" .}}
|
|
</div>
|
|
<div class="ui divider"></div>
|
|
{{range .IssueTemplates}}
|
|
<div class="ui attached segment">
|
|
<div class="ui two column grid">
|
|
<div class="column left aligned">
|
|
<strong>{{.Name | RenderEmojiPlain}}</strong>
|
|
<br>{{.About | RenderEmojiPlain}}
|
|
</div>
|
|
<div class="column right aligned">
|
|
<a href="{{$.RepoLink}}/issues/new?template={{.FileName}}{{if $.milestone}}&milestone={{$.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{range .IssueConfig.ContactLinks}}
|
|
<div class="ui attached segment">
|
|
<div class="ui two column grid">
|
|
<div class="column left aligned">
|
|
<strong>{{.Name | RenderEmojiPlain}}</strong>
|
|
<br>{{.About | RenderEmojiPlain}}
|
|
</div>
|
|
<div class="column right aligned">
|
|
<a href="{{.URL}}" class="ui green button">{{svg "octicon-link-external"}} {{$.locale.Tr "repo.issues.choose.open_external_link"}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{if .IssueConfig.BlankIssuesEnabled}}
|
|
<div class="ui attached segment">
|
|
<div class="ui two column grid">
|
|
<div class="column left aligned">
|
|
<strong>{{.locale.Tr "repo.issues.choose.blank"}}</strong>
|
|
<br/>{{.locale.Tr "repo.issues.choose.blank_about"}}
|
|
</div>
|
|
<div class="column right aligned">
|
|
<a href="{{.RepoLink}}/issues/new?{{if .milestone}}&milestone={{.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{- if .IssueConfigError}}{{/* normal warning flash makes problems here*/}}
|
|
<div class="ui warning message">
|
|
<div class="text left">
|
|
<div>{{.locale.Tr "repo.issues.choose.invalid_config"}}</div>
|
|
<diy>{{.IssueConfigError}}</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|