workflows: Holding Pen change

* Adds new BibClassify workflow task for faster execution, taking
  only title and abstract from the document instead the full document.

* Now saves the BibWorkflowObject after removing the action.

Tested-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Guillaume Lastecoueres <PX9e@gmx.fr>
workflows: detailed display update

* Properly sets error messages upon unexpected errors during
  workflow execution.

* Integrates the error messages into the Holding Pen detailed
  view of an object as a panel.

* Changes wells to panels in the record detailed display.

* Adds integration of tasks results into the object model and
  detailed display.

* Tags filtering now keeps the tags when user updates the page by
  using session.

* Updates tags placeholder text.

* Refactors the quick_match_record() function with focus on
  clean code.

* Fixes the bundles to properly import DataTables static files.

* Changes from sqlalchemy._or to db._or.

* PEP8/257 updates.

Reported-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Co-authored-by: Guillaume Lastecoueres <PX9e@gmx.fr>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: Holding Pen table speed upgrade

* Reduces the number of ajax requests triggered in Holding Pen
  interface.

* Adds WorkflowBase class that define the basic function
  a workflow needs to render correctly its processed
  objects.

* Upgrades Holding Pen to print correctly the changes.

* Adds the functions needed to the basic workflows.

* Adds task results to workflows management functions
  for updating progress bar in Holding Pen.

* Moves brief formatting to the workflow instead of
  the BibWorkflowObjects to allow everybody to choose
  their way to format them.

* Various fixes to Holding Pen JavaScript.

Tested-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
workflows: Holding Pen tags and pagination

* Also adds Holding Pen main table pagination on top of the
  table in addition to the bottom one.

* Amends Holding Pen main table to properly show all
  records when all tags are removed.

* Fixes a problem with Holding Pen main table display when
  sessions are cleared.

* Changes the methods get_description, get_title and formatter
  to static and BibWorkflowObject argument names.

* Adds WorkflowBase inheritance in marcxml_workflow
  and sample_workflow.

* PEP8 fixes.

Co-authored-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: actions as templates

* Removes the tight coupling to WTForms when designing UI widgets
  for actions in the Holding Pen. Now jinja2 templating can be
  used to render the action instead.

* Removes the need to dynamically load the actions js files.

* Updates the sample "approval" action to use jinja2 templating
  and simplifies the accompanying js file.

* Removes much unused or unnecessary code including unfinished
  actions and the few defined WTForms fields that are no longer
  in use.

* Updates the Holding Pen page structure to be simpler as a result
  of merging the /actions and /details pages into one page (details).

* Updates bundles and templates to work properly with DataTables
  and actions.

* Adds a delayed option to BibWorkflowObject functions to
  start and continue workflows asynchronously.

Co-authored-by: Guillaume Lastecoueres <PX9e@gmx.fr>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: record loading optimization

* Reduces complexity of the code.

* Improves general performance of record loading in Holding Pen.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
workflows: blueprint code update

* Moves some functions away from Holding Pen blueprint to
  utils (pending future separation from workflows into a
  new holding pen module).

* Optimizes some error-prone code to get the workflow
  definitions when trying to fetch formatted data from
  the object.

* Removes lots of unused/old code.

* Performs some PEP8/257 updates.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: Holding Pen search cache

* Implements caching for fast search and sorting in Holding Pen.

* Adds back support for workflows not inheriting from WorkflowsBase
  in Holding Pen.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
workflows: remove view test

* Removes the view test as it does not test anything as the
  page requires login and it has different behavior if DEBUG
  mode is available and thus fails (200 vs 401). This can create
  confusion when developing.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: engine API additions

* Adds some useful properties to BibWorkflowEngine to get
  objects from the workflow.

* Removes leftover comment in details template.

* PEP8 update.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: removal of vendor files

* Removes unneeded vendor files from repo to be served
  by bower/grunt instead.

Co-authored-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: documentation addition

* Adds better module documentation on how to use workflows.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: Holding Pen cache update

* Changes usage of Redis to use invenio.ext.cache to conform
  with cache usage elsewhere in Invenio.

* Removes duplicate code and restructures code with focus on
  clean code.

* Adds a new get_workflow_name() function to BibWorkflowObject.

* Changes the __all__ variable to a tuple.

* Updates bundles to remove unused and duplicate JS.

* Adds missing dataTables import in main table template.

* Simplifies the tags session handling.

* Fixes `BibWorkflowObject.add_task_results` calls outside workflows.

Reported-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: add_task_results hotfix

* Hotfixes BibWorkflowObject.add_task_results() that caused a test
  to fail.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
deposit: fix init plupload arguments

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
workflows: cascading deletion

* NOTE Adds cascading deletion of BibWorkflowObjects and logs when
  deleting a Workflow.

* Takes advantage of the cascading deletes in test tearDown
  functions - removing the unneeded test_teardown() function.

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
base: global index run during demo site population

* Adds missing global indexing process that must be run
  during demo site population.  This is necessary after
  the merge of the virtual index facility from master.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
deposit: fix plupload config usage

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
multimedia: image: API

* Introduces image API with `resize`, `crop`, `rotate`, `format` and `quality`
  functionality.

* Introduces image cache object via redis.

* API testsuite.

Signed-off-by: Harris Tzovanakis <drjova@cern.ch>
multimedia: image: IIIF Image API

* Implements the IIIF Image API.

* NOTE: For more info please read <http://iiif.io/api/image/2.0/>

Signed-off-by: Harris Tzovanakis <drjova@cern.ch>