{% extends 'base.html' %} {% load custom_tags_and_filters %} {% block title %}{{ resource }}{% endblock %} {% block content %}
{% url 'modify_resource' resource.id as modify_resource_url %} {% button type="edit" value="Modify availability" url=modify_resource_url %}
{% url 'schedule_resource_outage' resource.id as resource_outage_url %} {% button type="delete" value="Schedule outage" icon="glyphicon-time" url=resource_outage_url %}

{{ resource }} {% if resource.category %}({{ resource.category }}{% endif %} )

This resource is {% if resource.available %}available.{% endif %} {% if not resource.available %} unavailable for the following reason: {% endif %} {% if outages %}

Scheduled outages:

{% for o in outages %}
{% csrf_token %}
{{ o.title }}
{% if o.category %} Outage category: {{ o.category }}
{% endif %} Starts on {{ o.start }}
Ends on {{ o.end }}
{{ o.details }}
{% endfor %}
{% endif %} {% if resource.visible_fully_dependent_tools %}

Tools that fully depend on {{ resource }}

{% else %}

No tools fully depend on {{ resource }}

{% endif %} {% if resource.visible_partially_dependent_tools %}

Tools that partially depend on {{ resource }}

{% else %}

No tools partially depend on {{ resource }}

{% endif %} {% if resource.dependent_areas.all %}

Areas that depend on {{ resource }}

{% else %}

No areas depend on {{ resource }}

{% endif %} {% endblock %}