<div class="btn-group mb-2" role="group">
    <a href="{% url 'atlas:series_detail' pk=series.pk %}" class="btn btn-outline-secondary btn-sm">View</a>
    <a href="{% url 'atlas:series_update' pk=series.pk %}" class="btn btn-outline-secondary btn-sm">Edit</a>
    <a href="{% url 'atlas:series_delete' pk=series.pk %}" class="btn btn-outline-danger btn-sm">Delete</a>
    <a href="{% url 'atlas:series_authors' pk=series.pk %}" class="btn btn-outline-secondary btn-sm">Authors</a>
    {% if request.user.is_superuser %}
        <a href="{% url 'admin:atlas_series_change' series.id %}" class="btn btn-outline-dark btn-sm">Admin Edit</a>
    {% endif %}
    <div class="btn-group" role="group">
        <button id="orderbyDropdown" type="button" class="btn btn-outline-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
            Order By
        </button>
        <ul class="dropdown-menu" aria-labelledby="orderbyDropdown">
            <li><a class="dropdown-item" href="?orderby=date">Date</a></li>
            <li><a class="dropdown-item" href="?orderby=modality">Modality</a></li>
            <li><a class="dropdown-item" href="?orderby=images">Image Count</a></li>
            <!-- Add more order-by options as needed -->
        </ul>
    </div>
</div>