overleaf/services/web/app/views/project/editor/history-file-tree.pug

46 lines
1.3 KiB
Text

aside.file-tree.file-tree-history.full-size(
ng-controller="HistoryV2FileTreeController"
ng-if="ui.view == 'history' && history.isV2"
)
.toolbar.toolbar-filetree
span Modified files
.file-tree-inner
history-file-tree(
file-tree="currentFileTree"
selected-pathname="history.selection.pathname"
on-selected-file-change="handleFileSelection(file)"
)
script(type="text/ng-template", id="historyFileTreeTpl")
.history-file-tree
history-file-entity(
ng-repeat="fileEntity in $ctrl.fileTree"
file-entity="fileEntity"
)
script(type="text/ng-template", id="historyFileEntityTpl")
.history-file-entity-wrapper
a.history-file-entity-link(
href
ng-click="$ctrl.handleClick()"
ng-class="{ 'history-file-entity-link-selected': $ctrl.isSelected }"
)
span.history-file-entity-name
i.history-file-entity-icon.history-file-entity-icon-folder-state.fa.fa-fw(
ng-class="{\
'fa-chevron-down': ($ctrl.fileEntity.type === 'folder' && $ctrl.isOpen),\
'fa-chevron-right': ($ctrl.fileEntity.type === 'folder' && !$ctrl.isOpen)\
}"
)
i.history-file-entity-icon.fa(
ng-class="$ctrl.iconClass"
)
| {{ ::$ctrl.fileEntity.name }}
div(
ng-show="$ctrl.isOpen"
)
history-file-entity(
ng-repeat="childEntity in $ctrl.fileEntity.children"
file-entity="childEntity"
)