You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.6 KiB

  1. <div class="twelve wide column content">
  2. {{template "base/alert" .}}
  3. <h4 class="ui top attached header">
  4. {{.i18n.Tr "repo.settings.hooks"}}
  5. <div class="ui right">
  6. <div class="ui floating1 jump dropdown">
  7. <div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
  8. <div class="menu">
  9. <a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
  10. <img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gogs
  11. </a>
  12. <a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
  13. <img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
  14. </a>
  15. </div>
  16. </div>
  17. </div>
  18. </h4>
  19. <div class="ui attached table segment">
  20. <div class="ui hook list">
  21. <div class="item">
  22. {{.Description | Str2html}}
  23. </div>
  24. {{range .Webhooks}}
  25. <div class="item">
  26. {{if eq .LastStatus 1}}
  27. <span class="text green"><i class="octicon octicon-check"></i></span>
  28. {{else if eq .LastStatus 2}}
  29. <span class="text red"><i class="octicon octicon-alert"></i></span>
  30. {{else}}
  31. <span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
  32. {{end}}
  33. <a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
  34. <div class="ui right">
  35. <span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
  36. <span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
  37. </div>
  38. </div>
  39. {{end}}
  40. </div>
  41. </div>
  42. </div>
  43. {{template "repo/settings/hook_delete_modal" .}}