list.tmpl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. {{if .Types}}
  8. <div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
  9. <div class="menu">
  10. {{range .Types}}
  11. {{if eq . "gogs"}}
  12. <a class="item logo" href="{{$.BaseLink}}/settings/hooks/gogs/new">
  13. <img class="img-12" src="{{AppSubURL}}/img/favicon.png">Gogs
  14. </a>
  15. {{end}}
  16. {{end}}
  17. </div>
  18. {{end}}
  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/webhook/delete_modal" .}}