mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
fix: 'More actions' (⋯) dropdown from moderation reports overview page (#10339)
Follow-up of !8716 (and !9951) A _More actions_ (`⋯`) dropdown (where content related actions are available) was added with !8716 for the moderation reports overview page. Until that PR was merged another PR (!9951) changed the structure of JS-less dropdowns and adjusted the CSS rules. This PR adds the missing `.content` container for the dropdown added with !8716 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10339 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: floss4good <floss4good@disroot.org> Co-committed-by: floss4good <floss4good@disroot.org>
This commit is contained in:
parent
48c7bda95d
commit
0ef51b24ab
2 changed files with 52 additions and 47 deletions
|
|
@ -72,42 +72,44 @@
|
|||
{{svg "octicon-x"}}
|
||||
</button>
|
||||
{{if .ContentReference}} {{/* the reference is missing when the content was already deleted */}}
|
||||
<details class="item dropdown dir-rtl">
|
||||
<details class="dropdown item dir-rtl">
|
||||
<summary class="tw-p-1" data-tooltip-content="{{ctx.Locale.Tr "profile.actions.tooltip"}}">{{svg "octicon-kebab-horizontal"}}</summary>
|
||||
<ul
|
||||
hx-target="{{$reportDivSelector}}" hx-indicator="{{$reportDivSelector}}"
|
||||
hx-vals='{"content_type": {{.ContentType}}, "content_id": {{.ContentID}}}'>
|
||||
{{if .ReportedContentIsUser}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionSuspendAccount}}}' hx-swap="none" class="item">
|
||||
{{svg "octicon-x"}}{{ctx.Locale.Tr "moderation.action.account.suspend"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteAccount}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.account.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else if .ReportedContentIsRepo}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteRepo}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.repo.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else if .ReportedContentIsIssue}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteIssue}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.issue.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else if .ReportedContentIsComment}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteComment}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.comment.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
<div class="content">
|
||||
<ul
|
||||
hx-target="{{$reportDivSelector}}" hx-indicator="{{$reportDivSelector}}"
|
||||
hx-vals='{"content_type": {{.ContentType}}, "content_id": {{.ContentID}}}'>
|
||||
{{if .ReportedContentIsUser}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionSuspendAccount}}}' hx-swap="none" class="item">
|
||||
{{svg "octicon-x"}}{{ctx.Locale.Tr "moderation.action.account.suspend"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteAccount}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.account.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else if .ReportedContentIsRepo}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteRepo}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.repo.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else if .ReportedContentIsIssue}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteIssue}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.issue.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else if .ReportedContentIsComment}}
|
||||
<li>
|
||||
<a hx-post="{{$postURL}}" hx-vals='{"content_action": {{$.ActionDeleteComment}}, "report_action": {{$.MarkAsHandled}}}' class="item">
|
||||
{{svg "octicon-trash"}}{{ctx.Locale.Tr "moderation.action.comment.delete"}}
|
||||
</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
</details>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue