forgejo/templates/admin/moderation/report_details.tmpl
floss4good 590104b5ca feat: render a link to poster profile next to the ID within shadow copy details (#10194)
Closes #10078 and includes another small improvement (for comments and issues/PRs the title from report/s details page already included the poster name; now it will clickable, opening the poster profile page).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10194
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: floss4good <floss4good@disroot.org>
Co-committed-by: floss4good <floss4good@disroot.org>
2025-12-09 15:19:10 +01:00

65 lines
2.1 KiB
Go HTML Template

{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
<div class="admin-setting-content">
<h4 class="ui top attached header">
{{ctx.Locale.Tr "admin.moderation.reports"}}
</h4>
{{if .Reports}}
<div class="ui attached segment">
<div class="flex-item tw-items-center">
<div class="flex-item-leading">
{{svg .ContentTypeIconName 24}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">
{{if .ContentURL}}<a href="{{.ContentURL}}">{{.ContentReference}}</a>{{else}}<em>{{.ContentReference}}</em>{{end}}
{{if .Poster}}<span>{{if .PosterURL}}<a href="{{.PosterURL}}">{{.Poster}}</a>{{else}}<em>{{.Poster}}</em>{{end}}</span>{{end}}
</div>
</div>
</div>
</div>
{{end}}
<div class="ui attached segment">
{{if .Reports}}
<div class="flex-list">
{{range .Reports}}
<div class="flex-item">
<div class="flex-item-main">
<div class="flex-items-inline">
<span class="item tw-mr-2">
{{svg "octicon-calendar"}}
{{DateUtils.AbsoluteShort .CreatedUnix}}
</span>
<span class="item tw-mr-2">
{{svg "octicon-report"}}
{{if .ReporterName}}<a href="/{{.ReporterName}}">{{.ReporterName}}</a>{{else}}{{$.GhostUserName}}{{end}}
</span>
<span class="item ui label">
{{svg "octicon-tag" 12}}
{{ctx.Locale.Tr (index $.AbuseCategories .Category)}}
</span>
</div>
<pre>{{.Remarks}}</pre>
{{if .ShadowCopyID.Valid}}
<details><summary>{{DateUtils.FullTime .ShadowCopyDate}} shadow copy</summary>
<table class="ui very basic striped table unstackable">
{{range $scField := (call $.GetShadowCopyMap $.Context .)}}
<tr>
<td>{{$scField.Key}}</td>
<td>{{$scField.Value}}{{if and $.AbuserURL (eq $scField.Key "Poster")}} (<a href="{{$.AbuserURL}}">{{$.AbuserName}}</a>){{end}}</td>
</tr>
{{end}}
</table>
</details>
{{end}}
</div>
</div>
{{end}}
</div>
{{else}}
<p class="tw-text-center">{{ctx.Locale.Tr "admin.moderation.no_open_reports"}}</p>
{{end}}
</div>
</div>
{{template "admin/layout_footer" .}}