<li class="series-item {% if series_item_classes %}{{ series_item_classes }}{% endif %}">
    <div class="series-left">
        <input class="hidden" type="checkbox" name="selection" value="{{ series }}"{% if tags.StudyInstanceUID %} data-study-uid="{{ tags.StudyInstanceUID }}"{% elif tags.StudyID %} data-study-uid="{{ tags.StudyID }}"{% endif %}>
        <h5 class="series-title">
            {{ tags.SeriesDescription|default:series }}
            {% if series_is_partial %}
                <span class="badge bg-warning text-dark ms-2">Part imported</span>
            {% endif %}
        </h5>
        <div class="series-meta small text-muted">
            <div>UID: <code class="series-uid">{{ series }}</code></div>
            {% if tags.SeriesNumber %}<div>Series #: <span class="series-number">{{ tags.SeriesNumber }}</span></div>{% endif %}
            <div>Modality: <span class="series-modality">{{ tags.Modality }}</span></div>
            <div>Images: <span class="series-images">{{ n }}</span></div>
            {% if tags.StudyDate %}<div>Study date: <span class="series-study-date">{{ tags.StudyDate }}</span></div>{% endif %}
            <div>Uploaded: <span class="series-date">{{ date }}</span></div>
        </div>
    </div>
    <div class="series-right">
        {% if tags.Modality %}
            <span class="modality-badge">{{ tags.Modality }}</span>
        {% endif %}
        <span class="series-block-popup-link">
            <a href="#" onclick="return window.create_popup_window('/atlas/uploads/series_id/{{ series }}', 'Series')">Popup</a>
            {% if show_tags_link %}
                &nbsp;|&nbsp;
                <a
                    hx-get="{% url 'atlas:series_tags_partial' series %}"
                    hx-target="#seriesTagsModal .modal-body"
                    hx-swap="innerHTML"
                >View tags</a>
            {% endif %}
        </span>
        {% if series_is_partial %}
            <button
                type="button"
                class="btn btn-sm btn-warning mt-2 import-partial-series-btn"
                data-series-uids="{{ series }}"
                {% if import_case_id %}data-case-id="{{ import_case_id }}"{% endif %}
            >Finish import</button>
        {% endif %}
    </div>
    <div class="w-100 mt-2">
        <div id="series-tags-{{ series }}" class="series-tags-placeholder"></div>
    </div>
</li>
