Skip to content

Commit

Permalink
patrons: fix document title in the fees tab
Browse files Browse the repository at this point in the history
In the 'fees' tab of the patron account, sometimes the document title
linked to a fee is not displayed. This commit improves the management of
document title using the general function `create_title_text`, which is
already used to display the document title on the document detailed
view.

Closes #1543.

Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
  • Loading branch information
zannkukai committed Dec 9, 2020
1 parent 7f5e0ff commit 94e396a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions rero_ils/modules/patrons/templates/rero_ils/_macro_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,11 @@ <h6>{{ _('Details') }}</h6>
<b>{{ _('Document') }}</b>
</div>
<div class="col-lg-10 col-sm-10">
{% if fee.document.title and fee.document.title | count == 1 %}
{% if fee.document.title %}
<a
id="document-{{ fee.document.pid }}"
href="{{ url_for('invenio_records_ui.doc', viewcode=viewcode, pid_value=fee.document.pid) }}"
>
{% if fee.document.title[0].mainTitle and fee.document.title[0].mainTitle[0].value %}
{{ fee.document.title[0].mainTitle[0].value }}
{% endif %}
{% if fee.document.title[0].subtitle and fee.document.title[0].subtitle[0].value %}
{{ fee.document.title[0].subtitle[0].value }}
{% endif %}
</a>
>{{ fee.document.title | create_title_text }}</a>
{% endif %}
</div>
</div>
Expand Down

0 comments on commit 94e396a

Please sign in to comment.