view.tmpl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 $.DisableSSH}}
  33. <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
  34. SSH
  35. </button>
  36. {{end}}
  37. <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
  38. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  39. </button>
  40. <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.WikiCloneLink.SSH}}{{end}}" 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 class="ui basic jump dropdown icon button">
  45. <i class="download icon"></i>
  46. <div class="menu">
  47. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
  48. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="ui dividing header">
  55. {{.title}}
  56. {{if .IsRepositoryPusher}}
  57. <div class="ui right">
  58. <a class="ui small button" href="{{.RepoLink}}/wiki/{{.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. </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. {{template "base/footer" .}}