You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

view_list.tmpl 7.0 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <div id="mask">
  2. <div id="loadingPage">
  3. <div class="rect1"></div>
  4. <div class="rect2"></div>
  5. <div class="rect3"></div>
  6. <div class="rect4"></div>
  7. <div class="rect5"></div>
  8. </div>
  9. </div>
  10. <table id="repo-files-table" class="ui single line table can-context-menu" data-can-editfile="{{.CanEditFile}}">
  11. {{.CsrfTokenHtml}}
  12. <thead>
  13. <tr class="commit-list">
  14. <th colspan="2">
  15. {{if .LatestCommitUser}}
  16. <img class="ui avatar image img-12" src="{{.LatestCommitUser.RelAvatarLink}}" />
  17. {{if .LatestCommitUser.FullName}}
  18. <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
  19. {{else}}
  20. <a
  21. href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
  22. {{end}}
  23. {{else}}
  24. {{if .LatestCommit.Author}}
  25. <img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" />
  26. <strong>{{.LatestCommit.Author.Name}}</strong>
  27. {{end}}
  28. {{end}}
  29. <a rel="nofollow"
  30. class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified }} isVerified{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}Untrusted{{else}}Unmatched{{end}}{{else if .LatestCommitVerification.Warning}} isWarning{{end}}{{end}}"
  31. href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}">
  32. <span class="shortsha">{{ShortSha .LatestCommit.ID.String}}</span>
  33. {{if .LatestCommit.Signature}}
  34. <div class="ui detail icon button">
  35. {{if .LatestCommitVerification.Verified}}
  36. <div
  37. title="{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}{{.i18n.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{.i18n.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.LatestCommitVerification.Reason}}">
  38. {{if ne .LatestCommitVerification.SigningUser.ID 0}}
  39. <i class="lock icon"></i>
  40. <img class="ui signature avatar image"
  41. src="{{.LatestCommitVerification.SigningUser.RelAvatarLink}}" />
  42. {{else}}
  43. <i title="{{.LatestCommitVerification.Reason}}" class="icons">
  44. <i class="lock icon"></i>
  45. <i class="tiny inverted cog icon centerlock"></i>
  46. </i>
  47. <img class="ui signature avatar image"
  48. src="{{AvatarLink .LatestCommitVerification.SigningEmail}}" />
  49. {{end}}
  50. </div>
  51. {{else}}
  52. <i title="{{$.i18n.Tr .LatestCommitVerification.Reason}}" class="unlock icon"></i>
  53. {{end}}
  54. </div>
  55. {{end}}
  56. </a>
  57. {{template "repo/commit_status" .LatestCommitStatus}}
  58. {{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }}
  59. <span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span
  60. class="message-wrapper">{{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
  61. {{if IsMultilineCommitMessage .LatestCommit.Message}}
  62. <button class="basic compact mini ui icon button commit-button"><i
  63. class="ellipsis horizontal icon"></i></button>
  64. <pre class="commit-body"
  65. style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  66. {{end}}
  67. </span>
  68. </th>
  69. <th class="text grey right age">
  70. {{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. {{if .HasParentPath}}
  75. <tr class="has-parent">
  76. <td colspan="3">{{svg "octicon-mail-reply" 16}}<a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a>
  77. </td>
  78. </tr>
  79. {{end}}
  80. {{range $item := .Files}}
  81. {{$entry := index $item 0}}
  82. {{$commit := index $item 1}}
  83. <tr>
  84. {{if $entry.IsSubModule}}
  85. <td>
  86. <span class="truncate">
  87. {{svg "octicon-inbox" 16}}
  88. {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}}
  89. {{if $refURL}}
  90. <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a
  91. href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a>
  92. {{else}}
  93. {{$entry.Name}} @ {{ShortSha $commit.RefID}}
  94. {{end}}
  95. </span>
  96. </td>
  97. {{else}}
  98. <td class="name four wide modified-contextmenu">
  99. <span class="truncate">
  100. {{if $entry.IsDir}}
  101. {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
  102. {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
  103. {{svg "octicon-file-directory" 16}}
  104. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}"
  105. title="{{$subJumpablePathName}}">
  106. {{if eq (len $subJumpablePath) 2}}
  107. <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
  108. {{else}}
  109. {{index $subJumpablePath 0}}
  110. {{end}}
  111. </a>
  112. {{else}}
  113. {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}}
  114. <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}"
  115. title="{{$entry.Name}}">{{$entry.Name}}</a>
  116. {{end}}
  117. </span>
  118. </td>
  119. {{end}}
  120. <td class="message nine wide">
  121. <span class="truncate">
  122. <a href="{{$.RepoLink}}/commit/{{$commit.ID}}"
  123. title="{{$commit.Summary}}">{{$commit.Summary | RenderEmoji}}</a>
  124. </span>
  125. </td>
  126. <td class="text right age three wide">{{TimeSince $commit.Committer.When $.Lang}}</td>
  127. </tr>
  128. <tr style="display: none !important;" class="context-menu-one">
  129. <td colspan="12">
  130. <div class="ui column form" method="POST">
  131. <div class="two fields" style="margin: 0;">
  132. <div class="five wide field">
  133. <input class="ui input" name="new_filename" type="text" value=""
  134. onkeyup="this.value=this.value.replace(/[, ]/g,'')">
  135. </div>
  136. <div class="five wide field">
  137. <button class="ui blue button popup-save" type="button"
  138. data-postBasePath="{{$.RepoLink}}/_rename/{{EscapePound $.BranchName}}{{if $.TreePath}}/{{EscapePound $.TreePath}}{{end}}/{{$entry.Name}}"
  139. data-commit="{{$.LatestCommit.ID}}"
  140. data-treepath="{{if $.TreePath}}{{EscapePound $.TreePath}}/{{end}}">保存</button>
  141. <button class="ui basic button popup-close" type="button">取消</button>
  142. </div>
  143. </div>
  144. </div>
  145. </td>
  146. </tr>
  147. {{end}}
  148. </tbody>
  149. </table>
  150. {{if .ReadmeExist}}
  151. {{template "repo/view_file" .}}
  152. {{end}}
  153. <!-- 确认模态框 -->
  154. <div id="deletemodel">
  155. <div class="ui basic modal context-menu-delete">
  156. <div class="ui icon header">
  157. <i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}}
  158. </div>
  159. <div class="content">
  160. <p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  161. </div>
  162. <div class="actions">
  163. <div class="ui red basic inverted cancel button">
  164. <i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}}
  165. </div>
  166. <div class="ui green basic inverted ok button">
  167. <i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}}
  168. </div>
  169. </div>
  170. </div>
  171. </div>