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

{% block content %}

    {% if assessor %}
        Assessor: {{assessor}}

    {% endif %}


    {% include 'rcr/item_filter.html' %}


    {% if completed %}
        <h2>Completed items:</h2>
    {% else %}
        <h2>Items to assess:</h2>
    {% endif %}


    {% if items and assessor %}

        <a href="{% url 'rcr:radiology_update_next_view' %}">Click to assess next item</a>

    {% endif %}


    <table>
            <tr><th></th><th>Content Type</th><th>Name</th><th>Assessed<br/> By</th></tr>
        {% for item in items %}
            <tr class="{{item.content_type}} {% if item.completed_radiology %} completed-radiology{% endif %}{% if item.completed_oncology %} completed-oncology{% endif %}{% if item.needs_review %} review{% endif %}">
                <td class="{{item.specialty}}" title="{{item.specialty}}">
                    {{forloop.counter}}:
                </td>
                <td> {{item.content_type}}</td>
                <td>
                    {{item.name}}
                </td>
                <td>
                    {{item.get_assessed_by|safe}}
                </td>
                <td><a href="{% url 'rcr:radiology_detail_view' item.pk %}">view</a> <a href="{% url 'rcr:radiology_update_view' item.pk %}">edit</a>
                </td>
        {% empty %}
            No items found.
            </tr>
        {% endfor %}

    </table>


    <a href="{% url 'rcr:radiology_index_view' %}">Todo</a>
    <a href="{% url 'rcr:radiology_index_completed_view' %}">Done</a>
{% endblock %}


{% block css %}

    <style type="text/css">
        .review::after {
            content: '(R)';
            color: orange;
        }
        .completed-radiology::after {
            content: '✓';
            color: green;
        }
        .completed-oncology::after {
            content: '✓';
            color: blue;
        }
        .completed-oncology.completed-radiology::after {
            content: '✓';
            color: purple;
        }
        .completed::after {
            content: '✓';
            color: green;
        }
        .Radiology::before {
            content: "R";
        }
        .Radiology {
            color: green;
        }
        .Oncology::before {
            content: "O";
        }
        .Oncology {
            color: blue;
        }
        .Cross-faculty::before {
            content: "C";
        }
        .Cross-faculty {
            color: purple;
        }
        td {
            padding-right: 10px;
        }
        * {
            box-sizing: unset;
        }

    </style>
{% endblock css %}
