forgejo/templates/shared/search/issue/syntax.tmpl
Shiny Nematoda 255ed593d3 feat(issue-search): support query syntax (#9109)
List of currently supported filters:

- `is:open` (or `-is:closed`)
- `is:closed` (or `-is:open`)
- `is:all`
- `author:<username>`
- `assignee:<username>`
- `review:<username>`
- `mentions:<username>`
- `modified:[>|<]<date>`, where `<date>` is the last update date.
- `sort:<by>:[asc|desc]`, where `<by>` is among
	- created
	- comments
	- updated
	- deadline

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9109
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Ellen Εμιλία Άννα Zscheile <fogti@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2025-11-19 16:05:42 +01:00

31 lines
1.1 KiB
Go HTML Template

<a class="ui icon tw-px-4 tw-py-2 show-modal" data-modal="#search-syntax-modal">{{svg "octicon-question"}}</a>
<dialog id="search-syntax-modal">
<article>
<header>{{ctx.Locale.Tr "search.syntax"}}</header>
<div class="content">
<table class="tw-table-auto">
<tbody>
{{range $filter, $tr :=
ctx.Locale.IterWithTr
"is:open" "repo.issues.open_title"
"is:closed" "repo.issues.closed_title"
"is:all" "repo.issues.all_title"
"author:<username>" "repo.issues.filter_poster.hint"
"assignee:<username>" "repo.issues.filter_assignee.hint"
"review:<username>" "repo.issues.filter_reviewers.hint"
"mentions:<username>" "repo.issues.filter_mention.hint"
"sort:<by>:[asc|desc]" "repo.issues.filter_sort.hint"
"modified:[>|<]<date>" "repo.issues.filter_modified.hint"}}
<tr>
<th class="tw-p-2"><code>{{$filter}}</code></th>
<td class="tw-p-2">{{$tr | SafeHTML}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<footer class="actions">
<button class="ui button icon cancel">{{ctx.Locale.Tr "settings.cancel"}}</button>
</footer>
</article>
</dialog>