{% macro relationships_links(relationships) %} {% if relationships %} {% for relationship in relationships %} {{ resource_lead(relationship)}} {% endfor %} {% endif %} {% endmacro %} {% macro book_with_related(resource, loop, relationships, pre_title='', post_title='Related') %}
{% if pre_title == '' %}

{{loop.index}} / {{count}}

{% else %}

{{ pre_title }}

{% endif %}
{{ resource_lead(resource) }}
{{ post_title }}
{% if resource['name'] != 'practice' %}
Related practices
{% endif %} {% for relationship in relationships %}
{{ resource_lead(relationship) }}
{% endfor %}
{% endmacro %} {% macro resource_with_related(resource, loop, pre_title='', post_title='Related') %}
{% if pre_title == '' %}

{{loop.index}} / {{count}}

{% else %}

{{ pre_title }}

{% endif %}
{{ resource_lead(resource) }}
{{ post_title }}
{% if resource['name'] != 'practice' %}
Related practices
{% endif %}
{{ resource_lead(resource) }}

Collaborative writing

{{ resource_lead(resource) }}
{{ resource_lead(resource) }}
{% endmacro %} {% macro popup_link(title,url) %} {{ title }} {% endmacro %} {% macro resource_lead(resource) %}
{% if (resource['type'] == 'book') %} cover for {{ resource['name'] }} {% endif %}

{{ resource['name'] }}

{% if resource['year'] %}
{{ resource['year'] }}{% if resource['author'] %}, {{ resource['author'] }}{% endif%}
{% endif %}
{{ resource['description'] | truncate(150) }}
{% if current_user.is_authenticated %}
{% if resource['type'] == 'tool' %} Edit {% elif resource['type'] == 'practice' %} Edit {% elif resource['type'] == 'book' %} Edit {% endif %}
{% endif %}
{% endmacro %} {{ moment.include_moment() }} ExPub Compendium
{% with messages = get_flashed_messages() %} {% if messages %}
{{ messages[0] }}
{% endif %} {% endwith %} {% block content %} {% endblock %}