mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-17 03:01:35 +02:00
Update URL routes for abusive content reporting.
This commit is contained in:
parent
36298c7422
commit
35a7d2dc4c
5 changed files with 6 additions and 6 deletions
|
@ -476,8 +476,8 @@ func registerRoutes(m *web.Route) {
|
|||
}, reqSignIn)
|
||||
|
||||
if setting.Moderation.Enabled {
|
||||
m.Get("/-/abuse_reports/new", reqSignIn, moderation.NewReport)
|
||||
m.Post("/-/abuse_reports/new", reqSignIn, web.Bind(forms.ReportAbuseForm{}), moderation.CreatePost)
|
||||
m.Get("/report_abuse", reqSignIn, moderation.NewReport)
|
||||
m.Post("/report_abuse", reqSignIn, web.Bind(forms.ReportAbuseForm{}), moderation.CreatePost)
|
||||
}
|
||||
|
||||
m.Get("/pulls", reqSignIn, user.Pulls)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<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_abuse"}}</a>
|
||||
<a class="item context" href="{{AppSubUrl}}/report_abuse?type=org&id={{$.Org.ID}}">{{ctx.Locale.Tr "moderation.report_abuse"}}</a>
|
||||
</div>
|
||||
</button>
|
||||
{{end}}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<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>
|
||||
<a class="item context" href="{{AppSubUrl}}/report_abuse?type=repo&id={{$.Repository.ID}}">{{ctx.Locale.Tr "moderation.report_content"}}</a>
|
||||
</div>
|
||||
</button>
|
||||
{{end}}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
{{if .ctxData.Issue.IsPull}} {{$contentType = "pull"}} {{else}} {{$contentType = "issue"}} {{end}}
|
||||
{{end}}
|
||||
<div class="divider"></div>
|
||||
<a class="item context" href="/-/abuse_reports/new?type={{$contentType}}&id={{.item.ID}}">{{ctx.Locale.Tr "moderation.report_content"}}</a>
|
||||
<a class="item context" href="{{AppSubUrl}}/report_abuse?type={{$contentType}}&id={{.item.ID}}">{{ctx.Locale.Tr "moderation.report_content"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
</li>
|
||||
{{if .IsModerationEnabled}}
|
||||
<li class="block" hx-target="#profile-avatar-card" hx-indicator="#profile-avatar-card">
|
||||
<a class="ui basic orange button" href="/-/abuse_reports/new?type=user&id={{.ContextUser.ID}}">{{ctx.Locale.Tr "moderation.report_abuse"}}</a>
|
||||
<a class="ui basic orange button" href="{{AppSubUrl}}/report_abuse?type=user&id={{.ContextUser.ID}}">{{ctx.Locale.Tr "moderation.report_abuse"}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Reference in a new issue