list.tmpl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. </h4>
  6. <div class="ui attached segment">
  7. <p>{{.Description | Safe}}</p>
  8. <div class="ui hook list">
  9. {{range .Webhooks}}
  10. <div class="item">
  11. {{if eq .LastStatus 1}}
  12. <span class="text green"><i class="octicon octicon-check"></i></span>
  13. {{else if eq .LastStatus 2}}
  14. <span class="text red"><i class="octicon octicon-alert"></i></span>
  15. {{else}}
  16. <span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
  17. {{end}}
  18. <a href="{{$.Link}}/{{.ID}}">{{.URL}}</a>
  19. <div class="ui right">
  20. <a class="text blue" href="{{$.Link}}/{{.ID}}"><i class="fa fa-pencil"></i></a>
  21. <a class="text red delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-trash-o"></i></a>
  22. </div>
  23. </div>
  24. {{end}}
  25. </div>
  26. </div>
  27. <div class="ui bottom attached segment">
  28. <span><b>{{.i18n.Tr "repo.settings.webhooks.add_new"}}</b></span>
  29. <div class="ui selection jump dropdown">
  30. <i class="dropdown icon"></i>
  31. <div class="default text">{{.i18n.Tr "repo.settings.webhooks.choose_a_type"}}</div>
  32. <div class="menu">
  33. {{range .Types}}
  34. {{if eq . "gogs"}}
  35. <a class="item logo" href="{{$.Link}}/gogs/new">
  36. <img class="img-12" src="{{AppSubURL}}/img/favicon.png">Gogs
  37. </a>
  38. {{else if eq . "slack"}}
  39. <a class="item logo" href="{{$.Link}}/slack/new">
  40. <img class="img-12" src="{{AppSubURL}}/img/slack.png">Slack
  41. </a>
  42. {{else if eq . "discord"}}
  43. <a class="item logo" href="{{$.Link}}/discord/new">
  44. <img class="img-12" src="{{AppSubURL}}/img/discord.png">Discord
  45. </a>
  46. {{else if eq . "dingtalk"}}
  47. <a class="item logo" href="{{$.Link}}/dingtalk/new">
  48. <img class="img-12" src="{{AppSubURL}}/img/dingtalk.png">Dingtalk
  49. </a>
  50. {{end}}
  51. {{end}}
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. {{template "repo/settings/webhook/delete_modal" .}}