本站源代码
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

115 lines
4.8KB

  1. {{template "base/head" .}}
  2. <div class="repository wiki revisions">
  3. {{template "repo/header" .}}
  4. {{ $title := .title}}
  5. <div class="ui container">
  6. <div class="ui stackable grid">
  7. <div class="ui eight wide column text right">
  8. <div class="ui action small input" id="clone-panel">
  9. {{if not $.DisableHTTP}}
  10. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
  11. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  12. </button>
  13. {{end}}
  14. {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  15. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
  16. SSH
  17. </button>
  18. {{end}}
  19. {{if not $.DisableHTTP}}
  20. <input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly>
  21. {{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  22. <input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly>
  23. {{end}}
  24. {{if or ((not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)))}}
  25. <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">
  26. <i class="octicon octicon-clippy"></i>
  27. </button>
  28. {{end}}
  29. </div>
  30. </div>
  31. <div class="ui header eight wide column">
  32. <a class="file-revisions-btn ui basic button" title="{{.i18n.Tr "repo.wiki.back_to_wiki"}}" href="{{.RepoLink}}/wiki/{{.PageURL}}" ><span>{{.revision}}</span> <i class="fa fa-fw fa-file-text-o"></i></a>
  33. {{$title}}
  34. <div class="ui sub header wrap">
  35. {{$timeSince := TimeSince .Author.When $.Lang}}
  36. {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
  37. </div>
  38. </div>
  39. </div>
  40. <h2 class="ui top header">{{.i18n.Tr "repo.wiki.wiki_page_revisions"}}</h2>
  41. <div class="ui" style="margin-top: 1rem;">
  42. <h4 class="ui top attached header">
  43. <div class="ui stackable grid">
  44. <div class="sixteen wide column">
  45. {{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}}
  46. </div>
  47. </div>
  48. </h4>
  49. {{if and .Commits (gt .CommitCount 0)}}
  50. <div class="ui attached table segment">
  51. <table class="ui very basic striped fixed table single line" id="commits-table">
  52. <thead>
  53. <tr>
  54. <th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>
  55. <th class="tree wide sha">SHA1</th>
  56. <th class="five wide message">{{.i18n.Tr "repo.commits.message"}}</th>
  57. <th class="four wide">{{.i18n.Tr "repo.commits.date"}}</th>
  58. </tr>
  59. </thead>
  60. <tbody class="commit-list">
  61. {{ $r:= List .Commits}}
  62. {{range $r}}
  63. <tr>
  64. <td class="author">
  65. {{if .User}}
  66. {{if .User.FullName}}
  67. <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.User.FullName}}</a>
  68. {{else}}
  69. <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
  70. {{end}}
  71. {{else}}
  72. <img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;{{.Author.Name}}
  73. {{end}}
  74. </td>
  75. <td class="sha">
  76. <label rel="nofollow" class="ui sha label {{if .Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
  77. {{ShortSha .ID.String}}
  78. {{if .Signature}}
  79. <div class="ui detail icon button">
  80. {{if .Verification.Verified}}
  81. <i title="{{.Verification.Reason}}" class="lock green icon"></i>
  82. {{else}}
  83. <i title="{{$.i18n.Tr .Verification.Reason}}" class="unlock icon"></i>
  84. {{end}}
  85. </div>
  86. {{end}}
  87. </label>
  88. </td>
  89. <td class="message">
  90. <span class="message-wrapper">
  91. <span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary}}</span>
  92. {{if IsMultilineCommitMessage .Message}}
  93. <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
  94. <pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  95. {{end}}
  96. </span>
  97. </td>
  98. <td class="grey text">{{TimeSince .Author.When $.Lang}}</td>
  99. </tr>
  100. {{end}}
  101. </tbody>
  102. </table>
  103. </div>
  104. {{end}}
  105. {{template "base/paginate" .}}
  106. </div>
  107. </div>
  108. </div>
  109. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1