2022-09-02 13:28:49 +05:30
|
|
|
{{if .Fields}}
|
|
|
|
<input type="hidden" name="template-file" value="{{.TemplateFile}}">
|
|
|
|
{{range .Fields}}
|
|
|
|
{{if eq .Type "input"}}
|
|
|
|
{{template "repo/issue/fields/input" .}}
|
|
|
|
{{else if eq .Type "markdown"}}
|
|
|
|
{{template "repo/issue/fields/markdown" .}}
|
|
|
|
{{else if eq .Type "textarea"}}
|
|
|
|
{{template "repo/issue/fields/textarea" .}}
|
|
|
|
{{else if eq .Type "dropdown"}}
|
|
|
|
{{template "repo/issue/fields/dropdown" .}}
|
|
|
|
{{else if eq .Type "checkboxes"}}
|
|
|
|
{{template "repo/issue/fields/checkboxes" .}}
|
|
|
|
{{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-06 23:39:18 +05:30
|
|
|
<a class="item" data-tab="preview" data-url="{{.Repository.Link}}/markdown" data-context="{{.RepoLink}}">{{.locale.Tr "preview"}}</a>
|
2022-09-02 13:28:49 +05:30
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui bottom active tab" data-tab="write">
|
2023-02-06 23:39:18 +05:30
|
|
|
<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 07:32:38 +05:30
|
|
|
{{- if .BodyQuery}}{{.BodyQuery}}{{else if .IssueTemplate}}{{.IssueTemplate}}{{else if .PullRequestTemplate}}{{.PullRequestTemplate}}{{else}}{{.content}}{{end -}}
|
|
|
|
</textarea>
|
2022-09-02 13:28:49 +05:30
|
|
|
</div>
|
|
|
|
<div class="ui bottom tab markup" data-tab="preview">
|
|
|
|
{{.locale.Tr "loading"}}
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
</div>
|
2022-09-02 13:28:49 +05:30
|
|
|
{{end}}
|
2015-08-12 16:14:09 +05:30
|
|
|
{{if .IsAttachmentEnabled}}
|
2020-10-05 11:19:33 +05:30
|
|
|
<div class="field">
|
|
|
|
{{template "repo/upload" .}}
|
|
|
|
</div>
|
2015-12-08 04:00:52 +05:30
|
|
|
{{end}}
|