hook_list.tmpl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 types 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-12" src="{{AppSubUrl}}/img/favicon.png">Gogs
  11. </a>
  12. <a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
  13. <img class="img-12" src="{{AppSubUrl}}/img/slack.png">Slack
  14. </a>
  15. <a class="item" href="{{.BaseLink}}/settings/hooks/discord/new">
  16. <img class="img-12" src="{{AppSubUrl}}/img/discord.png">Discord
  17. </a>
  18. </div>
  19. </div>
  20. </div>
  21. </h4>
  22. <div class="ui attached table segment">
  23. <div class="ui hook list">
  24. <div class="item">
  25. {{.Description | Str2html}}
  26. </div>
  27. {{range .Webhooks}}
  28. <div class="item">
  29. {{if eq .LastStatus 1}}
  30. <span class="text green"><i class="octicon octicon-check"></i></span>
  31. {{else if eq .LastStatus 2}}
  32. <span class="text red"><i class="octicon octicon-alert"></i></span>
  33. {{else}}
  34. <span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
  35. {{end}}
  36. <a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
  37. <div class="ui right">
  38. <span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
  39. <span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
  40. </div>
  41. </div>
  42. {{end}}
  43. </div>
  44. </div>
  45. </div>
  46. {{template "repo/settings/hook_delete_modal" .}}