{% for p in projects %}
{% set status = p['status'] %}
{% if is_manager or status != 'disabled' %}
{% set color = 'black' if status == 'active' else 'gray' %}
{{ macros.project(p) }}
{% if p.user_can_edit %}
{% endif %}
{% if current_user.can_delete_project(p) %}
{% endif %}
{{ p.last_update_date|pretty_datetime }} by {{ p.last_update_user.name }}
{% set pi = p.user.get_pi() %}
{% set apps = pi.get_applications() if pi else [] %}
{% set app = ' / %s'|format(apps[0].code) if apps and show_application else '' %}