githook_edit.tmpl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. {{template "repo/header" .}}
  5. <div id="setting-wrapper" class="main-wrapper">
  6. <div id="repo-setting" class="container clear">
  7. {{template "repo/settings/nav" .}}
  8. <div class="grid-4-5 left">
  9. <div class="setting-content">
  10. {{template "ng/base/alert" .}}
  11. <div id="setting-content">
  12. <div id="repo-hooks-panel" class="panel panel-radius">
  13. <div class="panel-header">
  14. <strong>{{.i18n.Tr "repo.settings.githooks"}}</strong>
  15. </div>
  16. <form class="form form-align panel-body" id="repo-setting-form" action="{{.RepoLink}}/settings/hooks/git/{{.Hook.Name}}" method="post">
  17. {{.CsrfTokenHtml}}
  18. <div class="text-center panel-desc">{{.i18n.Tr "repo.settings.githook_edit_desc"}}</div>
  19. {{with .Hook}}
  20. <div class="field">
  21. <label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
  22. <label class="text-left">{{.Name}}</label>
  23. </div>
  24. <div class="field clear">
  25. <label class="left" for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
  26. <textarea class="ipt-textarea ipt-large ipt-radius" id="content" name="content" cols="60" rows="20" wrap="off">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
  27. </div>
  28. <div class="field">
  29. <span class="form-label"></span>
  30. <button class="btn btn-green btn-large btn-radius" id="change-reponame-btn" href="#change-reponame-modal">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
  31. </div>
  32. {{end}}
  33. </form>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. {{template "ng/base/footer" .}}