only render this new button when the file set is a PDF
[x] Create a decorator for the Hyrax::FileSetsController with the split_pdf action
When the FileSet is not a PDF raise an exception (e.g. FileSet is expected to be a PDF) (Note: We'll want this in cases where the above conditional failed and yet here we are. The exception will report to Sentry)
When the FileSet is a PDF we want to spawn a job to perform the splitting
[x] Add a route that POSTs to the newly created action; you'll likely need that route to have a :id parameter so that the decorator will properly behave.
[x] Add to Adventist (updating routes)
Considerations
(Jeremy here): I had thought about creating a separate controller, to avoid the decorator pattern. That separate controller would be IiifPrint::PdfSplitsController. The action would be create and follow the above guidance. Advantages would be keeping the controller space clear.
I have several projects located on my machine; and it looks as though we have not overriden the file_sets behavior. See details:
Summary
LaRita has a WIP PR that covers the backend work required for this feature ๐ (this has not been tested yet).
We need to create a frontend button or interface, on a PDF fileset, that would trigger the backend behavior.
consider user permissions - the user should be able to edit.
Before starting, ask Jeremy for notes
Tasks
if @presenter.editor? ...
block)Hyrax::FileSetsController
with thesplit_pdf
action:id
parameter so that the decorator will properly behave.Considerations
(Jeremy here): I had thought about creating a separate controller, to avoid the decorator pattern. That separate controller would be
IiifPrint::PdfSplitsController
. The action would becreate
and follow the above guidance. Advantages would be keeping the controller space clear.I have several projects located on my machine; and it looks as though we have not overriden the file_sets behavior. See details:
Acceptance Criteria