{% extends 'base.html' %} {% block content %} {% if book['thumbnail'] %} cover for {{ book['Title'] }} {% else %}

{% block title %} {{ book['Title'] or resource['name'] }} {% endblock %}

{% endif %} {% if current_user.is_authenticated %}
Edit
{% endif %}
{% if book %} {% if book['Title'] %} {% endif %} {% if book['Authors'] %} {% if book['Authors']|length > 1 %} {% else %} {% endif %} {% endif %} {% if book['ISBN-13'] %} {% endif %} {% if book['Year'] %} {% endif %} {% if book['Publisher'] %} {% endif %} {% if book['desc'] %} {% endif %} {% else %} {% if resource['name'] %} {% endif %} {% if resource['author'] %} {% endif %} {% endif %}
Title: {{ book['Title'] }}
Authors: {% for author in book['Authors'] %} {{ author }} {% endfor %} Author: {% for author in book['Authors'] %} {{ author }} {% endfor %}
ISBN-13: {{ book['ISBN-13'] }}
Publication year: {{ book['Year'] }}
Publisher: {{ book['Publisher'] }}
Summary: {{ book['desc'] }}
Title: {{ resource['name'] }}
Author: {{ resource['author'] }}
{% if relationships %}

Linked resources:

{% for relationship in relationships %}
{% if relationship['type'] == 'tool' %}

{{ relationship['name'] }}

{{ relationship['description']|truncate(100) }}

{% elif relationship['type'] == 'practice' %}

{{ relationship['name'] }}

{{ relationship['description']|truncate(100) }}

{% elif relationship['type'] == 'book' %}

{{ relationship['name'] }}

{{ relationship['description']|truncate(100) }}

{% endif %}
{% endfor %}
{% endif %} {% endblock %}