jinja2utils: application template filters

* Moves loading of Jinja2 filters from application factory to
  jinja2utils for better readablity.

Co-authored-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: fix Jinja2 context

* Fixes problems with loading Jinja2 context when using Flask global
  proxy variable (`g.*`).

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebAccess: fix firerole uid test

* Fixes issue when checking firerole for guest user with uid == 0
  instead of -1.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebSession: fix guest user uid in current_user

* Fixes issue with current_user uid introduced in b21c9d7 that prevented
  user to see record files as guest user.

Reported-by: Raquel Jimenez Encinar <raquel.jimenez.encinar@cern.ch>
Reported-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
messages: fix unit test imports

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibFormat: skipping BFOs with only XSL stylesheets

* Improves `inveniomanage bibformat bft2tpl` hence if some output formats
  do not need to be convereted then they are skipped.  (closes #1470)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
installation: initial apache manager release

* DEPRECATED: `inveniocfg --create-apache-conf` will be removed and
  currently it uses `inveniomanage apache create_conf`.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
installation: fix database commands create & drop

* Adds information progress of database creation and drop.
  (addresses #1283)

* Fixes problems with imports in models and blueprints.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
installation: inveniocfg create/drop db depretated

* Warns user to use `inveniomanage database {create, drop}` instead of
 `inveniocfg --drop-tables --create-tables`.  (closes #1283)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
SQLAlchemy: MarshalBinary and import fixes

* Fixes issues with database models import.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebSearch: temporary move js script on top

* Addresses problems with legacy bibformat elements that include
  javascript libraries dependent on JQuery. In order to avoid this
  problem it is recomended to run `inveniomanage bibformat bft2tpl` and
  replace all <script src="..."> tags with {% js '...' %}. Eventually
  move all javascript code in script blocks to individual files to
  enable script bundling in assets.

* FIXME remove this commit when all bibformat templates and elements are
  ported and using {% js ... %}.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebSearch: faceted results order fix

* Quickly fixes order of faceted search results.  (addresses #1352)

* Improves speed of loading websearch blueprint by moving facet plugins
  discovery to before_first_app_request handler.

* TODO improve perform_request_search to return intbitset with results
  and eventually raise exception when nothing is found with near search
  terms.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebSearch: url `of` argument quickfix

* Addresses issue with badly generated nearest term links pointing wrong
  output format type.  (addresses #1473)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: menu rendering improvement

* Introduces new top level menu `personalize` for user related items.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: fix legacy publisher form dictionary

* Fixes issue with parsing url arguments to dictionary:
  ?a=1&b=2&b=3 -> {'a':1, b: [2,3]}.  (closes #1474)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Flask-Cache: version upgrade to 0.11.1

* Updates required version of Flask-Cache package to 0.11.1.

* Removes temporary DynCache extension that it is already in
  Flask-Cache package.
BibFormat: bft2tpl match template option addition

* Adds `-t`, `--template` options than tries to match reqular expression
  of template name and runs conversion of only these 'bft' templates.
WebMessage: fix javascript block
jinja2utils: named bundles generation

* Adds option for grouping javascript and style sheet files.

* Please update your custom templates if you use {% js ... %} or
  {% css ... %} or {{ ... get_(css|js)_bundle() }} according to
  documentation and you want to use this grouping feature.
WebSearch: collection template addition

* Addresses issue with customization templates for '/collection'
  pages that are different from index page ('/').

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>