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

lfs_locks.tmpl 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
  2. <div class="user-main-content twelve wide column content repository file list">
  3. <div class="tab-size-8 non-diff-file-content">
  4. <h4 class="ui top attached header">
  5. <a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / {{.locale.Tr "repo.settings.lfs_locks"}} ({{.locale.Tr "admin.total" .Total}})
  6. </h4>
  7. <div class="ui attached segment">
  8. <form class="ui form ignore-dirty" method="post">
  9. {{$.CsrfTokenHtml}}
  10. <div class="ui fluid action input">
  11. <input name="path" value="" placeholder="{{.locale.Tr "repo.settings.lfs_lock_path"}}" autofocus>
  12. <button class="ui primary button">{{.locale.Tr "repo.settings.lfs_lock"}}</button>
  13. </div>
  14. </form>
  15. </div>
  16. <table id="lfs-files-locks-table" class="ui attached segment single line table">
  17. <tbody>
  18. {{range $index, $lock := .LFSLocks}}
  19. <tr>
  20. <td>
  21. {{if index $.Linkable $index}}
  22. {{svg "octicon-file"}}
  23. <a href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments $.Repository.DefaultBranch}}/{{PathEscapeSegments $lock.Path}}" title="{{$lock.Path}}">{{$lock.Path}}</a>
  24. {{else}}
  25. {{svg "octicon-diff"}}
  26. <span data-tooltip-content="{{$.locale.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span>
  27. {{end}}
  28. {{if not (index $.Lockables $index)}}
  29. <span data-tooltip-content="{{$.locale.Tr "repo.settings.lfs_noattribute"}}">{{svg "octicon-alert"}}</span>
  30. {{end}}
  31. </td>
  32. <td>
  33. <a href="{{$.Owner.HomeLink}}">
  34. {{avatar $.Context $.Owner}}
  35. {{$.Owner.DisplayName}}
  36. </a>
  37. </td>
  38. <td>{{TimeSince .Created $.locale}}</td>
  39. <td class="right aligned">
  40. <form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="post">
  41. {{$.CsrfTokenHtml}}
  42. <button class="ui primary button"><span class="btn-octicon">{{svg "octicon-lock"}}</span>{{$.locale.Tr "repo.settings.lfs_force_unlock"}}</button>
  43. </form>
  44. </td>
  45. </tr>
  46. {{else}}
  47. <tr>
  48. <td colspan="4">{{.locale.Tr "repo.settings.lfs_locks_no_locks"}}</td>
  49. </tr>
  50. {{end}}
  51. </tbody>
  52. </table>
  53. {{template "base/paginate" .}}
  54. </div>
  55. </div>
  56. {{template "repo/settings/layout_footer" .}}