-
+
{{svg "octicon-globe" 14}} {{ctx.Locale.LangName}}
-
-
-
-
-
-
{{$createdStr:= DateUtils.TimeSince .Issue.CreatedUnix}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 30475331544cf..477b6b33c6a5c 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -55,7 +55,7 @@
{{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
{{end}}
- {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
+ {{template "repo/issue/view_content/context_menu" dict "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
@@ -430,7 +430,7 @@
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
{{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
- {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
+ {{template "repo/issue/view_content/context_menu" dict "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
{{end}}
diff --git a/templates/repo/issue/view_content/context_menu.tmpl b/templates/repo/issue/view_content/context_menu.tmpl
index 25c8a8845a855..157322c636fb8 100644
--- a/templates/repo/issue/view_content/context_menu.tmpl
+++ b/templates/repo/issue/view_content/context_menu.tmpl
@@ -5,30 +5,32 @@
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index 9c1acae0cfb0e..0fae1e9e1c1a5 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -1,682 +1,23 @@
- {{template "repo/issue/branch_selector_field" .}}
- {{if .Issue.IsPull}}
-
-
-
-
-
{{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}}
-
- {{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 .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}}
+ {{template "repo/issue/branch_selector_field" $}}
-
-
{{ctx.Locale.Tr "repo.issues.due_date"}}
-
-
- {{if .Repository.IsDependenciesEnabled ctx}}
+ {{if .Issue.IsPull}}
+ {{template "repo/issue/sidebar/reviewer_list" $.IssueSidebarReviewersData}}
+ {{template "repo/issue/sidebar/wip_switch" $}}
-
-
- {{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" $}}
diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl
index 0f796ce9bf754..26b36d6ffcf81 100644
--- a/templates/repo/issue/view_title.tmpl
+++ b/templates/repo/issue/view_title.tmpl
@@ -3,6 +3,12 @@
{{template "base/alert" .}}
{{end}}
+