{% extends "base.html" %}
{% load humanize %}
{% load i18n %}
{% load static %}
{% load smart_pagination %}
{% block title %}{% translate "Browse" %}{% endblock %}
{% block content %}
    <div class="row justify-content-center">
        <div class="col-lg-10 col-xl-9">
            <div class="row">
                <div class="col-6">
                    <div class="row">
                        <h1>
                            {% if request.GET.search %}
                                {% blocktrans with search=request.GET.search %}Search results for '{{ search }}'...
                                {% endblocktrans %}
                            {% else %}
                                {% translate "Browse all items" %}
                            {% endif %}
                        </h1>
                    </div>
                </div>
            </div>
            <div class="row">
                <span class="col-6">
                    {% blocktranslate with count=page_obj.paginator.count %}
                        {{ count }} item(s) found
                    {% endblocktranslate %}
                </span>
            </div>
            {% include 'helpers/filter.html' %}
            <div class="row mt-3 mx-0">
                <div class="col-12">
                    <div class="list-group list-group-hover">
                        {% for secret in secrets %}
                            {% include "secrets/secret_row.html" %}
                        {% endfor %}
                    </div>
                </div>
            </div>
            {% include "pagination.html" %}
        </div>
    </div>
{% endblock %}
{% block additionalJS %}
    <script>
        $("#filter-modal select").select2({
            allowClear: true,
            dropdownParent: document.getElementById('filter-modal'),
            placeholder: {% translate "Select User" %}
        });
    </script>
{% endblock %}
