{% from "components/empty_state.html" import EmptyState %} {% from "components/icon.html" import Icon %} {% from "components/sticky_cta.html" import StickyCTA %} {% extends "portfolios/base.html" %} {% block portfolio_content %} {% macro ViewLink(task_order) %} View {{ Icon("caret_right", classes="icon--tiny") }} {% endmacro %} {% macro TaskOrderDate(task_order) %} {% if task_order.is_active %} Began {{ task_order.start_date }}   |   Ends {{ task_order.end_date }} {% elif task_order.is_expired %} Started {{ task_order.start_date }}   |   Ended {{ task_order.end_date }} {% else %} Started {{ task_order.start_date }} {% endif %} {% endmacro %} {% macro TaskOrderList(task_orders, label='success') %}
{% for task_order in task_orders %}
{{ task_order.display_status }} {{ TaskOrderDate(task_order) }}

Task Order {{ task_order.number }}

This is a TO description. This is a TO description. This is a TO description. This is a TO description. This is a TO description. This is a TO description.
{% endfor %}
{% endmacro %}
{% call StickyCTA(text="Funding") %}
Start a new task order
{% endcall %} {% if not active_task_orders and not pending_task_orders %} {{ EmptyState( 'This portfolio doesn’t have any active or pending task orders.', action_label='Add a New Task Order', action_href=url_for('task_orders.edit', portfolio_id=portfolio.id), icon='cloud', ) }} {% endif %} {% if pending_task_orders %} {{ TaskOrderList(pending_task_orders, label='warning') }} {% endif %} {% if active_task_orders %} {{ TaskOrderList(active_task_orders, label='success') }} {% endif %} {% if expired_task_orders %} {{ TaskOrderList(expired_task_orders, label='error') }} {% endif %}
{% endblock %}