You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1 KiB

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