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>
search: fix query string in add-to-search

* Adds double quotes around author and title value. (closes #2251)

* Splits terms by whitespace or quotes and join them
  with proper operator. (addresses #2252)

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Adrian Pawel Baran <adrian.pawel.baran@cern.ch>
OAIHarvest: workflows in admin

* Adds the workflows colomn in the legacy admin interface.

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

* Adds initial upgrade script from Invenio v1.x for oaiharvester module.

* Updates the workflows column with default and `NOT NULL`.

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

* NOTE Adds default workflows and tasks for OAI harvesting which
  is now required to run OAI harvest. A working Celery worker is
  also necessary to run harvests.

* NOTE Moves harvesting specific tasks, tests and workflows from
  workflows module to oaiharvester module. If you have used any of
  these tasks or workflows in your workflow configuration you need
  to amend your imports.

* Adds warnings and help messages on OAI Admin display.

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

* Updates the tasks to use the correct field name
  "system_control_number".

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