{% extends "base.html" %}

{% block content %}
<article class="chart">
    <h1>Charts</h1>
    <p>
        <a href="{% url 'chart-create' %}" class="action-button"><i class="fas fa-plus"></i>&ensp;New chart</a>
    </p>
    <section>
        {% for chart in chart_list %}
            <div class="chart__item">
            <h4><i class="fas fa-notes-medical"></i> <a href="{% url 'chart-detail' chart.pk %}">Chart for {{chart.patient}}</a></h4>
                <p>
                    <strong>Student</strong>: {{chart.student_id}}&emsp;{{chart.student_name}}&emsp;
                    <strong>Assignment</strong>: {{chart.assignment}}<br>
                </p>
            </div>
        {% endfor %}
    </section>
</article>
{% endblock %}