{% extends 'oef/base.html' %}

{% block content %}
<h1>{{ entry.name }}</h1>
<a href="{% url 'oef:entry_update' entry.pk %}">Edit</a>

{% if entry.inactive %}
<div class="alert alert-warning" role="alert">
    This entry is inactive.
</div>
{% endif %}

<p>Modality: {{ entry.modality }}</p>
<p>Exam code: {{ entry.exam_code }}</p>

<p>Questions:
    <pre>
{{ entry.questions }}
    </pre>
</p>

<p>Comments: {{ entry.comments }}</p>

Current format: 
{% if entry.get_current_format %}
<a href='{% url "oef:format_update" entry.get_current_format.pk %}'>{{ entry.get_current_format }}</a>
{% else %}
None
{% endif %}

<br/>

<button
hx-get="{% url 'oef:entry_detail_formats' entry.pk %}"
hx-swap="outerHTML"
>Check formats</button>
{% endblock content %}