mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Consolidate the two review boxes into one (#24738)
View diff: https://github.com/go-gitea/gitea/pull/24738/files?diff=unified&w=1 Improve layout and functionality in review area: <img width="439" alt="Screenshot 2023-05-15 at 20 10 01" src="https://github.com/go-gitea/gitea/assets/115237/be10452b-5829-4927-8801-7b26a57b3dbd"> Remove the "Reviewers" timeline box that appears before the merge box. it's a duplicate of the top-right review area and all functionality of it has been moved to the other box: <img width="868" alt="Screenshot 2023-05-15 at 19 39 31" src="https://github.com/go-gitea/gitea/assets/115237/35489445-e54b-40d3-b3cf-38d029478f96"> Increase timeline item vertical padding from 12px to 16px: <img width="449" alt="Screenshot 2023-05-15 at 19 43 50" src="https://github.com/go-gitea/gitea/assets/115237/919c4f9d-a485-4f51-b08c-2c0fc714a413"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -1,100 +1,3 @@
|
||||
{{if or .PullReviewers .OriginalReviews}}
|
||||
<div class="comment box timeline-item gt-pt-3 gt-pb-0">
|
||||
<div class="content">
|
||||
<div class="ui segment">
|
||||
<h4>{{$.locale.Tr "repo.issues.review.reviewers"}}</h4>
|
||||
{{range .PullReviewers}}
|
||||
{{$createdStr:= TimeSinceUnix .Review.UpdatedUnix $.locale}}
|
||||
<div class="ui divider"></div>
|
||||
<div class="review-item">
|
||||
<div class="review-item-left">
|
||||
<span class="gt-mr-3 text {{.Review.HTMLTypeColorName}}">
|
||||
{{svg (printf "octicon-%s" .Review.Type.Icon)}}
|
||||
</span>
|
||||
{{if .User}}
|
||||
<a href="{{.User.HomeLink}}">
|
||||
{{avatar $.Context .User 20}}
|
||||
</a>
|
||||
{{end}}
|
||||
<span class="gt-ml-2">
|
||||
{{if .User}}
|
||||
<a href="{{.User.HomeLink}}">{{.User.GetDisplayName}}</a>
|
||||
{{else if .Team}}
|
||||
<span class="ui text">{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
|
||||
{{end}}
|
||||
{{if eq .Review.Type 1}}
|
||||
{{$.locale.Tr "repo.issues.review.approve" $createdStr | Safe}}
|
||||
{{else if eq .Review.Type 2}}
|
||||
{{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
|
||||
{{else if eq .Review.Type 3}}
|
||||
{{$.locale.Tr "repo.issues.review.reject" $createdStr | Safe}}
|
||||
{{else if eq .Review.Type 4}}
|
||||
{{$.locale.Tr "repo.issues.review.wait" $createdStr | Safe}}
|
||||
{{else}}
|
||||
{{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
|
||||
{{end}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="review-item-right">
|
||||
{{if .Review.Stale}}
|
||||
<span class="ui text grey" data-tooltip-content="{{$.locale.Tr "repo.issues.is_stale"}}">
|
||||
{{svg "octicon-hourglass" 16 "icon"}}
|
||||
</span>
|
||||
{{end}}
|
||||
{{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}}
|
||||
<a href="#" class="ui muted icon gt-df gt-ac dismiss-review-btn" data-review-id="dismiss-review-{{.Review.ID}}" data-tooltip-content="{{$.locale.Tr "repo.issues.dismiss_review"}}">
|
||||
{{svg "octicon-x" 20}}
|
||||
</a>
|
||||
<div class="ui small modal" id="dismiss-review-modal">
|
||||
<div class="header">
|
||||
{{$.locale.Tr "repo.issues.dismiss_review"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="ui warning message">
|
||||
{{$.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">{{$.locale.Tr "action.review_dismissed_reason"}}</label>
|
||||
<input id="message" name="message">
|
||||
</div>
|
||||
<div class="text right actions">
|
||||
<button class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</button>
|
||||
<button class="ui red button" type="submit">{{$.locale.Tr "ok"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .CanChange}}
|
||||
<a href="#" class="ui icon muted gt-df gt-ac re-request-review{{if .Checked}} checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-tooltip-content="{{if .Checked}}{{$.locale.Tr "repo.issues.remove_request_review"}}{{else}}{{$.locale.Tr "repo.issues.re_request_review"}}{{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{range .OriginalReviews}}
|
||||
{{$createdStr:= TimeSinceUnix .UpdatedUnix $.locale}}
|
||||
<div class="ui divider"></div>
|
||||
<div class="review-item">
|
||||
<div class="review-item-left">
|
||||
<span class="gt-mr-3 text {{.Review.HTMLTypeColorName}}">
|
||||
{{svg (printf "octicon-%s" .Type.Icon)}}
|
||||
</span>
|
||||
<a href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{$.locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}">
|
||||
<span class="text black">
|
||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
|
||||
{{.OriginalAuthor}}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .Issue.PullRequest.HasMerged (not .IsPullBranchDeletable)}}
|
||||
{{/* Then the merge box will not be displayed because this page already contains enough information */}}
|
||||
{{else}}
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user