mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
[REFACTOR] use Icon from interface in webhook list
This commit is contained in:
parent
120fa61a0a
commit
69115baf41
25 changed files with 70 additions and 105 deletions
|
@ -45,6 +45,7 @@ func WebhookList(ctx *context.Context) {
|
|||
ctx.Data["PageIsSettingsHooks"] = true
|
||||
ctx.Data["BaseLink"] = ctx.Repo.RepoLink + "/settings/hooks"
|
||||
ctx.Data["BaseLinkNew"] = ctx.Repo.RepoLink + "/settings/hooks"
|
||||
ctx.Data["WebhookList"] = webhook_service.List()
|
||||
ctx.Data["Description"] = ctx.Tr("repo.settings.hooks_desc", "https://forgejo.org/docs/latest/user/webhooks/")
|
||||
|
||||
ws, err := db.Find[webhook.Webhook](ctx, webhook.ListWebhookOptions{RepoID: ctx.Repo.Repository.ID})
|
||||
|
@ -141,6 +142,7 @@ func WebhookNew(ctx *context.Context) {
|
|||
ctx.Data["WebhookHandler"] = handler
|
||||
ctx.Data["BaseLink"] = orCtx.LinkNew
|
||||
ctx.Data["BaseLinkNew"] = orCtx.LinkNew
|
||||
ctx.Data["WebhookList"] = webhook_service.List()
|
||||
|
||||
ctx.HTML(http.StatusOK, orCtx.NewTemplate)
|
||||
}
|
||||
|
@ -205,6 +207,7 @@ func WebhookCreate(ctx *context.Context) {
|
|||
}
|
||||
ctx.Data["BaseLink"] = orCtx.LinkNew
|
||||
ctx.Data["BaseLinkNew"] = orCtx.LinkNew
|
||||
ctx.Data["WebhookList"] = webhook_service.List()
|
||||
|
||||
if ctx.HasError() {
|
||||
// pre-fill the form with the submitted data
|
||||
|
@ -339,6 +342,7 @@ func checkWebhook(ctx *context.Context) (*ownerRepoCtx, *webhook.Webhook) {
|
|||
}
|
||||
ctx.Data["BaseLink"] = orCtx.Link
|
||||
ctx.Data["BaseLinkNew"] = orCtx.LinkNew
|
||||
ctx.Data["WebhookList"] = webhook_service.List()
|
||||
|
||||
var w *webhook.Webhook
|
||||
if orCtx.RepoID > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue