view.tmpl 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {{template "base/head" .}}
  2. <div class="repository wiki view">
  3. {{template "repo/header" .}}
  4. {{ $title := .title | Sanitize}}
  5. <div class="ui container">
  6. <div class="ui grid">
  7. <div class="ui ten wide column">
  8. <div class="choose page">
  9. <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
  10. <div class="ui basic small button">
  11. <span class="text">
  12. {{.i18n.Tr "repo.wiki.page"}}:
  13. <strong>{{$title}}</strong>
  14. </span>
  15. <i class="dropdown icon"></i>
  16. </div>
  17. <div class="menu">
  18. <div class="ui icon search input">
  19. <i class="filter icon"></i>
  20. <input name="search" placeholder="{{.i18n.Tr "repo.wiki.filter_page"}}...">
  21. </div>
  22. <div class="scrolling menu">
  23. {{range .Pages}}
  24. <div class="item {{if eq $.Title .Name}}selected{{end}}" data-url="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name | Sanitize}}</div>
  25. {{end}}
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="ui six wide column">
  32. <div class="ui action small input" id="clone-panel">
  33. {{if not $.DisableHTTP}}
  34. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
  35. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  36. </button>
  37. {{end}}
  38. {{if not $.DisableSSH}}
  39. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
  40. SSH
  41. </button>
  42. {{end}}
  43. <input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
  44. <button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
  45. <i class="octicon octicon-clippy"></i>
  46. </button>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="ui dividing header">
  51. <span class="has-emoji">{{$title}}</span>
  52. {{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
  53. <div class="ui right">
  54. <a class="ui small button" href="{{.RepoLink}}/wiki/{{EscapePound .PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
  55. <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
  56. <a class="ui red small button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{EscapePound .PageURL}}/delete" data-id="{{EscapePound .PageURL}}">{{.i18n.Tr "repo.wiki.delete_page_button"}}</a>
  57. </div>
  58. {{end}}
  59. <div class="ui sub header">
  60. {{$timeSince := TimeSince .Author.When $.Lang}}
  61. {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
  62. </div>
  63. </div>
  64. <div class="markdown has-emoji">
  65. {{.content | Str2HTML}}
  66. </div>
  67. </div>
  68. </div>
  69. <div class="ui small basic delete modal">
  70. <div class="ui icon header">
  71. <i class="trash icon"></i>
  72. {{.i18n.Tr "repo.wiki.delete_page_button"}}
  73. </div>
  74. <div class="content">
  75. <p>{{.i18n.Tr "repo.wiki.delete_page_notice_1" $title | Safe}}</p>
  76. </div>
  77. {{template "base/delete_modal_actions" .}}
  78. </div>
  79. {{template "base/footer" .}}