Skip to content

Commit e2dec45

Browse files
committed
search: fix broken collection search page
* Removes specific view and templates for collection search and use the the general public search view and templates. Co-Authored-by: Johnny Mariéthoz <[email protected]>
1 parent 3c9b22d commit e2dec45

File tree

3 files changed

+3
-49
lines changed

3 files changed

+3
-49
lines changed

rero_ils/config.py

-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ def _(x):
157157
SECURITY_FORGOT_PASSWORD_TEMPLATE = 'rero_ils/forgot_password.html'
158158
SECURITY_RESET_PASSWORD_TEMPLATE = 'rero_ils/reset_password.html'
159159
RERO_ILS_SEARCH_TEMPLATE = 'rero_ils/search.html'
160-
RERO_ILS_COLLECTIONS_TEMPLATE = 'rero_ils/collections.html'
161160

162161
# Theme configuration
163162
# ===================

rero_ils/theme/templates/rero_ils/collections.html

-37
This file was deleted.

rero_ils/theme/views.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,12 @@ def init_menu_tools():
112112
item = current_menu.submenu('main.tool.collections')
113113
rero_register(
114114
item,
115-
endpoint='rero_ils.collections',
115+
endpoint='rero_ils.search',
116116
endpoint_arguments_constructor=lambda: dict(
117117
viewcode=request.view_args.get(
118118
'viewcode', current_app.config.get(
119-
'RERO_ILS_SEARCH_GLOBAL_VIEW_CODE'))
119+
'RERO_ILS_SEARCH_GLOBAL_VIEW_CODE')),
120+
recordType='collections'
120121
),
121122
visible_when=lambda: current_app.config.get(
122123
'RERO_ILS_SEARCH_GLOBAL_VIEW_CODE'
@@ -395,15 +396,6 @@ def search(viewcode, recordType):
395396
viewcode=viewcode)
396397

397398

398-
@blueprint.route('/<string:viewcode>/search/collections')
399-
@check_organisation_viewcode
400-
def collections(viewcode):
401-
"""Collections page ui."""
402-
return render_template(current_app.config.get(
403-
'RERO_ILS_COLLECTIONS_TEMPLATE'
404-
), viewcode=viewcode)
405-
406-
407399
@blueprint.app_template_filter()
408400
def nl2br(string):
409401
r"""Replace \n to <br>."""

0 commit comments

Comments
 (0)