oauthclient: authorize url fix

* Changes authorize url to redirect to login form instead of register.
  (closes #2487)

* Moves imports inside functions.

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: template naming fix

* Removes the hp prefix from holdingpen templates.

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
jsonalchemy: validation fixes

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
uploader: typos fixes

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
records: better PID list

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
uploader: files to link addition

* Adds new option for linking files with record via custom FFL MARC
  field.

* Adds `legacy` step to uploader insert worflow for filling-up "bibxxx"
  tables.  (addresses #1772)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
previewer: addition of support for Documents

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
uploader: support for relative document paths

* Allows specifying relative paths in FFT tags.  (closes #1191)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
workflows: snapshot generation fix

* Fixes the generation of snapshots to take into consideration
  the new ObjectVersion's ERROR and WAITING.

* Adds a new test to cover this issue.

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

* Improves the splitting of records from OAI-PMH requests to also
  handle the case of MARCXML from other Invenio instances.

* Defers the splitting logic to a XML parser and moves some utility
  functions to a new utils file in the new module structure.

* Adds tests for these utility functions.

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

* Fixes the file serving used in Holding Pen details pages
  to also serve files that were automatically prefixed with
  uuid's.

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

* Properly checks if tags parameter is of string type.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
collect: addition of sorting filter

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
uploader: initial manage command implementation

* Adds basic `inveniomanage uplaoder insert -f FILE` command.
  (addresses #1772)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
sqlalchemy: fix mysql index creation

* Fixes checking of Text type supporting the case of NullType
  column type.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
groups: port missing functionality

* Adds implementation of user group manage function.

* Adds filter on list of group that user can join.
  (closes #1788)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
general: WTForms 2 compatibility fixes

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
base: bundle less filename correction

* Corrects the less JS bundle filename to avoid causing a file
  not found error for this file while building assets.

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

* Creates a new `record.tabs` menu using Flask-Menu.

* Adds the `visible_when` attribute and the `count` keyword argument.

* Amends the main `record` template.

* Uses Flask-Cache to memoize the function for finding
  the `visible tabs`.

* Upgrades Flask-Breadcrumbs and Flask-Menu to 0.2 version.
  (closes #1646)

Signed-off-by: Eirini Psallida <eirini.psallida@cern.ch>
sqlalchemy: default mysql parameters for db.Table

* Adds default parameters to `db.Table` constructor to force MyISAM
  engine for MySQL backend. db.Table is InnoDB by default on modern
  versions of MySQL. Hence, foreign keys can now be set on
  `db.Model` fields because both are using MyISAM as an engine.
  (closes #2491)

Signed-off-by: Artem Tsikiridis <artem.tsikiridis@cern.ch>
Reviewed-by: Gilles Louppe <gilles.louppe@cern.ch>