forgejo/templates/repo/issue/milestone/selected.tmpl
iamyaash 4eac7adcc9 fix(ui): Make 'Clear milestone' work with HTMX (#8266)
Disable the 'clear milestone' button in the issue sidebar when no milestone is set and update this state after a milestone is set or cleared.

Fixes #7949

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8266
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: iamyaash <iamyaash@outlook.com>
Co-committed-by: iamyaash <iamyaash@outlook.com>
2025-08-11 20:10:10 +02:00

11 lines
474 B
Go HTML Template

<div hx-swap-oob="true" id="selected-milestone" class="ui select-milestone list">
<span class="no-select item {{if .Issue.Milestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
<div class="selected">
{{if .Issue.Milestone}}
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}">
{{svg "octicon-milestone" 18 "tw-mr-2"}}
{{.Issue.Milestone.Name}}
</a>
{{end}}
</div>
</div>