|
399 | 399 | </div>
|
400 | 400 | {{else if eq .Type 22}}
|
401 | 401 | <div class="timeline-item-group">
|
402 |
| - <div class="timeline-item event" id="{{.HashTag}}"> |
| 402 | + <div class="timeline-item event"> |
403 | 403 | {{if .OriginalAuthor }}
|
404 | 404 | {{else}}
|
405 | 405 | <a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
|
|
434 | 434 | </span>
|
435 | 435 | </div>
|
436 | 436 | {{if .Content}}
|
437 |
| - <div class="timeline-item comment"> |
| 437 | + <div class="timeline-item comment" id="{{.HashTag}}"> |
438 | 438 | <div class="content comment-container">
|
439 | 439 | <div class="ui top attached header comment-header df ac sb">
|
440 |
| - <span class="text grey"> |
441 |
| - {{if .OriginalAuthor }} |
442 |
| - <span class="text black"> |
443 |
| - {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} |
444 |
| - {{ .OriginalAuthor }} |
445 |
| - </span> |
446 |
| - <span class="text grey"> {{if $.Repository.OriginalURL}}</span> |
447 |
| - <span class="text migrate">({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span> |
448 |
| - {{else}} |
449 |
| - <a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> |
450 |
| - {{end}} |
| 440 | + <div class="comment-header-left df ac"> |
| 441 | + <span class="text grey"> |
| 442 | + {{if .OriginalAuthor }} |
| 443 | + <span class="text black"> |
| 444 | + {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} |
| 445 | + {{ .OriginalAuthor }} |
| 446 | + </span> |
| 447 | + <span class="text grey"> {{if $.Repository.OriginalURL}}</span> |
| 448 | + <span class="text migrate">({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span> |
| 449 | + {{else}} |
| 450 | + <a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a> |
| 451 | + {{end}} |
451 | 452 |
|
452 |
| - {{$.i18n.Tr "repo.issues.review.left_comment" | Safe}} |
453 |
| - </span> |
| 453 | + {{$.i18n.Tr "repo.issues.review.left_comment" | Safe}} |
| 454 | + </span> |
| 455 | + </div> |
| 456 | + <div class="comment-header-right actions df ac"> |
| 457 | + {{if (.ShowRole.HasRole "Poster")}} |
| 458 | + <div class="ui basic label"> |
| 459 | + {{$.i18n.Tr "repo.issues.poster"}} |
| 460 | + </div> |
| 461 | + {{end}} |
| 462 | + {{if (.ShowRole.HasRole "Writer")}} |
| 463 | + <div class="ui basic label"> |
| 464 | + {{$.i18n.Tr "repo.issues.collaborator"}} |
| 465 | + </div> |
| 466 | + {{end}} |
| 467 | + {{if (.ShowRole.HasRole "Owner")}} |
| 468 | + <div class="ui basic label"> |
| 469 | + {{$.i18n.Tr "repo.issues.owner"}} |
| 470 | + </div> |
| 471 | + {{end}} |
| 472 | + {{if not $.Repository.IsArchived}} |
| 473 | + {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}} |
| 474 | + {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} |
| 475 | + {{end}} |
| 476 | + </div> |
454 | 477 | </div>
|
455 | 478 | <div class="ui attached segment comment-body">
|
456 | 479 | <div class="render-content markup">
|
|
460 | 483 | <span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
|
461 | 484 | {{end}}
|
462 | 485 | </div>
|
| 486 | + <div id="comment-{{.ID}}" class="raw-content hide">{{.Content}}</div> |
| 487 | + <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> |
463 | 488 | {{if .Attachments}}
|
464 | 489 | {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}}
|
465 | 490 | {{end}}
|
466 | 491 | </div>
|
| 492 | + {{$reactions := .Reactions.GroupByType}} |
| 493 | + {{if $reactions}} |
| 494 | + <div class="ui attached segment reactions"> |
| 495 | + {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}} |
| 496 | + </div> |
| 497 | + {{end}} |
467 | 498 | </div>
|
468 | 499 | </div>
|
469 | 500 | {{end}}
|
|
0 commit comments