Skip to content

Commit

Permalink
self-checkout: add new template
Browse files Browse the repository at this point in the history
* closes #927
  • Loading branch information
ntarocco committed Nov 19, 2024
1 parent 9404034 commit 4cdbc8f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
13 changes: 13 additions & 0 deletions cds_ils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ def query_params_modifier(extra_params):
"request_no_items": "cds_request_no_items.html",
"checkin": "cds_checkin.html",
"checkout": "cds_checkout.html",
"self_checkout": "cds_self_checkout.html",
"extend": "cds_extend.html",
"overdue_reminder": "cds_overdue_reminder.html",
"expiring_reminder": "cds_will_expire_in_reminder.html",
Expand Down Expand Up @@ -625,6 +626,12 @@ def query_params_modifier(extra_params):
transition=ILSToItemOnLoan,
permission_factory=loan_checkout_permission,
),
dict(
dest="ITEM_ON_LOAN",
trigger="self_checkout",
transition=ILSToItemOnLoan,
permission_factory=authenticated_user_permission,
),
],
"PENDING": [
dict(
Expand All @@ -633,6 +640,12 @@ def query_params_modifier(extra_params):
transition=ILSToItemOnLoan,
permission_factory=backoffice_permission,
),
dict(
dest="ITEM_ON_LOAN",
trigger="self_checkout",
transition=ILSToItemOnLoan,
permission_factory=authenticated_user_permission,
),
dict(
dest="CANCELLED",
trigger="cancel",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% block title %}
CERN Library: loan started for "{{ document.title|safe }}"
{% endblock %}

{% block body_plain %}
Dear {{ patron.name }},

Your self-checkout loan for "{{ document.full_title }}" <{{ spa_routes.HOST }}{{ spa_routes.PATHS['literature']|format(pid=document.pid) }}> has started.

The due date is {{ loan.end_date }}.
{% endblock %}

{% block body_html %}
Dear {{ patron.name }}, <br/><br/>

Your self-checkout loan for <a href="{{ spa_routes.HOST }}{{ spa_routes.PATHS['literature']|format(pid=document.pid) }}">"{{ document.full_title }}"</a> has <b>started</b>. <br/><br/>

<br/><br/>
The due date is <b>{{ loan.end_date }}</b>.
{% endblock %}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ zip_safe = False
install_requires =
fuzzywuzzy>=0.18.0
python-ldap>=3.4.0,<3.5.0
invenio-app-ils[lorem,opensearch2]==4.2.0
invenio-app-ils[lorem,opensearch2]==4.3.0
sentry-sdk>=0.10.2
# migrator deps
cds-dojson==0.9.0
Expand Down

0 comments on commit 4cdbc8f

Please sign in to comment.