Add button for reporting organizations.

This commit is contained in:
floss4good 2025-03-03 13:48:50 +02:00
parent 729ac5b9f2
commit 39024c6eb7
No known key found for this signature in database
GPG key ID: 5B948B4F4DAF819D
2 changed files with 11 additions and 1 deletions

View file

@ -21,6 +21,14 @@
{{if .IsOrganizationMember}}
<a class="ui basic button tw-mr-0" href="{{.OrgLink}}/dashboard">{{ctx.Locale.Tr "org.open_dashboard"}}</a>
{{end}}
{{if and .IsSigned (not .IsOrganizationOwner)}}
<button class="ui dropdown icon button" data-tooltip-content="{{ctx.Locale.Tr "repo.more_operations"}}" aria-label="{{ctx.Locale.Tr "toggle_menu"}}">
{{svg "octicon-kebab-horizontal" 14}}
<div class="menu top left">
<a class="item context" href="/-/abuse_reports/new?type=org&id={{$.Org.ID}}">{{ctx.Locale.Tr "moderation.report_content"}}</a>
</div>
</button>
{{end}}
</span>
</div>
{{if .RenderedDescription}}<div class="render-content markup">{{.RenderedDescription}}</div>{{end}}

View file

@ -67,12 +67,14 @@
{{if not $.DisableForks}}
{{template "repo/header_fork" $}}
{{end}}
<button class="ui small compact jump dropdown icon button"{{if not $.IsSigned}} disabled{{end}} data-tooltip-content="{{ctx.Locale.Tr "repo.more_operations"}}" aria-label="{{ctx.Locale.Tr "toggle_menu"}}">
{{if $.IsSigned}}
<button class="ui small compact jump dropdown icon button" data-tooltip-content="{{ctx.Locale.Tr "repo.more_operations"}}" aria-label="{{ctx.Locale.Tr "toggle_menu"}}">
{{svg "octicon-kebab-horizontal"}}
<div class="menu top left">
<a class="item context" href="/-/abuse_reports/new?type=repo&id={{$.Repository.ID}}">{{ctx.Locale.Tr "moderation.report_content"}}</a>
</div>
</button>
{{end}}
</div>
{{end}}
</div>