<commit_before>{% extends 'base_with_margins.html' %}
{% load extras %}
{% load highlight %}
{% block title %}
    {% if request.GET.q %}
        Search results for '{{ request.GET.q }}'
    {% else %}
        Search Legislation
    {% endif %}
{% endblock %}
{% block content %}
    <br/>
    <div class='jumbotron'>
        <p class="h4">
            Search {{city_name}} legislation
        </p>
        <form method="get" action=".">
            <div class="input-group site-intro-search">
                <input name="q" type="text" class="input-lg form-control" placeholder="{{search_placeholder_text}}">
                <div class='input-group-btn'>
                    <button type="submit" class="btn btn-lg btn-primary">
                        <i class='fa fa-fw fa-search'></i>
                    </button>
                </div>
            </div>
        </form>
    </div>

    <div class="row">
        <div class="col-sm-4">
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse" data-target="#search-filters-mobile">
                    <h3 class="panel-title">Filter results <i class="fa fa-fw fa-plus pull-right"></i></h3>
                </div>
                <div class="panel-body collapse" id="search-filters-mobile">
                    {% for f_name, facet_values in facets.fields.items %}
                    <p><strong>{{ f_name | facet_name }}</strong></p>
                    <ul class="search-facet-list">
                        {% for name, count in facet_values %}
                            {% if count %}
                                <li class="small">
                                    <a href="/search/?q={{query}}&selected_facets={{f_name}}_exact:{{name}}" title="{{ name|title }}">
                                        {{ name|committee_topic_only|title|short_title }}
                                    </a>
                                    {% if f_name != 'sponsorships' %}
                                        <span class="badge badge-muted pull-right">{{ count }}</span>
                                    {% endif %}
                                </li>
                            {% endif %}
                        {% endfor %}
                    </ul>
                    {% endfor %}
                </div>
            </div>
        </div>

        <div class="col-sm-8">
            {% if query %}
                <h3>{{ paginator.count }} legislation result{{ paginator.count|pluralize }} for '{{ request.GET.q }}'</h3>
            {% endif %}

        {% for result in page.object_list %}

            <h3>
                <a href="/legislation/{{ result.object.slug }}">{{ result.object.friendly_name }}</a>
                <span class='pull-right label label-{{result.object.inferred_status | lower}}'>{{result.object.inferred_status}}</span>
            </h3>

            <p class="small text-muted">
                Last Activity:
                <span class='text-{{result.object.actions.first.label}}'>
                    {{result.object.current_action.description | remove_action_subj}}
                </span>
                on {{result.object.last_action_date|date:'M d, Y'}}
            </p>

            {% if query %}
                <p class="small">{% highlight result.text with query css_class "bg-info" %}</p>
            {% else %}
                <p class="small">{{result.object.description | short_blurb}}</p>
            {% endif %}
            <hr />
        {% empty %}
            <p>This site has data from the current legislative session, which goes back to 2014. If you're searching for something older, you can browse the <a href="http://legistar.council.nyc.gov/Legislation.aspx" target="_blank">New York City Council Legistar site</a>.</p>
            <p>We'd be happy to help you find what you're looking for - <a href="mailto:<EMAIL>">contact us</a>!</p>
        {% endfor %}
        </div>
    </div>
    {% if page.has_previous or page.has_next %}
        <div class="row">
            <div class="col-md-8 col-md-offset-4">
                <nav>
                    <ul class="pagination">
                        {% if page.has_previous %}
                            <li>
                                <a href="?q={{ query }}&amp;page={{ page.previous_page_number }}" aria-label="Previous"><span aria-hidden="true">&laquo; Previous</span></a>
                            </li>
                        {% else %}
                            <li class="disabled">
                                <a href="#" aria-label="Previous"><span aria-hidden="true">&laquo; Previous</span></a>
                            </li>
                        {% endif %}

                        {% if page.has_next %}
                            <li>
                                <a href="?q={{ query }}&amp;page={{ page.next_page_number }}" aria-label="Next"><span aria-hidden="true">Next &raquo;</span></a>
                            </li>
                        {% else %}
                            <li class="disabled">
                                <a href="#" aria-label="Next"><span aria-hidden="true">Next &raquo;</span></a>
                            </li>
                        {% endif %}
                    </ul>
                </nav>
            </div>
        </div>
    {% endif %}
{% endblock %}<commit_msg>search filters show on desktop, hide on mobile, relates to #50<commit_after>{% extends 'base_with_margins.html' %}
{% load extras %}
{% load highlight %}
{% block title %}
    {% if request.GET.q %}
        Search results for '{{ request.GET.q }}'
    {% else %}
        Search Legislation
    {% endif %}
{% endblock %}
{% block content %}
    <br/>
    <div class='jumbotron'>
        <p class="h4">
            Search {{city_name}} legislation
        </p>
        <form method="get" action=".">
            <div class="input-group site-intro-search">
                <input name="q" type="text" class="input-lg form-control" placeholder="{{search_placeholder_text}}">
                <div class='input-group-btn'>
                    <button type="submit" class="btn btn-lg btn-primary">
                        <i class='fa fa-fw fa-search'></i>
                    </button>
                </div>
            </div>
        </form>
    </div>

    <div class="row">
        <div class="col-sm-4">
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse" data-target="#search-filters-mobile">
                    <h3 class="panel-title">
                        <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                        Filter results <i class="fa fa-fw fa-plus pull-right"></i></a>
                    </h3>
                </div>
                <div class="panel-body collapse" id="search-filters-mobile">
                    {% for f_name, facet_values in facets.fields.items %}
                    <p><strong>{{ f_name | facet_name }}</strong></p>
                    <ul class="search-facet-list">
                        {% for name, count in facet_values %}
                            {% if count %}
                                <li class="small">
                                    <a href="/search/?q={{query}}&selected_facets={{f_name}}_exact:{{name}}" title="{{ name|title }}">
                                        {{ name|committee_topic_only|title|short_title }}
                                    </a>
                                    {% if f_name != 'sponsorships' %}
                                        <span class="badge badge-muted pull-right">{{ count }}</span>
                                    {% endif %}
                                </li>
                            {% endif %}
                        {% endfor %}
                    </ul>
                    {% endfor %}
                </div>
            </div>
        </div>

        <div class="col-sm-8">
            {% if query %}
                <h3>{{ paginator.count }} legislation result{{ paginator.count|pluralize }} for '{{ request.GET.q }}'</h3>
            {% endif %}

        {% for result in page.object_list %}

            <h3>
                <a href="/legislation/{{ result.object.slug }}">{{ result.object.friendly_name }}</a>
                <span class='pull-right label label-{{result.object.inferred_status | lower}}'>{{result.object.inferred_status}}</span>
            </h3>

            <p class="small text-muted">
                Last Activity:
                <span class='text-{{result.object.actions.first.label}}'>
                    {{result.object.current_action.description | remove_action_subj}}
                </span>
                on {{result.object.last_action_date|date:'M d, Y'}}
            </p>

            {% if query %}
                <p class="small">{% highlight result.text with query css_class "bg-info" %}</p>
            {% else %}
                <p class="small">{{result.object.description | short_blurb}}</p>
            {% endif %}
            <hr />
        {% empty %}
            <p>This site has data from the current legislative session, which goes back to 2014. If you're searching for something older, you can browse the <a href="http://legistar.council.nyc.gov/Legislation.aspx" target="_blank">New York City Council Legistar site</a>.</p>
            <p>We'd be happy to help you find what you're looking for - <a href="mailto:<EMAIL>">contact us</a>!</p>
        {% endfor %}
        </div>
    </div>
    {% if page.has_previous or page.has_next %}
        <div class="row">
            <div class="col-md-8 col-md-offset-4">
                <nav>
                    <ul class="pagination">
                        {% if page.has_previous %}
                            <li>
                                <a href="?q={{ query }}&amp;page={{ page.previous_page_number }}" aria-label="Previous"><span aria-hidden="true">&laquo; Previous</span></a>
                            </li>
                        {% else %}
                            <li class="disabled">
                                <a href="#" aria-label="Previous"><span aria-hidden="true">&laquo; Previous</span></a>
                            </li>
                        {% endif %}

                        {% if page.has_next %}
                            <li>
                                <a href="?q={{ query }}&amp;page={{ page.next_page_number }}" aria-label="Next"><span aria-hidden="true">Next &raquo;</span></a>
                            </li>
                        {% else %}
                            <li class="disabled">
                                <a href="#" aria-label="Next"><span aria-hidden="true">Next &raquo;</span></a>
                            </li>
                        {% endif %}
                    </ul>
                </nav>
            </div>
        </div>
    {% endif %}
{% endblock %}

{% block extra_js %}
    <script>
        $(function() {
            if ($(window).width() >= 768) {
                $('#search-filters-mobile').collapse('show');
            }
        });
    </script>
{% endblock %}
{'fraction_non_alphanumeric': 0.15424917858094309, 'fraction_numerical': 0.003108072107272889, 'mean_word_length': 1.3040098199672667, 'pattern_counts': {'":': 0, '<': 211, '<?xml version=': 0, '>': 212, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '648240', 'n_tokens_mistral': 3212, 'n_tokens_neox': 2881, 'n_words': 629}