1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-22 14:11:39 +00:00

Closes #201: reprocess file manually

This commit is contained in:
Benjamin Gamard
2018-03-29 11:34:25 +02:00
parent 0409c2ef79
commit 899f13cb35
16 changed files with 243 additions and 90 deletions

View File

@@ -157,4 +157,13 @@ angular.module('docs').controller('DocumentViewContent', function ($scope, $root
})
});
};
/**
* Process a file.
*/
$scope.processFile = function (file) {
Restangular.one('file/' + file.id).post('process').then(function () {
file.processing = true;
});
};
});

View File

@@ -115,7 +115,8 @@
"upload_error_quota": "Quota reached",
"drop_zone": "Drag & drop files here to upload",
"add_files": "Add files",
"file_processing_indicator": "This file is being processed. Searching will not be available before it is complete."
"file_processing_indicator": "This file is being processed. Searching will not be available before it is complete.",
"reprocess_file": "Reprocess this file"
},
"workflow": {
"workflow": "Workflow",

View File

@@ -72,6 +72,10 @@
<span class="fas fa-pencil-alt"></span>
{{ 'rename' | translate }}
</a>
<a href ng-click="processFile(file)">
<span class="fas fa-eye"></span>
{{ 'document.view.content.reprocess_file' | translate }}
</a>
<a href ng-click="deleteFile(file)">
<span class="fas fa-trash"></span>
{{ 'delete' | translate }}