{{template "repo/issue/branch_selector_field" .}} {{if .Issue.IsPull}}
{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}
{{range .PullReviewers}}
{{if .User}} {{ctx.AvatarUtils.Avatar .User 20 "gt-mr-3"}}{{.User.GetDisplayName}} {{else if .Team}} {{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} {{end}}
{{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} {{svg "octicon-x" 20}} {{end}} {{if .Review.Stale}} {{svg "octicon-hourglass" 16}} {{end}} {{if .CanChange}} {{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}} {{end}} {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}}
{{end}} {{range .OriginalReviews}}
{{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}}
{{end}}
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed)}}
{{if .IsPullWorkInProgress}} {{ctx.Locale.Tr "repo.pulls.ready_for_review"}} {{ctx.Locale.Tr "repo.pulls.remove_prefix" (index .PullRequestWorkInProgressPrefixes 0)}} {{else}} {{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}} {{end}}
{{end}}
{{end}} {{template "repo/issue/labels/labels_selector_field" .}} {{template "repo/issue/labels/labels_sidebar" dict "root" $}}
{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}
{{if .IsProjectsEnabled}}
{{ctx.Locale.Tr "repo.issues.new.no_projects"}}
{{end}}
{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}
{{if .Participants}} {{ctx.Locale.Tr "repo.issues.num_participants" .NumParticipants}}
{{range .Participants}} {{ctx.AvatarUtils.Avatar . 28 "gt-my-1 gt-mr-2"}} {{end}}
{{end}} {{if and $.IssueWatch (not .Repository.IsArchived)}}
{{ctx.Locale.Tr "notification.notifications"}}
{{template "repo/issue/view_content/watching" .}}
{{end}} {{if .Repository.IsTimetrackerEnabled $.Context}} {{if and .CanUseTimetracker (not .Repository.IsArchived)}}
{{ctx.Locale.Tr "repo.issues.tracker"}}
{{$.CsrfTokenHtml}}
{{$.CsrfTokenHtml}}
{{if $.IsStopwatchRunning}} {{else}} {{if .HasUserStopwatch}}
{{ctx.Locale.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL}}
{{end}} {{end}}
{{end}} {{if .WorkingUsers}}
{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}}
{{range $user, $trackedtime := .WorkingUsers}}
{{ctx.AvatarUtils.Avatar $user}}
{{template "shared/user/authorlink" $user}}
{{$trackedtime|Sec2Time}}
{{end}}
{{end}} {{end}}
{{ctx.Locale.Tr "repo.issues.due_date"}}
{{svg "octicon-x" 16 "close icon"}} {{ctx.Locale.Tr "repo.issues.due_date_invalid"}}
{{if ne .Issue.DeadlineUnix 0}}

{{svg "octicon-calendar" 16 "gt-mr-3"}} {{DateTime "long" .Issue.DeadlineUnix.FormatDate}}
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} {{svg "octicon-pencil" 16 "gt-mr-2"}} {{svg "octicon-trash"}} {{end}}

{{else}}

{{ctx.Locale.Tr "repo.issues.due_date_not_set"}}

{{end}} {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
{{$.CsrfTokenHtml}}
{{end}}
{{if .Repository.IsDependenciesEnabled $.Context}}
{{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}} {{ctx.Locale.Tr "repo.issues.dependency.title"}}

{{if .Issue.IsPull}} {{ctx.Locale.Tr "repo.issues.dependency.pr_no_dependencies"}} {{else}} {{ctx.Locale.Tr "repo.issues.dependency.issue_no_dependencies"}} {{end}}

{{end}} {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}} {{ctx.Locale.Tr "repo.issues.dependency.blocks_short"}}
{{range .BlockingDependencies}}
#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
{{.Repository.OwnerName}}/{{.Repository.Name}}
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} {{svg "octicon-trash" 16}} {{end}}
{{end}} {{if .BlockingDependenciesNotPermitted}}
{{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}
{{end}}
{{end}} {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}} {{ctx.Locale.Tr "repo.issues.dependency.blocked_by_short"}}
{{range .BlockedByDependencies}}
#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
{{.Repository.OwnerName}}/{{.Repository.Name}}
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} {{svg "octicon-trash" 16}} {{end}}
{{end}} {{if $.CanCreateIssueDependencies}} {{range .BlockedByDependenciesNotPermitted}}
{{svg "octicon-lock" 16}} #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
{{.Repository.OwnerName}}/{{.Repository.Name}}
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} {{svg "octicon-trash" 16}} {{end}}
{{end}} {{else if .BlockedByDependenciesNotPermitted}}
{{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}
{{end}}
{{end}} {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
{{$.CsrfTokenHtml}}
{{end}}
{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} {{end}} {{end}}
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}
{{if and .IsRepoAdmin (not .Repository.IsArchived)}}
{{if or .PinEnabled .Issue.IsPinned}}
{{$.CsrfTokenHtml}}
{{end}} {{end}} {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}} {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
{{end}} {{end}}