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.

84 lines
3.2 KiB

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