gitea源码

lfs_pointers.tmpl 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
  2. <div class="repo-setting-content">
  3. <h4 class="ui top attached header">
  4. {{ctx.Locale.Tr "repo.settings.lfs_pointers.found" .NumPointers .NumAssociated .NumNotAssociated .NumNoExist}}
  5. {{if gt .NumAssociatable 0}}
  6. <div class="ui right">
  7. <form class="ui form" method="post" action="{{$.Link}}/associate">
  8. {{.CsrfTokenHtml}}
  9. {{range .Pointers}}
  10. {{if .Associatable}}
  11. <input type="hidden" name="oid" value="{{.Oid}} {{.Size}}">
  12. {{end}}
  13. {{end}}
  14. <button class="ui primary tiny button">{{ctx.Locale.Tr "repo.settings.lfs_pointers.associateAccessible" $.NumAssociatable}}</button>
  15. </form>
  16. </div>
  17. {{end}}
  18. </h4>
  19. <div class="ui attached segment">
  20. <table id="lfs-files-table" class="ui fixed single line table">
  21. <thead>
  22. <tr>
  23. <th class="three wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.sha"}}</th>
  24. <th class="four wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.oid"}}</th>
  25. <th class="two wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.inRepo"}}</th>
  26. <th class="two wide">{{ctx.Locale.Tr "repo.settings.lfs_pointers.exists"}}</th>
  27. <th class="two wide" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.lfs_pointers.accessible"}}">{{ctx.Locale.Tr "repo.settings.lfs_pointers.accessible"}}</th>
  28. <th class="three wide"></th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. {{range .Pointers}}
  33. <tr>
  34. <td>
  35. <a href="{{$.RepoLink}}/raw/blob/{{.SHA}}" rel="nofollow" target="_blank" title="{{.SHA}}" class="ui button tw-font-mono">
  36. {{ShortSha .SHA}}
  37. </a>
  38. </td>
  39. <td>
  40. <a {{if and .Exists .InRepo}}href="{{$.LFSFilesLink}}/show/{{.Oid}}" rel="nofollow" target="_blank"{{end}} title="{{.Oid}}" class="ui button tw-font-mono">
  41. {{ShortSha .Oid}}
  42. </a>
  43. </td>
  44. <td>{{svg (Iif .InRepo "octicon-check" "octicon-x")}}</td>
  45. <td>{{svg (Iif .Exists "octicon-check" "octicon-x")}}</td>
  46. <td>{{svg (Iif .Accessible "octicon-check" "octicon-x")}}</td>
  47. <td class="tw-text-right">
  48. <a class="ui primary button" href="{{$.LFSFilesLink}}/find?oid={{.Oid}}&size={{.Size}}&sha={{.SHA}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
  49. </td>
  50. </tr>
  51. {{end}}
  52. </tbody>
  53. </table>
  54. </div>
  55. </div>
  56. {{template "repo/settings/layout_footer" .}}