{% with tool.get_current_usage_event as current_usage_event %}
{% if current_usage_event.operator.id == customer.id %}
You are using this tool
{% else %}
{{ current_usage_event.operator }} is using this tool
{% endif %}
{% if current_usage_event.operator.id != current_usage_event.user.id %}
on behalf of {{ current_usage_event.user }}
{% endif %}
for the project named {{ current_usage_event.project.name }} since {{ current_usage_event.start }}.
{% endwith %}
{% if tool.in_use %}
{% if customer.is_staff or customer.is_user_office %}
{% endif %}
{% endif %}
{% elif tool.delayed_logoff_in_progress %}
{% with tool.get_delayed_logoff_usage_event as delayed_logoff_event %}
{{ delayed_logoff_event.operator }} has finished using the {{ tool.name_or_child_in_use_name }} but delayed logoff is in effect. The tool will be available at {{ delayed_logoff_event.end|time }}.
{% endwith %}
{% elif not tool.operational or tool.required_resource_is_unavailable or tool.scheduled_outages %}
{% if t.problem_category %}{{ t.problem_category }}{% endif %}
{{ t.problem_description }}
{% if t.estimated_resolution_time %}
Estimated resolution time is {{ t.estimated_resolution_time }}.
{% endif %}
This task was created by {{ t.creator }} on {{ t.creation_time }}.
{% if t.force_shutdown %}The tool will remain shut down until this task is resolved.{% endif %}
{% if t.progress_description %}