88 lines
5.9 KiB
HTML
88 lines
5.9 KiB
HTML
<div class="text-left" ng-hide="vm.displayFileTree">
|
|
<div class="row">
|
|
<ul class="breadcrumb">
|
|
<li ng-repeat="breadcrumb in vm.breadcrumbs track by $index" ng-click="vm.getDirectoriesFromBreadcrumbs(breadcrumb); vm.closeFileUploadsContainers();" data="{{ breadcrumb }}" class="cp breadcrumbs-list">
|
|
{{ breadcrumb | capitalize }}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<div class="text-center {{ vm.displaySpinner }}">
|
|
<i class="fa fa-spinner fa-spin fa-5x"></i>
|
|
</div>
|
|
<ul class="tree ls-none">
|
|
<li class="directories-go-here" ng-repeat="directory in vm.siteDirectories track by $index">
|
|
<input type="checkbox" id="{{ r.challenge }}{{ $index }}" />
|
|
<label class="tree_label" for="{{ r.challenge }}{{ $index }}" ng-click="vm.getDirectories(directory); vm.closeFileUploadsContainers();" data="{{ directory }}">{{ directory }}</label><span class="pull-right"><button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, directory); vm.closeFileUploadsContainers();" data="{{ directory }}" ><i class="fa fa-trash"></i></button></span>
|
|
</li>
|
|
</ul>
|
|
<ul class="tree files-only ls-none">
|
|
<li ng-repeat="file in vm.siteFiles track by $index">
|
|
<span class="tree_label filez">{{ file }}</span><span class="pull-right"><button ng-if="r.shareAccess.read" type="button" class="btn btn-default btn-xs" ng-click="vm.Sites.fileContents(file, r);" data="{{ file }}" ><i class="fa fa-code"></i></button> <button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file); vm.closeFileUploadsContainers();" data="{{ file }}" ><i class="fa fa-trash"></i></button></span><br>
|
|
</li>
|
|
</ul>
|
|
<div class="folder-actions">
|
|
<hr>
|
|
<div>
|
|
<button ng-if="r.shareAccess.invite" type="button" name="button" class="btn btn-block btn-primary" ng-click="vm.showAction('invite');">Share folder</button>
|
|
<button type="button" name="button" class="btn btn-block btn-primary" ng-click="vm.Sites.archive(r)">Download folder</button>
|
|
<ul class="ls-none folder-actions-list">
|
|
<li ng-if="r.shareAccess.write"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.autoPopulateFolderName(); vm.uploadFileContainer = true; vm.uploadFolderContainer = false; vm.cleanUploads(r);" class="cp">Upload files</a></span></li>
|
|
<li ng-if="r.shareAccess.write"><span><i class="fa fa-folder cp"></i> <a ng-click="vm.uploadFolderContainer = true; vm.uploadFileContainer = false; vm.cleanUploads(r);" class="cp">New folder</a></span></li>
|
|
<li ng-if="r.shareAccess.write"><span><i class="fa fa-trash cp"></i> <a ng-click="vm.triggerDeleteFolder(vm.currentFolder, r); vm.cleanUploads(r);" data="{{ vm.currentFolder }}" class="cp">Delete {{ vm.currentFolder | capitalize }} folder</a></span></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="upload-container">
|
|
<form ng-show="vm.uploadFileContainer">
|
|
<hr>
|
|
<div>
|
|
<input type="file" ng-model="r.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(r)" />
|
|
<div ng-if="r.isZip"><label><input type="checkbox" ng-model="r.unzip" /> Unpack .zip</label></div>
|
|
<div ng-if="r.unzip"><label><input type="checkbox" ng-model="r.stripZip" /> Strip zip directory root</label></div>
|
|
<div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div>
|
|
<div ng-if="r.uploadTotal"><span ng-bind="r.uploadPercent">99</span>% | <span ng-bind="r.uploadProgress">1</span> MiB / <span ng-bind="r.uploadTotal">100</span> MiB</div>
|
|
<input type="text" class="form-control hidden" ng-model="vm.autoPopulateWebPath" placeholder="/js/config/config.js" disabled/>
|
|
<button ng-click="vm.Sites.upload(r)" type="button" name="button" class="btn btn-success" >Add File</button>
|
|
</div>
|
|
</form>
|
|
<form class="form-inline" ng-show="vm.uploadFolderContainer">
|
|
<hr>
|
|
<ul class="ls-none">
|
|
<li class="add-folder">
|
|
<span>
|
|
<i class="fa fa-folder"></i> <input type="text" class="form-control {{ vm.hideFolderInput }}" ng-model="vm.folderName" ng-blur="vm.createNewFolder(r);" style="width: 85%;"/>
|
|
<label>{{ vm.autoPopulateWebPath }}</label>
|
|
</span>
|
|
</li>
|
|
<li class="text-center">
|
|
<input type="file" ng-model="r.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(r)" />
|
|
<div ng-if="r.isZip"><label><input type="checkbox" ng-model="r.unzip" /> Unpack .zip</label></div>
|
|
<div ng-if="r.unzip"><label><input type="checkbox" ng-model="r.stripZip" /> Strip zip directory root</label></div>
|
|
<!-- div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div -->
|
|
<div ng-if="r.uploadTotal"><span ng-bind="r.uploadPercent">99</span>% | <span ng-bind="r.uploadProgress">1</span> MiB / <span ng-bind="r.uploadTotal">100</span> MiB</div>
|
|
</li>
|
|
<li>
|
|
<button ng-click="vm.Sites.upload(r)" type="button" name="button" class="btn btn-success">Add File</button>
|
|
</li>
|
|
</ul>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<pre style="font-size: 10px;">
|
|
<div class="text-center {{ vm.displaySpinner }}">
|
|
<i class="fa fa-spinner fa-spin fa-5x"></i>
|
|
</div>
|
|
{{ vm.folderStructure | stringify }}
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="padding-side-15">
|
|
<button ng-if="r.shareAccess.write" type="button" class="btn btn-danger pull-right" ng-click="vm.removeAllFiles(r, opts)"><i class="fa fa-trash"></i> Remove all Files</button>
|
|
</div>
|
|
</div>
|
|
</div>
|