summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content/sidebar/pull_reviewers.tmpl
blob: 102508fdaf86ff98d198bcdb468a553e6d9dbf2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<div class="ui assignees list">
			<span class="no-select item {{if or .OriginalReviews .PullReviewers}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span>
			<div class="selected">
				{{range .PullReviewers}}
					<div class="item tw-flex tw-items-center tw-py-2">
						<div class="tw-flex tw-items-center tw-flex-1">
							{{if .User}}
								<a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20 "tw-mr-2"}}{{.User.GetDisplayName}}</a>
							{{else if .Team}}
								<span class="text">{{svg "octicon-people" 20 "tw-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
							{{end}}
						</div>
						<div class="tw-flex tw-items-center tw-gap-2">
							{{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged))}}
								<a href="#" class="ui muted icon tw-flex tw-items-center show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}" data-modal="#dismiss-review-modal-{{.Review.ID}}">
									{{svg "octicon-x" 20}}
								</a>
								<div class="ui small modal" id="dismiss-review-modal-{{.Review.ID}}">
									<div class="header">
										{{ctx.Locale.Tr "repo.issues.dismiss_review"}}
									</div>
									<div class="content">
										<div class="ui warning message">
											{{ctx.Locale.Tr "repo.issues.dismiss_review_warning"}}
										</div>
										<form class="ui form dismiss-review-form" id="dismiss-review-{{.Review.ID}}" action="{{$.RepoLink}}/issues/dismiss_review" method="post">
											{{$.CsrfTokenHtml}}
											<input type="hidden" name="review_id" value="{{.Review.ID}}">
											<div class="field">
												<label for="message">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</label>
												<input id="message" name="message">
											</div>
											<div class="text right actions">
												<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
												<button class="ui red button" type="submit">{{ctx.Locale.Tr "ok"}}</button>
											</div>
										</form>
									</div>
								</div>
							{{end}}
							{{if .Review.Stale}}
								<span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.is_stale"}}">
									{{svg "octicon-hourglass" 16}}
								</span>
							{{end}}
							{{if and .CanChange (or .Checked (and (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged)))}}
								<a href="#" class="ui muted icon re-request-review{{if .Checked}} checked{{end}}" data-tooltip-content="{{if .Checked}}{{ctx.Locale.Tr "repo.issues.remove_request_review"}}{{else}}{{ctx.Locale.Tr "repo.issues.re_request_review"}}{{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a>
							{{end}}
							{{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}}
						</div>
					</div>
				{{end}}
				{{range .OriginalReviews}}
					<div class="item tw-flex tw-items-center tw-py-2">
						<div class="tw-flex tw-items-center tw-flex-1">
							<a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname}}">
								{{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "tw-mr-2"}}
								{{.OriginalAuthor}}
							</a>
						</div>
						<div class="tw-flex tw-items-center tw-gap-2">
							{{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}}
						</div>
					</div>
				{{end}}
			</div>
		</div>