fileTreeV2.pug 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. aside.file-tree.full-size(
  2. ng-controller="HistoryV2FileTreeController"
  3. ng-if="ui.view == 'history' && history.isV2 && history.viewMode === HistoryViewModes.POINT_IN_TIME"
  4. )
  5. .history-file-tree-inner
  6. history-file-tree(
  7. file-tree="currentFileTree"
  8. selected-pathname="history.selection.pathname"
  9. on-selected-file-change="handleFileSelection(file)"
  10. is-loading="history.loadingFileTree"
  11. )
  12. aside.file-tree.file-tree-history.full-size(
  13. ng-controller="FileTreeController"
  14. ng-class="{ 'multi-selected': multiSelectedCount > 0 }"
  15. ng-show="ui.view == 'history' && history.isV2 && history.viewMode === HistoryViewModes.COMPARE")
  16. .toolbar.toolbar-filetree
  17. span Modified files
  18. .file-tree-inner
  19. ul.list-unstyled.file-tree-list
  20. li(
  21. ng-repeat="(pathname, doc) in history.selection.docs"
  22. ng-class="{ 'selected': history.selection.pathname == pathname }"
  23. )
  24. .entity
  25. .entity-name.entity-name-history(
  26. ng-click="history.selection.pathname = pathname",
  27. ng-class="{ 'deleted': !!doc.deletedAtV }"
  28. )
  29. i.fa.fa-fw.fa-pencil
  30. span {{ pathname }}
  31. script(type="text/ng-template", id="historyFileTreeTpl")
  32. .history-file-tree
  33. history-file-entity(
  34. ng-repeat="fileEntity in $ctrl.fileTree"
  35. file-entity="fileEntity"
  36. ng-show="!$ctrl.isLoading"
  37. )
  38. script(type="text/ng-template", id="historyFileEntityTpl")
  39. .history-file-entity-wrapper
  40. a.history-file-entity-link(
  41. href
  42. ng-click="$ctrl.handleClick()"
  43. ng-class="{ 'history-file-entity-link-selected': $ctrl.isSelected }"
  44. )
  45. span.history-file-entity-name
  46. i.history-file-entity-icon.history-file-entity-icon-folder-state.fa.fa-fw(
  47. ng-class="{\
  48. 'fa-chevron-down': ($ctrl.fileEntity.type === 'folder' && $ctrl.isOpen),\
  49. 'fa-chevron-right': ($ctrl.fileEntity.type === 'folder' && !$ctrl.isOpen)\
  50. }"
  51. )
  52. i.history-file-entity-icon.fa(
  53. ng-class="$ctrl.iconClass"
  54. )
  55. | {{ ::$ctrl.fileEntity.name }}
  56. div(
  57. ng-show="$ctrl.isOpen"
  58. )
  59. history-file-entity(
  60. ng-repeat="childEntity in $ctrl.fileEntity.children"
  61. file-entity="childEntity"
  62. )