githook_edit.tmpl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {{template "base/head" .}}
  2. <div class="repository settings edit githook">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. {{template "repo/settings/navbar" .}}
  7. <div class="twelve wide column content">
  8. {{template "base/alert" .}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "repo.settings.githooks"}}
  11. </h4>
  12. <div class="ui attached segment">
  13. <p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
  14. <form class="ui form" action="{{.Link}}" method="post">
  15. {{.CsrfTokenHtml}}
  16. {{with .Hook}}
  17. <div class="inline field">
  18. <label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
  19. <span>{{.Name}}</span>
  20. </div>
  21. <div class="field">
  22. <label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
  23. <textarea id="content" name="content" rows="20" wrap="off" autofocus>{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
  24. </div>
  25. <div class="inline field">
  26. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
  27. </div>
  28. {{end}}
  29. </form>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. {{template "base/footer" .}}