|
58 | 58 | </div>
|
59 | 59 | {{end}}
|
60 | 60 | {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
61 |
| - {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} |
| 61 | + {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} |
62 | 62 | {{end}}
|
63 | 63 | </div>
|
64 | 64 | </div>
|
|
494 | 494 | </div>
|
495 | 495 | </div>
|
496 | 496 | {{end}}
|
497 |
| - <div id="code-comments-{{(index $comms 0).ID}}" class="ui segment{{if $resolved}} hide{{end}} py-3"> |
| 497 | + <div id="code-comments-{{(index $comms 0).ID}}" class="comment-code-cloud ui segment{{if $resolved}} hide{{end}} py-3"> |
498 | 498 | <div class="ui comments mb-0">
|
499 | 499 | {{range $comms}}
|
500 | 500 | {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }}
|
501 | 501 | <div class="comment code-comment" id="{{.HashTag}}">
|
502 |
| - {{if not .OriginalAuthor }} |
503 |
| - <a class="avatar"> |
504 |
| - {{avatar .Poster}} |
505 |
| - </a> |
506 |
| - {{end}} |
507 | 502 | <div class="content">
|
508 |
| - <span class="text grey"> |
509 |
| - {{if .OriginalAuthor }} |
510 |
| - <span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span> |
511 |
| - {{else}} |
512 |
| - <a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> |
513 |
| - {{end}} |
514 |
| - {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}} |
515 |
| - </span> |
| 503 | + <div class="header comment-header"> |
| 504 | + <div class="comment-header-left df ac"> |
| 505 | + {{if not .OriginalAuthor }} |
| 506 | + <a class="avatar"> |
| 507 | + {{avatar .Poster}} |
| 508 | + </a> |
| 509 | + {{end}} |
| 510 | + <span class="text grey"> |
| 511 | + {{if .OriginalAuthor }} |
| 512 | + <span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span> |
| 513 | + {{else}} |
| 514 | + <a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> |
| 515 | + {{end}} |
| 516 | + {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}} |
| 517 | + </span> |
| 518 | + </div> |
| 519 | + <div class="comment-header-right actions df ac"> |
| 520 | + {{if not $.Repository.IsArchived}} |
| 521 | + {{if or (and (eq .PosterID $.Issue.PosterID) (eq $.Issue.OriginalAuthorID 0)) (eq $.Issue.OriginalAuthorID .OriginalAuthorID) }} |
| 522 | + <div class="ui basic label"> |
| 523 | + {{$.i18n.Tr "repo.issues.poster"}} |
| 524 | + </div> |
| 525 | + {{end}} |
| 526 | + {{if gt .ShowTag 0}} |
| 527 | + <div class="ui basic label"> |
| 528 | + {{if eq .ShowTag 2}} |
| 529 | + {{$.i18n.Tr "repo.issues.collaborator"}} |
| 530 | + {{else if eq .ShowTag 3}} |
| 531 | + {{$.i18n.Tr "repo.issues.owner"}} |
| 532 | + {{end}} |
| 533 | + </div> |
| 534 | + {{end}} |
| 535 | + {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}} |
| 536 | + {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} |
| 537 | + {{end}} |
| 538 | + </div> |
| 539 | + </div> |
516 | 540 | <div class="text comment-content">
|
517 | 541 | <div class="render-content markdown">
|
518 | 542 | {{if .RenderedContent}}
|
|
521 | 545 | <span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
|
522 | 546 | {{end}}
|
523 | 547 | </div>
|
524 |
| - <div class="raw-content hide">{{.Content}}</div> |
| 548 | + <div id="comment-{{.ID}}" class="raw-content hide">{{.Content}}</div> |
| 549 | + <div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div> |
525 | 550 | </div>
|
| 551 | + {{$reactions := .Reactions.GroupByType}} |
| 552 | + {{if $reactions}} |
| 553 | + <div class="ui attached segment reactions"> |
| 554 | + {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}} |
| 555 | + </div> |
| 556 | + {{end}} |
526 | 557 | </div>
|
527 | 558 | </div>
|
528 | 559 | {{end}}
|
|
0 commit comments