2022-09-02 15:58:49 +08:00
|
|
|
{{if .Fields}}
|
|
|
|
<input type="hidden" name="template-file" value="{{.TemplateFile}}">
|
|
|
|
{{range .Fields}}
|
|
|
|
{{if eq .Type "input"}}
|
2023-02-24 21:17:03 +08:00
|
|
|
{{template "repo/issue/fields/input" Dict "Context" $.Context "item" .}}
|
2022-09-02 15:58:49 +08:00
|
|
|
{{else if eq .Type "markdown"}}
|
2023-02-24 21:17:03 +08:00
|
|
|
{{template "repo/issue/fields/markdown" Dict "Context" $.Context "item" .}}
|
2022-09-02 15:58:49 +08:00
|
|
|
{{else if eq .Type "textarea"}}
|
2023-02-24 21:17:03 +08:00
|
|
|
{{template "repo/issue/fields/textarea" Dict "Context" $.Context "item" .}}
|
2022-09-02 15:58:49 +08:00
|
|
|
{{else if eq .Type "dropdown"}}
|
2023-02-24 21:17:03 +08:00
|
|
|
{{template "repo/issue/fields/dropdown" Dict "Context" $.Context "item" .}}
|
2022-09-02 15:58:49 +08:00
|
|
|
{{else if eq .Type "checkboxes"}}
|
2023-02-24 21:17:03 +08:00
|
|
|
{{template "repo/issue/fields/checkboxes" Dict "Context" $.Context "item" .}}
|
2022-09-02 15:58:49 +08:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{else}}
|
|
|
|
<div class="ui top tabular menu" data-write="write" data-preview="preview">
|
|
|
|
<a class="active item" data-tab="write">{{.locale.Tr "write"}}</a>
|
2023-02-07 02:09:18 +08:00
|
|
|
<a class="item" data-tab="preview" data-url="{{.Repository.Link}}/markdown" data-context="{{.RepoLink}}">{{.locale.Tr "preview"}}</a>
|
2022-09-02 15:58:49 +08:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui bottom active tab" data-tab="write">
|
2023-02-07 02:09:18 +08:00
|
|
|
<textarea id="content" class="edit_area js-quick-submit" name="content" tabindex="4" data-id="issue-{{.RepoName}}" data-url="{{.Repository.Link}}/markdown" data-context="{{.Repo.RepoLink}}">
|
2021-03-18 10:02:38 +08:00
|
|
|
{{- if .BodyQuery}}{{.BodyQuery}}{{else if .IssueTemplate}}{{.IssueTemplate}}{{else if .PullRequestTemplate}}{{.PullRequestTemplate}}{{else}}{{.content}}{{end -}}
|
|
|
|
</textarea>
|
2022-09-02 15:58:49 +08:00
|
|
|
</div>
|
|
|
|
<div class="ui bottom tab markup" data-tab="preview">
|
|
|
|
{{.locale.Tr "loading"}}
|
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2022-09-02 15:58:49 +08:00
|
|
|
{{end}}
|
2015-08-12 18:44:09 +08:00
|
|
|
{{if .IsAttachmentEnabled}}
|
2020-10-05 13:49:33 +08:00
|
|
|
<div class="field">
|
|
|
|
{{template "repo/upload" .}}
|
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{end}}
|