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.

view.tmpl 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. {{$title}}
  60. <div class="ui sub header">
  61. {{$timeSince := TimeSince .Author.When $.Lang}}
  62. {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
  63. </div>
  64. </div>
  65. <div class="eight wide right aligned column">
  66. {{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
  67. <div class="ui right">
  68. <a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
  69. <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
  70. <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>
  71. </div>
  72. {{end}}
  73. </div>
  74. </div>
  75. </div>
  76. {{if .FormatWarning}}
  77. <div class="ui negative message">
  78. <p>{{.FormatWarning}}</p>
  79. </div>
  80. {{end}}
  81. <div class="ui {{if .sidebarPresent}}grid equal width{{end}}" style="margin-top: 1rem;">
  82. <div class="ui {{if .sidebarPresent}}eleven wide column{{end}} segment markdown has-emoji">
  83. {{.content | Str2html}}
  84. </div>
  85. {{if .sidebarPresent}}
  86. <div class="column" style="padding-top: 0;">
  87. <div class="ui segment">
  88. {{.sidebarContent | Str2html}}
  89. </div>
  90. </div>
  91. {{end}}
  92. </div>
  93. {{if .footerPresent}}
  94. <div class="ui segment">
  95. {{.footerContent | Str2html}}
  96. </div>
  97. {{end}}
  98. </div>
  99. </div>
  100. <div class="ui small basic delete modal">
  101. <div class="ui icon header">
  102. <i class="trash icon"></i>
  103. {{.i18n.Tr "repo.wiki.delete_page_button"}}
  104. </div>
  105. <div class="content">
  106. <p>{{.i18n.Tr "repo.wiki.delete_page_notice_1" $title | Safe}}</p>
  107. </div>
  108. {{template "base/delete_modal_actions" .}}
  109. </div>
  110. {{template "base/footer" .}}