本站源代码
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

114 lines
4.4KB

  1. {{template "base/head" .}}
  2. <div class="repository wiki view">
  3. {{template "repo/header" .}}
  4. {{ $title := .title}}
  5. <div class="ui container">
  6. <div class="ui stackable 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/{{.SubURL}}">{{.Name}}</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 and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  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 if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  46. <input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly>
  47. {{end}}
  48. {{if or ((not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)))}}
  49. <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">
  50. <i class="octicon octicon-clippy"></i>
  51. </button>
  52. {{end}}
  53. </div>
  54. </div>
  55. </div>
  56. <div class="ui dividing header">
  57. <div class="ui stackable grid">
  58. <div class="eight wide column">
  59. <a class="file-revisions-btn ui basic button" title="{{.i18n.Tr "repo.wiki.file_revision"}}" href="{{.RepoLink}}/wiki/{{.PageURL}}/_revision" ><span>{{.CommitCount}}</span> <i class="fa fa-fw fa-history"></i></a>
  60. {{$title}}
  61. <div class="ui sub header">
  62. {{$timeSince := TimeSince .Author.When $.Lang}}
  63. {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
  64. </div>
  65. </div>
  66. <div class="eight wide right aligned column">
  67. {{if and .CanWriteWiki (not .Repository.IsMirror)}}
  68. <div class="ui right">
  69. <a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
  70. <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
  71. <a class="ui red small button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}/delete" data-id="{{.PageURL}}">{{.i18n.Tr "repo.wiki.delete_page_button"}}</a>
  72. </div>
  73. {{end}}
  74. </div>
  75. </div>
  76. </div>
  77. {{if .FormatWarning}}
  78. <div class="ui negative message">
  79. <p>{{.FormatWarning}}</p>
  80. </div>
  81. {{end}}
  82. <div class="ui {{if .sidebarPresent}}grid equal width{{end}}" style="margin-top: 1rem;">
  83. <div class="ui {{if .sidebarPresent}}eleven wide column{{end}} segment markdown has-emoji">
  84. {{.content | Str2html}}
  85. </div>
  86. {{if .sidebarPresent}}
  87. <div class="column" style="padding-top: 0;">
  88. <div class="ui segment">
  89. {{.sidebarContent | Str2html}}
  90. </div>
  91. </div>
  92. {{end}}
  93. </div>
  94. {{if .footerPresent}}
  95. <div class="ui segment">
  96. {{.footerContent | Str2html}}
  97. </div>
  98. {{end}}
  99. </div>
  100. </div>
  101. <div class="ui small basic delete modal">
  102. <div class="ui icon header">
  103. <i class="trash icon"></i>
  104. {{.i18n.Tr "repo.wiki.delete_page_button"}}
  105. </div>
  106. <div class="content">
  107. <p>{{.i18n.Tr "repo.wiki.delete_page_notice_1" ($title|Escape) | Safe}}</p>
  108. </div>
  109. {{template "base/delete_modal_actions" .}}
  110. </div>
  111. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1