aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDenys Konovalov <kontakt@denyskon.de>2023-07-13 22:00:38 +0200
committerGitHub <noreply@github.com>2023-07-13 20:00:38 +0000
commiteec45b43db3b30c1d197e0d3cd03de00fd84e744 (patch)
treef48ec797aef4bdc887ea6dbcadf60044614e1d85 /templates
parentef90fdbd1d7e1f62ed5bf18757e00e97817eb602 (diff)
downloadgitea-eec45b43db3b30c1d197e0d3cd03de00fd84e744.tar.gz
gitea-eec45b43db3b30c1d197e0d3cd03de00fd84e744.zip
move issue filters to shared template (#25729)
Issue filters are being used on repo list page and on milestone issues page, and the code is mostly duplicated. This PR does the following changes: - move issue filters into a shared template - allow filtering milestone issues by project, so no need to hide this filter on milestone issues page - remove some dead code (e. g. issue actions in milestone issues template) - fix label filter dropdown width --------- Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/filters.tmpl194
-rw-r--r--templates/repo/issue/list.tmpl197
-rw-r--r--templates/repo/issue/milestone_issues.tmpl149
3 files changed, 199 insertions, 341 deletions
diff --git a/templates/repo/issue/filters.tmpl b/templates/repo/issue/filters.tmpl
new file mode 100644
index 0000000000..edc483d752
--- /dev/null
+++ b/templates/repo/issue/filters.tmpl
@@ -0,0 +1,194 @@
+<div id="issue-filters" class="issue-list-toolbar">
+ <div class="issue-list-toolbar-left">
+ {{if and ($.CanWriteIssuesOrPulls) (gt (len .Issues) 0)}}
+ <input type="checkbox" autocomplete="off" class="issue-checkbox-all gt-mr-4" title="{{.locale.Tr "repo.issues.action_check_all"}}">
+ {{end}}
+ {{template "repo/issue/openclose" .}}
+ </div>
+ <div class="issue-list-toolbar-right">
+ <div class="ui secondary filter menu labels">
+ <!-- Label -->
+ <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter">
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_label"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
+ <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_label"}}">
+ </div>
+ <span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
+ <div class="divider"></div>
+ <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=0&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
+ <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
+ {{$previousExclusiveScope := "_no_scope"}}
+ {{range .Labels}}
+ {{$exclusiveScope := .ExclusiveScope}}
+ {{if and (ne $previousExclusiveScope $exclusiveScope)}}
+ <div class="divider"></div>
+ {{end}}
+ {{$previousExclusiveScope = $exclusiveScope}}
+ <a class="item label-filter-item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}" data-label-id="{{.ID}}">{{if .IsExcluded}}{{svg "octicon-circle-slash"}}{{else if .IsSelected}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context .}}</a>
+ {{end}}
+ </div>
+ </div>
+
+ {{if not .Milestone}}
+ <!-- Milestone -->
+ <div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_milestone"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
+ <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestone"}}">
+ </div>
+ <div class="divider"></div>
+ <a class="{{if not $.MilestoneID}}active selected {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone=0&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_all"}}</a>
+ <a class="{{if $.MilestoneID}}{{if eq $.MilestoneID -1}}active selected {{end}}{{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone=-1&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_none"}}</a>
+ {{if .OpenMilestones}}
+ <div class="divider"></div>
+ <div class="header">{{.locale.Tr "repo.issues.filter_milestone_open"}}</div>
+ {{range .OpenMilestones}}
+ <a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
+ {{svg "octicon-milestone" 16 "mr-2"}}
+ {{.Name}}
+ </a>
+ {{end}}
+ {{end}}
+ {{if .ClosedMilestones}}
+ <div class="divider"></div>
+ <div class="header">{{.locale.Tr "repo.issues.filter_milestone_closed"}}</div>
+ {{range .ClosedMilestones}}
+ <a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
+ {{svg "octicon-milestone" 16 "mr-2"}}
+ {{.Name}}
+ </a>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+
+ <!-- Project -->
+ <div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item">
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_project"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
+ <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_project"}}">
+ </div>
+ <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_project_all"}}</a>
+ <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&project=-1&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_project_none"}}</a>
+ {{if .OpenProjects}}
+ <div class="divider"></div>
+ <div class="header">
+ {{.locale.Tr "repo.issues.new.open_projects"}}
+ </div>
+ {{range .OpenProjects}}
+ <a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
+ {{svg .IconName 18 "gt-mr-3 gt-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span>
+ </a>
+ {{end}}
+ {{end}}
+ {{if .ClosedProjects}}
+ <div class="divider"></div>
+ <div class="header">
+ {{.locale.Tr "repo.issues.new.closed_projects"}}
+ </div>
+ {{range .ClosedProjects}}
+ <a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
+ {{svg .IconName 18 "gt-mr-3"}}{{.Title}}
+ </a>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+
+ <!-- Author -->
+ <div class="ui dropdown jump item user-remote-search" data-tooltip-content="{{.locale.Tr "repo.author_search_tooltip"}}"
+ data-search-url="{{if .Milestone}}{{$.RepoLink}}/issues/posters{{else}}{{$.Link}}/posters{{end}}"
+ data-selected-user-id="{{$.PosterID}}"
+ data-action-jump-url="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={user_id}"
+ >
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_poster"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
+ <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_poster"}}">
+ </div>
+ <a class="item" data-value="0">{{.locale.Tr "repo.issues.filter_poster_no_select"}}</a>
+ </div>
+ </div>
+
+ <!-- Assignee -->
+ <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_assignee"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <div class="ui icon search input">
+ <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
+ <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignee"}}">
+ </div>
+ <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee=-1&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_assignee"}}</a>
+ <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
+ <div class="divider"></div>
+ {{range .Assignees}}
+ <a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{.ID}}&poster={{$.PosterID}}">
+ {{avatar $.Context . 20}}{{template "repo/search_name" .}}
+ </a>
+ {{end}}
+ </div>
+ </div>
+
+ {{if .IsSigned}}
+ <!-- Type -->
+ <div class="ui dropdown type jump item">
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_type"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.all_issues"}}</a>
+ <a class="{{if eq .ViewType "assigned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
+ <a class="{{if eq .ViewType "created_by"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.created_by_you"}}</a>
+ {{if .PageIsPullList}}
+ <a class="{{if eq .ViewType "review_requested"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=review_requested&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.review_requested"}}</a>
+ <a class="{{if eq .ViewType "reviewed_by"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=reviewed_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.reviewed_by_you"}}</a>
+ {{end}}
+ <a class="{{if eq .ViewType "mentioned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.mentioning_you"}}</a>
+ </div>
+ </div>
+ {{end}}
+
+ <!-- Sort -->
+ <div class="list-header-sort ui small dropdown downward type jump item">
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_sort"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
+ <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+ <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+ <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+ <a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
+ <a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
+ <a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=nearduedate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
+ <a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=farduedate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index c7d73c6667..8eb85a3298 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -81,197 +81,8 @@
{{end}}
{{end}}
</div>
- <div id="issue-filters" class="issue-list-toolbar">
- <div class="issue-list-toolbar-left">
- {{if and ($.CanWriteIssuesOrPulls) (gt (len .Issues) 0)}}
- <input type="checkbox" autocomplete="off" class="issue-checkbox-all gt-mr-4" title="{{.locale.Tr "repo.issues.action_check_all"}}">
- {{end}}
- {{template "repo/issue/openclose" .}}
- </div>
- <div class="issue-list-toolbar-right">
- <div class="ui secondary filter menu labels">
- <!-- Label -->
- <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_label"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_label"}}">
- </div>
- <span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
- <div class="divider"></div>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=0&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
- {{$previousExclusiveScope := "_no_scope"}}
- {{range .Labels}}
- {{$exclusiveScope := .ExclusiveScope}}
- {{if and (ne $previousExclusiveScope $exclusiveScope)}}
- <div class="divider"></div>
- {{end}}
- {{$previousExclusiveScope = $exclusiveScope}}
- <a class="item label-filter-item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}" data-label-id="{{.ID}}">{{if .IsExcluded}}{{svg "octicon-circle-slash"}}{{else if .IsSelected}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context .}}</a>
- {{end}}
- </div>
- </div>
-
- <!-- Milestone -->
- <div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_milestone"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestone"}}">
- </div>
- <div class="divider"></div>
- <a class="{{if not $.MilestoneID}}active selected {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone=0&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_all"}}</a>
- <a class="{{if $.MilestoneID}}{{if eq $.MilestoneID -1}}active selected {{end}}{{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone=-1&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_none"}}</a>
- {{if .OpenMilestones}}
- <div class="divider"></div>
- <div class="header">{{.locale.Tr "repo.issues.filter_milestone_open"}}</div>
- {{range .OpenMilestones}}
- <a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
- {{svg "octicon-milestone" 16 "mr-2"}}
- {{.Name}}
- </a>
- {{end}}
- {{end}}
- {{if .ClosedMilestones}}
- <div class="divider"></div>
- <div class="header">{{.locale.Tr "repo.issues.filter_milestone_closed"}}</div>
- {{range .ClosedMilestones}}
- <a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
- {{svg "octicon-milestone" 16 "mr-2"}}
- {{.Name}}
- </a>
- {{end}}
- {{end}}
- </div>
- </div>
- <!-- Project -->
- <div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_project"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_project"}}">
- </div>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_project_all"}}</a>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&project=-1&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_project_none"}}</a>
- {{if .OpenProjects}}
- <div class="divider"></div>
- <div class="header">
- {{.locale.Tr "repo.issues.new.open_projects"}}
- </div>
- {{range .OpenProjects}}
- <a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
- {{svg .IconName 18 "gt-mr-3 gt-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span>
- </a>
- {{end}}
- {{end}}
- {{if .ClosedProjects}}
- <div class="divider"></div>
- <div class="header">
- {{.locale.Tr "repo.issues.new.closed_projects"}}
- </div>
- {{range .ClosedProjects}}
- <a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
- {{svg .IconName 18 "gt-mr-3"}}{{.Title}}
- </a>
- {{end}}
- {{end}}
- </div>
- </div>
-
- <!-- Author -->
- <div class="ui dropdown jump item user-remote-search" data-tooltip-content="{{.locale.Tr "repo.author_search_tooltip"}}"
- data-search-url="{{$.Link}}/posters"
- data-selected-user-id="{{$.PosterID}}"
- data-action-jump-url="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={user_id}"
- >
- <span class="text">
- {{.locale.Tr "repo.issues.filter_poster"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_poster"}}">
- </div>
- <a class="item" data-value="0">{{.locale.Tr "repo.issues.filter_poster_no_select"}}</a>
- </div>
- </div>
-
- <!-- Assignee -->
- <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_assignee"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignee"}}">
- </div>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee=-1&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_assignee"}}</a>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
- {{range .Assignees}}
- <a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{.ID}}&poster={{$.PosterID}}">
- {{avatar $.Context . 20}}{{template "repo/search_name" .}}
- </a>
- {{end}}
- </div>
- </div>
-
- {{if .IsSigned}}
- <!-- Type -->
- <div class="ui dropdown type jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_type"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.all_issues"}}</a>
- <a class="{{if eq .ViewType "assigned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
- <a class="{{if eq .ViewType "created_by"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.created_by_you"}}</a>
- {{if .PageIsPullList}}
- <a class="{{if eq .ViewType "review_requested"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=review_requested&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.review_requested"}}</a>
- <a class="{{if eq .ViewType "reviewed_by"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=reviewed_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.reviewed_by_you"}}</a>
- {{end}}
- <a class="{{if eq .ViewType "mentioned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.mentioning_you"}}</a>
- </div>
- </div>
- {{end}}
-
- <!-- Sort -->
- <div class="list-header-sort ui small dropdown downward type jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_sort"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
- <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
- <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
- <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
- <a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
- <a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
- <a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=nearduedate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
- <a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=farduedate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
- </div>
- </div>
- </div>
- </div>
- </div>
+ {{template "repo/issue/filters" .}}
<div id="issue-actions" class="issue-list-toolbar gt-hidden">
<div class="issue-list-toolbar-left">
@@ -282,12 +93,12 @@
{{if not .Repository.IsArchived}}
<!-- Action Button -->
{{if .IsShowClosed}}
- <button class="ui green basic button issue-action gt-ml-auto" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_open"}}</button>
+ <button class="ui green basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_open"}}</button>
{{else}}
- <button class="ui red basic button issue-action gt-ml-auto" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_close"}}</button>
+ <button class="ui red basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_close"}}</button>
{{end}}
{{if $.IsRepoAdmin}}
- <button class="ui red button issue-action gt-ml-auto"
+ <button class="ui red button issue-action"
data-action="delete" data-url="{{$.RepoLink}}/issues/delete"
data-action-delete-confirm="{{.locale.Tr "confirm_delete_selected"}}"
>{{.locale.Tr "repo.issues.delete"}}</button>
diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl
index 5913f59fe8..dab6ef3de6 100644
--- a/templates/repo/issue/milestone_issues.tmpl
+++ b/templates/repo/issue/milestone_issues.tmpl
@@ -50,155 +50,8 @@
</div>
<div class="divider"></div>
- <div id="issue-filters" class="issue-list-toolbar">
- <div class="issue-list-toolbar-left">
- {{template "repo/issue/openclose" .}}
- </div>
- <div class="issue-list-toolbar-right">
- <div class="ui secondary filter stackable menu labels">
- <!-- Label -->
- <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter gt-ml-auto">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_label"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_label"}}">
- </div>
- <span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
- {{range .Labels}}
- <a class="item label-filter-item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}" data-label-id="{{.ID}}">{{if .IsExcluded}}{{svg "octicon-circle-slash"}}{{else if SliceUtils.Contains $.SelLabelIDs .ID}}{{svg "octicon-check"}}{{end}} {{RenderLabel $.Context .}}</a>
- {{end}}
- </div>
- </div>
-
- <!-- Author -->
- <div class="ui dropdown jump item user-remote-search" data-tooltip-content="{{.locale.Tr "repo.author_search_tooltip"}}"
- data-search-url="{{$.RepoLink}}/issues/posters"
- data-selected-user-id="{{$.PosterID}}"
- data-action-jump-url="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&assignee={{$.AssigneeID}}&poster={user_id}"
- >
- <span class="text">
- {{.locale.Tr "repo.issues.filter_poster"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_poster"}}">
- </div>
- <a class="item" data-value="0">{{.locale.Tr "repo.issues.filter_poster_no_select"}}</a>
- </div>
- </div>
-
- <!-- Assignee -->
- <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_assignee"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="ui icon search input">
- <i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
- <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignee"}}">
- </div>
- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
- {{range .Assignees}}
- <a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&assignee={{.ID}}&poster={{$.PosterID}}">
- {{avatar $.Context . 20}}{{template "repo/search_name" .}}
- </a>
- {{end}}
- </div>
- </div>
+ {{template "repo/issue/filters" .}}
- {{if .IsSigned}}
- <!-- Type -->
- <div class="ui dropdown type jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_type"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.all_issues"}}</a>
- <a class="{{if eq .ViewType "assigned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
- <a class="{{if eq .ViewType "created_by"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.created_by_you"}}</a>
- <a class="{{if eq .ViewType "review_requested"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=review_requested&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.review_requested"}}</a>
- <a class="{{if eq .ViewType "reviewed_by"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=reviewed_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.reviewed_by_you"}}</a>
- <a class="{{if eq .ViewType "mentioned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.mentioning_you"}}</a>
- </div>
- </div>
- {{end}}
-
- <!-- Sort -->
- <div class="ui dropdown type jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.filter_sort"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
- <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
- <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
- <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
- <a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
- <a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div id="issue-actions" class="issue-list-toolbar gt-hidden">
- <div class="issue-list-toolbar-left">
- {{template "repo/issue/openclose" .}}
- </div>
- <div class="issue-list-toolbar-right">
- <div class="ui secondary filter stackable menu">
- <!-- Action Button -->
- {{if .IsShowClosed}}
- <button class="ui green active basic button issue-action gt-ml-auto" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_open"}}</button>
- {{else}}
- <button class="ui red active basic button issue-action gt-ml-auto" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.locale.Tr "repo.issues.action_close"}}</button>
- {{end}}
- <!-- Labels -->
- <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.action_label"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- {{range .Labels}}
- <div class="item issue-action" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels">
- {{if SliceUtils.Contains $.SelLabelIDs .ID}}{{svg "octicon-check"}}{{end}} {{RenderLabel $.Context .}}
- </div>
- {{end}}
- </div>
- </div>
-
- <!-- Assignees -->
- <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
- <span class="text">
- {{.locale.Tr "repo.issues.action_assignee"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/assignee">
- {{.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">
- {{avatar $.Context . 20}}
- {{.GetDisplayName}}
- </div>
- {{end}}
- </div>
- </div>
- </div>
- </div>
- </div>
{{template "shared/issuelist" dict "." . "listType" "milestone"}}
</div>
</div>