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.

104 lines
3.8 KiB

  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. {{if not $.DisableHTTP}}
  44. <input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly>
  45. {{else}}
  46. <input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly>
  47. {{end}}
  48. <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">
  49. <i class="octicon octicon-clippy"></i>
  50. </button>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="ui dividing header">
  55. {{$title}}
  56. {{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
  57. <div class="ui right">
  58. <a class="ui small button" href="{{.RepoLink}}/wiki/{{EscapePound .PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
  59. <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
  60. <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>
  61. </div>
  62. {{end}}
  63. <div class="ui sub header">
  64. {{$timeSince := TimeSince .Author.When $.Lang}}
  65. {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
  66. </div>
  67. </div>
  68. {{if .FormatWarning}}
  69. <div class="ui negative message">
  70. <p>{{.FormatWarning}}</p>
  71. </div>
  72. {{end}}
  73. <div class="ui {{if .sidebarPresent}}grid equal width{{end}}" style="margin-top: 1rem;">
  74. <div class="ui {{if .sidebarPresent}}eleven wide column{{end}} segment markdown">
  75. {{.content | Str2html}}
  76. </div>
  77. {{if .sidebarPresent}}
  78. <div class="column" style="padding-top: 0;">
  79. <div class="ui segment">
  80. {{.sidebarContent | Str2html}}
  81. </div>
  82. </div>
  83. {{end}}
  84. </div>
  85. {{if .footerPresent}}
  86. <div class="ui grey segment">
  87. {{.footerContent | Str2html}}
  88. </div>
  89. {{end}}
  90. </div>
  91. </div>
  92. <div class="ui small basic delete modal">
  93. <div class="ui icon header">
  94. <i class="trash icon"></i>
  95. {{.i18n.Tr "repo.wiki.delete_page_button"}}
  96. </div>
  97. <div class="content">
  98. <p>{{.i18n.Tr "repo.wiki.delete_page_notice_1" $title | Safe}}</p>
  99. </div>
  100. {{template "base/delete_modal_actions" .}}
  101. </div>
  102. {{template "base/footer" .}}