diff --git a/templates/repo/issue/branch_selector_field.tmpl b/templates/repo/issue/branch_selector_field.tmpl
index 5793a8bfda8..643222ca72c 100644
--- a/templates/repo/issue/branch_selector_field.tmpl
+++ b/templates/repo/issue/branch_selector_field.tmpl
@@ -44,6 +44,4 @@
-
-
+ {{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}}
+
+ {{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}}
+
+ {{end}}
+ {{if $.CanCreateIssueDependencies}}
+ {{range .BlockedByDependenciesNotPermitted}}
+
+
+
+ {{svg "octicon-lock" 16}}
+
+ #{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
+
+
+
+ {{.Repository.OwnerName}}/{{.Repository.Name}}
+
+
+
+
+ {{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)}}
+
+ {{end}}
+
+
+ {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
+
- {{template "repo/issue/branch_selector_field" .}}
- {{if .Issue.IsPull}}
-
-
+ {{template "repo/issue/branch_selector_field" $}}
-
-
{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}
-
- {{range .PullReviewers}}
-
-
- {{if .User}}
-
- {{else if .Team}}
- {{svg "octicon-people" 20 "tw-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}
- {{end}}
-
-
- {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged))}}
-
- {{svg "octicon-x" 20}}
-
-
-
-
-
- {{ctx.Locale.Tr "repo.issues.dismiss_review_warning"}}
-
-
-
-
- {{end}}
- {{if .Review.Stale}}
-
- {{svg "octicon-hourglass" 16}}
-
- {{end}}
- {{if and .CanChange (or .Checked (and (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged)))}}
-
{{svg (Iif .Checked "octicon-trash" "octicon-sync")}}
- {{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) (not .IsPullWorkInProgress)}}
-
- {{end}}
+ {{if .Issue.IsPull}}
+ {{template "repo/issue/sidebar/reviewer_list" $}}
+ {{template "repo/issue/sidebar/wip_switch" $}}
{{end}}
- {{template "repo/issue/labels/labels_selector_field" .}}
+ {{template "repo/issue/labels/labels_selector_field" $}}
{{template "repo/issue/labels/labels_sidebar" dict "root" $}}
-
-
-
-
-
{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}
-
- {{if .Issue.Milestone}}
-
- {{end}}
-
-
-
- {{if .IsProjectsEnabled}}
-
-
-
-
-
{{ctx.Locale.Tr "repo.issues.new.no_projects"}}
-
- {{if .Issue.Project}}
-
- {{end}}
-
-
- {{end}}
-
-
-
-
-
-
-
{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}
-
- {{range .Issue.Assignees}}
-
-
-
- {{end}}
-
-
-
-
-
- {{if .Participants}}
-
{{ctx.Locale.Tr "repo.issues.num_participants" .NumParticipants}}
-
- {{end}}
-
- {{if and $.IssueWatch (not .Repository.IsArchived)}}
-
-
-
-
{{ctx.Locale.Tr "notification.notifications"}}
-
- {{template "repo/issue/view_content/watching" .}}
-
-
- {{end}}
- {{if .Repository.IsTimetrackerEnabled ctx}}
- {{if and .CanUseTimetracker (not .Repository.IsArchived)}}
-
-
-
{{ctx.Locale.Tr "repo.issues.tracker"}}
-
-
-
- {{if $.IsStopwatchRunning}}
-
-
- {{else}}
- {{if .HasUserStopwatch}}
-
- {{ctx.Locale.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL}}
-
- {{end}}
-
-
-
-
-
-
-
-
-
-
-
-
- {{end}}
-
-
- {{end}}
- {{if .WorkingUsers}}
-
-
- {{end}}
- {{end}}
-
-
-
{{ctx.Locale.Tr "repo.issues.due_date"}}
-
-
- {{if .Repository.IsDependenciesEnabled ctx}}
-
-
-
- {{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}}
-
- {{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}}
-
- {{end}}
- {{if $.CanCreateIssueDependencies}}
- {{range .BlockedByDependenciesNotPermitted}}
-
-
-
- {{svg "octicon-lock" 16}}
-
- #{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
-
-
-
- {{.Repository.OwnerName}}/{{.Repository.Name}}
-
-
-
-
- {{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)}}
-
- {{end}}
-
-
- {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
-
-
-
-
-
-
-
{{if .Issue.IsPull}}
- {{ctx.Locale.Tr "repo.issues.dependency.pr_remove_text"}}
- {{else}}
- {{ctx.Locale.Tr "repo.issues.dependency.issue_remove_text"}}
- {{end}}
-
- {{$ModalButtonCancelText := ctx.Locale.Tr "repo.issues.dependency.cancel"}}
- {{$ModalButtonOkText := ctx.Locale.Tr "repo.issues.dependency.remove"}}
- {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}}
-
- {{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}}
-
- {{end}}
-
-
-
-
-
-
- {{if .Issue.IsLocked}}
- {{ctx.Locale.Tr "repo.issues.unlock.notice_1"}}
- {{ctx.Locale.Tr "repo.issues.unlock.notice_2"}}
- {{else}}
- {{ctx.Locale.Tr "repo.issues.lock.notice_1"}}
- {{ctx.Locale.Tr "repo.issues.lock.notice_2"}}
- {{ctx.Locale.Tr "repo.issues.lock.notice_3"}}
- {{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}}
+ {{template "repo/issue/sidebar/milestone_list" $}}
+ {{template "repo/issue/sidebar/project_list" $}}
+ {{template "repo/issue/sidebar/assignee_list" $}}
+ {{template "repo/issue/sidebar/participant_list" $}}
+ {{template "repo/issue/sidebar/watch_notification" $}}
+ {{template "repo/issue/sidebar/stopwatch_timetracker" $}}
+ {{template "repo/issue/sidebar/due_date" $}}
+ {{template "repo/issue/sidebar/issue_dependencies" $}}
+ {{template "repo/issue/sidebar/reference_link" $}}
+ {{template "repo/issue/sidebar/issue_management" $}}
+ {{template "repo/issue/sidebar/allow_maintainer_edit" $}}