{{template "repo/issue/navbar" .}}
{{template "repo/issue/search" .}}
{{if not .Repository.IsArchived}}
{{if .PageIsIssueList}}
{{.locale.Tr "repo.issues.new"}}
{{else}}
{{.locale.Tr "repo.pulls.new"}}
{{end}}
{{else}}
{{if not .PageIsIssueList}}
{{end}}
{{end}}
{{if $.CanWriteIssuesOrPulls}}
{{end}}
{{template "repo/issue/openclose" .}}
{{.locale.Tr "repo.issues.filter_label"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{svg "octicon-search" 16}}
{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}
{{.locale.Tr "repo.issues.filter_label_no_select"}}
{{$previousExclusiveScope := "_no_scope"}}
{{range .Labels}}
{{$exclusiveScope := .ExclusiveScope}}
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
{{end}}
{{$previousExclusiveScope = $exclusiveScope}}
{{if .IsExcluded}}{{svg "octicon-circle-slash"}}{{else if .IsSelected}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context .}}
{{end}}
{{.locale.Tr "repo.issues.filter_milestone"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{svg "octicon-search" 16}}
{{.locale.Tr "repo.issues.filter_milestone_all"}}
{{.locale.Tr "repo.issues.filter_milestone_none"}}
{{if .OpenMilestones}}
{{.locale.Tr "repo.issues.filter_milestone_open"}}
{{range .OpenMilestones}}
{{svg "octicon-milestone" 16 "mr-2"}}
{{.Name}}
{{end}}
{{end}}
{{if .ClosedMilestones}}
{{.locale.Tr "repo.issues.filter_milestone_closed"}}
{{range .ClosedMilestones}}
{{svg "octicon-milestone" 16 "mr-2"}}
{{.Name}}
{{end}}
{{end}}
{{.locale.Tr "repo.issues.filter_project"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{svg "octicon-search" 16}}
{{.locale.Tr "repo.issues.filter_project_all"}}
{{.locale.Tr "repo.issues.filter_project_none"}}
{{if .OpenProjects}}
{{.locale.Tr "repo.issues.new.open_projects"}}
{{range .OpenProjects}}
{{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
{{.Title}}
{{end}}
{{end}}
{{if .ClosedProjects}}
{{.locale.Tr "repo.issues.new.closed_projects"}}
{{range .ClosedProjects}}
{{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
{{.Title}}
{{end}}
{{end}}
{{.locale.Tr "repo.issues.filter_poster"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{svg "octicon-search" 16}}
{{.locale.Tr "repo.issues.filter_poster_no_select"}}
{{range .Posters}}
{{avatar $.Context .}} {{.GetDisplayName}}
{{end}}
{{.locale.Tr "repo.issues.filter_assignee"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{if .IsSigned}}
{{svg "octicon-search" 16}}
{{.locale.Tr "repo.issues.filter_assginee_no_select"}}
{{range .Assignees}}
{{avatar $.Context .}} {{.GetDisplayName}}
{{end}}
{{.locale.Tr "repo.issues.filter_type"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{end}}
{{.locale.Tr "repo.issues.filter_type.all_issues"}}
{{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}
{{.locale.Tr "repo.issues.filter_type.created_by_you"}}
{{.locale.Tr "repo.issues.filter_type.mentioning_you"}}
{{if .PageIsPullList}}
{{.locale.Tr "repo.issues.filter_type.review_requested"}}
{{end}}
{{.locale.Tr "repo.issues.filter_sort"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{.locale.Tr "repo.issues.filter_sort.latest"}}
{{.locale.Tr "repo.issues.filter_sort.oldest"}}
{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}
{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}
{{.locale.Tr "repo.issues.filter_sort.mostcomment"}}
{{.locale.Tr "repo.issues.filter_sort.leastcomment"}}
{{.locale.Tr "repo.issues.filter_sort.nearduedate"}}
{{.locale.Tr "repo.issues.filter_sort.farduedate"}}
{{template "repo/issue/openclose" .}}
{{/* Ten wide does not cope well and makes the columns stack.
This seems to be related to jQuery's hide/show: in fact, switching
issue-actions and issue-filters and having this ten wide will show
this one correctly, but not the other one. */}}
{{if not .Repository.IsArchived}}
{{if .IsShowClosed}}
{{.locale.Tr "repo.issues.action_open"}}
{{else}}
{{.locale.Tr "repo.issues.action_close"}}
{{end}}
{{.locale.Tr "repo.issues.action_label"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{$previousExclusiveScope := "_no_scope"}}
{{range .Labels}}
{{$exclusiveScope := .ExclusiveScope}}
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
{{end}}
{{$previousExclusiveScope = $exclusiveScope}}
{{if contain $.SelLabelIDs .ID}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context .}}
{{end}}
{{.locale.Tr "repo.issues.action_milestone"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{.locale.Tr "repo.issues.action_milestone_no_select"}}
{{if .OpenMilestones}}
{{.locale.Tr "repo.issues.filter_milestone_open"}}
{{range .OpenMilestones}}
{{.Name}}
{{end}}
{{end}}
{{if .ClosedMilestones}}
{{.locale.Tr "repo.issues.filter_milestone_open"}}
{{range .ClosedMilestones}}
{{.Name}}
{{end}}
{{end}}
{{.locale.Tr "repo.project_board"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{.locale.Tr "repo.issues.new.clear_projects"}}
{{if .OpenProjects}}
{{.locale.Tr "repo.issues.new.open_projects"}}
{{range .OpenProjects}}
{{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
{{.Title}}
{{end}}
{{end}}
{{if .ClosedProjects}}
{{.locale.Tr "repo.issues.new.closed_projects"}}
{{range .ClosedProjects}}
{{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
{{.Title}}
{{end}}
{{end}}
{{.locale.Tr "repo.issues.action_assignee"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{end}}
{{.locale.Tr "repo.issues.action_assignee_no_select"}}
{{range .Assignees}}
{{avatar $.Context .}} {{.GetDisplayName}}
{{end}}