-
Notifications
You must be signed in to change notification settings - Fork 4
[CITE-162] Implemented a new View Modal for Giles uploaded and Extracted #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
Make it so, Jenkins. |
Jenkins successfully deployed Citesphere to be reviewed! |
Addressed review comments |
Jenkins successfully deployed Citesphere to be reviewed! |
|
||
ICitation citation = citationManager.getCitation(itemId); | ||
Optional<IGilesUpload> uploadOptional = citation.getGilesUploads().stream().filter(u -> u.getUploadedFile() != null).filter(g -> g.getUploadedFile().getId().equals(fileId)).findFirst(); | ||
Optional<IGilesUpload> uploadOptional = citation.getGilesUploads().stream().filter(u -> u.getUploadedFile() != null).filter(g -> g.getUploadedFile().getId().equals(fileId) || g.getExtractedText().getId().equals(fileId) || g.getPages().stream().filter(p -> p!=null).anyMatch(a -> a.getImage().getId().equals(fileId) || a.getText().getId().equals(fileId) || a.getOcr().getId().equals(fileId) || a.getAdditionalFiles().stream().filter(f -> f!=null).anyMatch(f -> f.getId().equals(fileId)))).findFirst(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the minimum this line needs to be reformatted (it's way too long). Even better would be to rewrite it so it's clearer what it does.
Make it so, Jenkins. |
Jenkins successfully deployed Citesphere to be reviewed! |
On the front end, the module should have the structure:
etc. |
Jenkins successfully deployed Citesphere to be reviewed! |
} | ||
|
||
|
||
private static Stream<IGilesFile> generateStream(List<IGilesUpload> uploadOptionalList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this method static?
$("#viewUploadBody modal-body page-title").empty(); | ||
$("#viewUploadBody modal-body page-list").empty(); | ||
}); */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete if not needed
/* $(uploadItem).children().each(function() { | ||
// Clear content of each child element | ||
$('#page-list').empty(); | ||
}); */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete if not needed
function showFiles(modalName, item) { | ||
|
||
var uploadItem = $(item); | ||
var modalNameLCase = modalName.toLowerCase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
</div> | ||
</div> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all of these can be simplified by just creating a model for each upload and then show/hide those modals when the user clicks on an upload in the list. There is not javascript really needed (beyond opening/closing the modal).
Jenkins successfully deployed Citesphere to be reviewed! |
Files
Guidelines for Pull Requests
If you haven't yet read our code review guidelines, please do so, You can find them here.
Please confirm the following by adding an x for each item (turn
[ ]
into[x]
).Please provide a brief description of your ticket
(you can copy the ticket if it hasn't changed)
Right now, if a user has uploaded a file to Citesphere, they can download the originally uploaded file. However, all the files that Giles creates (extracted text, OCR, individual pages) can't be downloaded. Basically, the user should be able to do that. Maybe a new modal opens or a new page if the user clicks on a file and it shows all the files that belong to the upload. The user can then choose a file to download.
Anything else the reviewer needs to know?
... describe here ...