new.tmpl 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. {{template "base/head" .}}
  2. <div class="repository wiki new">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <div class="ui header">
  7. {{.i18n.Tr "repo.wiki.new_page"}}
  8. {{if .PageIsWikiEdit}}
  9. <div class="ui right">
  10. <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
  11. </div>
  12. {{end}}
  13. </div>
  14. <form class="ui form" action="{{.Link}}" method="post">
  15. {{.CsrfTokenHtml}}
  16. <input type="hidden" name="old_title" value="{{.old_title}}">
  17. <div class="field {{if .Err_Title}}error{{end}}">
  18. <input name="title" value="{{.title}}" autofocus required>
  19. </div>
  20. <div class="field">
  21. <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea required>
  22. </div>
  23. <div class="field">
  24. <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">
  25. </div>
  26. <div class="text right">
  27. <button class="ui green button">
  28. {{.i18n.Tr "repo.wiki.save_page"}}
  29. </button>
  30. </div>
  31. </form>
  32. </div>
  33. </div>
  34. {{template "base/footer" .}}