2020-10-31 17:18:56 -04:00
|
|
|
{% load fr_display %}
|
2020-11-02 14:46:23 -05:00
|
|
|
{% with book.id|uuid as uuid %}
|
2020-10-31 17:18:56 -04:00
|
|
|
{% with book|book_description as full %}
|
2020-11-01 15:09:39 -05:00
|
|
|
{% if full %}
|
2020-10-31 17:18:56 -04:00
|
|
|
{% with full|text_overflow as trimmed %}
|
|
|
|
{% if trimmed != full %}
|
|
|
|
<div>
|
2020-11-02 14:46:23 -05:00
|
|
|
<input type="radio" name="show-hide-{{ book.id }}-{{ uuid }}" id="show-{{ book.id }}-{{ uuid }}" class="toggle-control" checked>
|
2020-10-31 17:18:56 -04:00
|
|
|
<blockquote class="content toggle-content hidden">{{ trimmed }}
|
2020-11-09 19:28:38 -05:00
|
|
|
<label class="button is-small" for="hide-{{ book.id }}-{{ uuid }}"><div role="button" tabindex="0">show more</div></label>
|
2020-11-09 19:16:57 -05:00
|
|
|
</blockquote>
|
2020-10-31 17:18:56 -04:00
|
|
|
</div>
|
|
|
|
<div>
|
2020-11-02 14:46:23 -05:00
|
|
|
<input type="radio" name="show-hide-{{ book.id }}-{{ uuid }}" id="hide-{{ book.id }}-{{ uuid }}" class="toggle-control">
|
2020-10-31 17:18:56 -04:00
|
|
|
<blockquote class="content toggle-content hidden">{{ full }}
|
2020-11-09 19:28:38 -05:00
|
|
|
<label class="button is-small" for="show-{{ book.id }}-{{ uuid }}"><div role="button" tabindex="0">show less</div></label>
|
2020-11-09 19:16:57 -05:00
|
|
|
</blockquote>
|
2020-10-31 17:18:56 -04:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<blockquote class="content">{{ full }}
|
|
|
|
</blockquote>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2020-11-01 15:09:39 -05:00
|
|
|
{% endif %}
|
2020-10-31 17:18:56 -04:00
|
|
|
{% endwith %}
|
2020-11-02 14:46:23 -05:00
|
|
|
{% endwith %}
|