]> source.dussan.org Git - gitea.git/commit
Issue Templates: add option to have dropdown printed list (#31577)
author6543 <6543@obermui.de>
Sun, 14 Jul 2024 14:38:45 +0000 (07:38 -0700)
committerGitHub <noreply@github.com>
Sun, 14 Jul 2024 14:38:45 +0000 (16:38 +0200)
commit1064e817c4a6fa6eb5170143150505503c4ef6ed
tree601686fa6c4fa88705f25b840cb9357b2f380ef6
parent957c75bfd21b7ff15c37eae5c8cd86bae974ac5d
Issue Templates: add option to have dropdown printed list (#31577)

Issue template dropdown can have many entries, and it could be better to
have them rendered as list later on if multi-select is enabled.

so this adds an option to the issue template engine to do so.

DOCS: https://gitea.com/gitea/docs/pulls/19

---

## demo:

```yaml
name: Name
title: Title
about: About
labels: ["label1", "label2"]
ref: Ref
body:
  - type: dropdown
    id: id6
    attributes:
      label: Label of dropdown (list)
      description: Description of dropdown
      multiple: true
      list: true
      options:
        - Option 1 of dropdown
        - Option 2 of dropdown
        - Option 3 of dropdown
        - Option 4 of dropdown
        - Option 5 of dropdown
        - Option 6 of dropdown
        - Option 7 of dropdown
        - Option 8 of dropdown
        - Option 9 of dropdown
```

![image](https://github.com/user-attachments/assets/102ed0f4-89da-420b-ab2a-1788b59676f9)

![image](https://github.com/user-attachments/assets/a2bdb14e-43ff-4cc6-9bbe-20244830453c)

---
*Sponsored by Kithara Software GmbH*
modules/issue/template/template.go
modules/issue/template/template_test.go