-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide archived labels when filtering by labels on the issue list (#27115)
Followup #26820 ## Archived labels UI for issue filter and issue filter actions for issues/pull request pages. Changed: * Enhanced the Issue filter and Issue filter actions UI page to seamlessly incorporate a list of archived labels. * Pagination functionality is same as before. If archived label checkbox is checked then we are adding a query string`archived=true` in the url to save the state of page. * Issue filter actions menu is separated into different template. * Adding the archived flag in issue url labels. * Pull Request page is also work the same. Outsourced: * Defer the implementation of specialized handling for archived labels to upcoming pull requests. This step will be undertaken subsequent to the successful merge of this pull request. Screenshots ### Issue page <img width="1360" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/d7efb2ef-5b2b-449d-83f0-d430a32ec432"> ### Issue page with label filter on archived label checkbox when not checked --> No archived label is there in list <img width="1249" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/ceea68ef-91f2-4693-910f-2e25e236bfc9"> ### Issue page with label filter on archived label checkbox when checked --> Show archived label in the list. <img width="710" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/2414d26b-2079-4c3c-bd9e-f2f5411bcabf"> ### Issue page with label filter on issue action menu on archived label checkbox when checked --> Show archived label in the list. <img width="409" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/259cac87-3e21-4778-99a2-a6a0b8c81178"> ### Applied the archived=true in Issue labels when archived checkbox is checked. <img width="984" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/657ce3db-c0ae-402e-b12d-3b580d3c2ed0"> --- Part of #25237 --------- Signed-off-by: puni9869 <[email protected]> Co-authored-by: delvh <[email protected]> Co-authored-by: Giteabot <[email protected]>
- Loading branch information
1 parent
87aa552
commit 5007055
Showing
10 changed files
with
237 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<div class="ui secondary filter menu"> | ||
{{if not .Repository.IsArchived}} | ||
<!-- Action Button --> | ||
{{if .IsShowClosed}} | ||
<button class="ui primary basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{ctx.Locale.Tr "repo.issues.action_open"}}</button> | ||
{{else}} | ||
<button class="ui red basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{ctx.Locale.Tr "repo.issues.action_close"}}</button> | ||
{{end}} | ||
{{if $.IsRepoAdmin}} | ||
<button class="ui red button issue-action" | ||
data-action="delete" data-url="{{$.RepoLink}}/issues/delete" | ||
data-action-delete-confirm="{{ctx.Locale.Tr "confirm_delete_selected"}}" | ||
>{{ctx.Locale.Tr "repo.issues.delete"}}</button> | ||
{{end}} | ||
<!-- Labels --> | ||
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item"> | ||
<span class="text"> | ||
{{ctx.Locale.Tr "repo.issues.action_label"}} | ||
</span> | ||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} | ||
<div class="menu"> | ||
<div class="item issue-action" data-action="clear" data-url="{{$.RepoLink}}/issues/labels"> | ||
{{ctx.Locale.Tr "repo.issues.new.clear_labels"}} | ||
</div> | ||
{{$previousExclusiveScope := "_no_scope"}} | ||
{{range .Labels}} | ||
{{$exclusiveScope := .ExclusiveScope}} | ||
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}} | ||
<div class="divider"></div> | ||
{{end}} | ||
{{$previousExclusiveScope = $exclusiveScope}} | ||
<div class="item issue-action gt-df gt-items-start" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels"> | ||
{{if SliceUtils.Contains $.SelLabelIDs .ID}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context .}} | ||
{{if .IsArchived}} | ||
<i data-tooltip-content={{ctx.Locale.Tr "archived"}}>{{svg "octicon-info"}}</i> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
</div> | ||
</div> | ||
|
||
<!-- Milestone --> | ||
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item"> | ||
<span class="text"> | ||
{{ctx.Locale.Tr "repo.issues.action_milestone"}} | ||
</span> | ||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} | ||
<div class="menu"> | ||
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/milestone"> | ||
{{ctx.Locale.Tr "repo.issues.action_milestone_no_select"}} | ||
</div> | ||
{{if .OpenMilestones}} | ||
<div class="divider"></div> | ||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div> | ||
{{range .OpenMilestones}} | ||
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone"> | ||
{{.Name}} | ||
</div> | ||
{{end}} | ||
{{end}} | ||
{{if .ClosedMilestones}} | ||
<div class="divider"></div> | ||
<div class="header">{{ctx.Locale.Tr "repo.issues.filter_milestone_open"}}</div> | ||
{{range .ClosedMilestones}} | ||
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone"> | ||
{{.Name}} | ||
</div> | ||
{{end}} | ||
{{end}} | ||
</div> | ||
</div> | ||
|
||
<!-- Projects --> | ||
<div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item"> | ||
<span class="text"> | ||
{{ctx.Locale.Tr "repo.project_board"}} | ||
</span> | ||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} | ||
<div class="menu"> | ||
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/projects"> | ||
{{ctx.Locale.Tr "repo.issues.new.clear_projects"}} | ||
</div> | ||
{{if .OpenProjects}} | ||
<div class="divider"></div> | ||
<div class="header"> | ||
{{ctx.Locale.Tr "repo.issues.new.open_projects"}} | ||
</div> | ||
{{range .OpenProjects}} | ||
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/projects"> | ||
{{svg .IconName 18 "gt-mr-3"}}{{.Title}} | ||
</div> | ||
{{end}} | ||
{{end}} | ||
{{if .ClosedProjects}} | ||
<div class="divider"></div> | ||
<div class="header"> | ||
{{ctx.Locale.Tr "repo.issues.new.closed_projects"}} | ||
</div> | ||
{{range .ClosedProjects}} | ||
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/projects"> | ||
{{svg .IconName 18 "gt-mr-3"}}{{.Title}} | ||
</div> | ||
{{end}} | ||
{{end}} | ||
</div> | ||
</div> | ||
|
||
<!-- Assignees --> | ||
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item"> | ||
<span class="text"> | ||
{{ctx.Locale.Tr "repo.issues.action_assignee"}} | ||
</span> | ||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} | ||
<div class="menu"> | ||
<div class="item issue-action" data-action="clear" data-url="{{$.Link}}/assignee"> | ||
{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}} | ||
</div> | ||
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/assignee"> | ||
{{ctx.Locale.Tr "repo.issues.action_assignee_no_select"}} | ||
</div> | ||
{{range .Assignees}} | ||
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/assignee"> | ||
{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}} | ||
</div> | ||
{{end}} | ||
</div> | ||
</div> | ||
{{end}} | ||
</div> | ||
|
Oops, something went wrong.