1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +00:00

fix: graying out milestone item, when there's no milestone available in the repository

It only gray-out milestone when there's no opened & closed milestone, else it will be visible
lastly, it won't show 504 error as well, since it's grayed-out when there's no milestone available
This commit is contained in:
iamyaash 2025-06-25 21:49:15 +05:30
parent 2bca029f6f
commit c073d4f4f7
No known key found for this signature in database
GPG key ID: ECC8495C0CCB4A46

View file

@ -1,5 +1,5 @@
<div id="milestone-section" hx-swap="morph" hx-target="this" hx-indicator="this">
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived (and (not .OpenMilestones) (not .ClosedMilestones))}}disabled{{end}} floating jump select-milestone dropdown">
<a class="text muted flex-text-block">
<strong>{{ctx.Locale.Tr "repo.issues.new.milestone"}}</strong>
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}