view.tmpl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
  33. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  34. </button>
  35. {{if not $.DisableSSH}}
  36. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
  37. SSH
  38. </button>
  39. {{end}}
  40. <input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly>
  41. <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">
  42. <i class="octicon octicon-clippy"></i>
  43. </button>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="ui dividing header">
  48. {{.title}}
  49. {{if .IsRepositoryWriter}}
  50. <div class="ui right">
  51. <a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
  52. <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
  53. <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>
  54. </div>
  55. {{end}}
  56. <div class="ui sub header">
  57. {{$timeSince := TimeSince .Author.When $.Lang}}
  58. {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
  59. </div>
  60. </div>
  61. <div class="ui segment markdown">
  62. {{.content | Str2html}}
  63. </div>
  64. </div>
  65. </div>
  66. <div class="ui small basic delete modal">
  67. <div class="ui icon header">
  68. <i class="trash icon"></i>
  69. {{.i18n.Tr "repo.wiki.delete_page_button"}}
  70. </div>
  71. <div class="content">
  72. <p>{{.i18n.Tr "repo.wiki.delete_page_notice_1" .title | Safe}}</p>
  73. </div>
  74. {{template "base/delete_modal_actions" .}}
  75. </div>
  76. {{template "base/footer" .}}