legacy: bibrecord scripts move

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
legacy: fix for run_sql import in bibrecord

* Addresses issue with imports outside application context.
  (closes #2295)

* Amends imports from `invenio.legacy.bibrecord.scripts`.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
mixer: dump database fixes

* Adds new command `inveniomanage database dump` to allow dumping the
  content of the database using the mixer.

* Fixes imports and trailing white spaces on json dump.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
search: tuning of hierarchical facet

Tested-by: Tibor Simko <tibor.simko@cern.ch>
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
search: quickfix pagination troubles with facets

* Fixes problem with ignoring pagination options while using facets.
  (closes #2306) (PR #2308)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
search: quick fix for queries with leading space

* Strips leading/trailing white space from `p` argument to `/search`.
  This quick-fixes queries like `/search?p=+ellis` that were otherwise
  leading to "Showing records 1 to 0 out of 0 results" situations.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
base: admin drop-down menu fix

* Removes the drop-down menu from the "Admin" tab in page header.
  (addresses #2246)

Signed-off-by: Eirini Psallida <eirini.psallida@cern.ch>
jsonalchemy: dumps with specified keywords

* Adds an option to dump only specified keys from dictionary.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
search: fix filtered output format

* Addresses issue with research and export that not accept the "ot"
  filter argument.  (closes #2292)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
principal: raise 401 on authorization failure

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: object navigation

* Adds buttons for going to previous/next object from the main table
  in the Holding Pen detailed display. The previous/next functionality
  is based from the state of the main table order.

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

* Uses static function to create `BibWorkflowObject` instead of
  instantiating directly in `start_workflows()` function.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
workflows: update of MARC views

* Updates the HTML, RAW and MARC views in the details page.

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: detailed workflow task list

* Calculates the path of tasks that workflow has
  followed and represents it on Holding Pen detailed record display
  with different colors for completed, current and remaining tasks.

* Task names to display are chosen from the description attributes
  of the task, if not present from the first line of the docstring,
  if still not present, the function name is finally used.

* Adds a decorator to pass the attributes (docstring, name) of a
  function to its closure.

Tested-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: PEP8 fixes

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: signals addition

* Adds signals to workflows for when a workflow is started, halted
  and finished.

Reviewed-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: classifier task result addition

* Adds task result template for classifier/BibClassify to show
  extracted keywords etc. in Holding Pen.

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: task history fix

* Fixes a problem with an exception happening when loading the
  task history when workflow no longer exists.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: formatted data from model

* Moves the logic of properly formatting and escaping the data
  from the BibWorkflowObject in Holding Pen from the blueprint
  to the model.

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

* Simplifies and updates the task result template of classifier
  to follow template guidelines.

* Updates the full_doc_process workflow to run classifier task.

* Fixes the look-up of system numbers in quick_match_record task
  to the correct one.

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