<commit_before>{% extends 'admin/master.html' %}
{% import 'admin/lib.html' as lib with context %}
{% import 'admin/actions.html' as actionlib with context %}

{% block head %}
    <link href="{{ url_for('admin.static', filename='overlay/overlay.css') }}" rel="stylesheet">
    <link href="{{ url_for('admin.static', filename='select2/select2.css') }}" rel="stylesheet">
    <link href="{{ url_for('admin.static', filename='css/datepicker.css') }}" rel="stylesheet">
{% endblock %}

{% block body %}
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="#">{{ _gettext('List') }} ({{ count }})</a>
        </li>
        {% if admin_view.can_create %}
        <li>
            <a href="{{ url_for('.create_view', url=return_url) }}">{{ _gettext('Create') }}</a>
        </li>
        {% endif %}

        {% if filter_groups %}
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {{ _gettext('Add Filter') }}<b class="caret"></b>
            </a>
            <ul class="dropdown-menu field-filters">
                {% for k in filter_groups %}
                <li>
                    <a href="#" class="filter" onclick="return false;">{{ k[0] }}</a>
                </li>
                {% endfor %}
            </ul>
        </li>
        {% endif %}

        {% if actions %}
        <li class="dropdown">
            {{ actionlib.dropdown(actions) }}
        </li>
        {% endif %}

        {% if search_supported %}
        <li>
            <form method="GET" action="{{ return_url }}" class="search-form">
                {% if sort_column is not none %}
                <input type="hidden" name="sort" value="{{ sort_column }}"></input>
                {% endif %}
                {% if sort_desc %}
                <input type="hidden" name="desc" value="{{ sort_desc }}"></input>
                {% endif %}
                <input type="text" name="search" value="{{ search or '' }}" class="search-query span2" placeholder="{{ _gettext('Search') }}"></input>
                {% if search %}
                    <a href="{{ clear_search_url }}" class="clear">
                        <i class="icon-remove"></i>
                    </a>
                {% endif %}
            </form>
        </li>
        {% endif %}
    </ul>
    {% if filter_groups %}
        <form id="filter_form" method="GET" action="{{ return_url }}">
            <div class="pull-right">
                <button type="submit" class="btn btn-primary" style="display: none">{{ _gettext('Apply') }}</button>
                {% if active_filters %}
                <a href="{{ clear_search_url }}" class="btn">{{ _gettext('Reset Filters') }}</a>
                {% endif %}
            </div>

            <div class="filters">
                {%- for i, flt in enumerate(active_filters) -%}
                <div class="filter-row">
                    {% set filter = admin_view._filters[flt[0]] %}
                    <a href="#" class="btn remove-filter" title="{{ _gettext('Remove Filter') }}">
                        <span class="close-icon">&times;</span>&nbsp;{{ filters[flt[0]] }}
                    </a><select class="filter-op" data-role="select2">
                        {% for op in admin_view._filter_dict[filter.name] %}
                        <option value="{{ op[0] }}"{% if flt[0] == op[0] %} selected="selected"{% endif %}>{{ op[1] }}</option>
                        {% endfor %}
                    </select>
                    {%- set data = filter_data.get(flt[0]) -%}
                    {%- if data -%}
                    <select name="flt{{ i }}_{{ flt[0] }}" class="filter-val" data-role="select2">
                        {%- for d in data %}
                        <option value="{{ d[0] }}"{% if flt[1] == d[0] %} selected{% endif %}>{{ d[1] }}</option>
                        {%- endfor %}
                    </select>
                    {%- else -%}
                        <input name="flt{{ i }}_{{ flt[0] }}" type="text" value="{{ flt[1] or '' }}" class="filter-val"{% if flt[0] in filter_types %} data-role="{{ filter_types[flt[0]] }}"{% endif %}></input>
                    {%- endif -%}
                </div>
                {% endfor %}
            </div>
        </form>
    {% endif %}

    {% call lib.form_tag(action=multiple_update_action) %}
        <table class="table table-striped table-bordered model-list">
            <thead>
                <tr>
                    {% block list_header scoped %}
                        {% if actions %}
                        <th class="span1">
                            <input type="checkbox" name="rowtoggle" class="action-rowtoggle" />
                        </th>
                        {% endif %}
                        <th class="span1">&nbsp;</th>
                        {% set column = 0 %}
                        {% for c, name in list_columns %}
                        <th>
                            {% if admin_view.is_sortable(c) %}
                                {% if sort_column == column %}
                                    <a href="{{ sort_url(column, True) }}">
                                        {{ name }}
                                        {% if sort_desc %}
                                            <i class="icon-chevron-up"></i>
                                        {% else %}
                                            <i class="icon-chevron-down"></i>
                                        {% endif %}
                                    </a>
                                {% else %}
                                    <a href="{{ sort_url(column) }}">{{ name }}</a>
                                {% endif %}
                            {% else %}
                                {{ name }}
                            {% endif %}
                            {% if admin_view.column_descriptions.get(c) %}
                                <a class="icon-question-sign"
                                   title="{{ admin_view.column_descriptions[c] }}"
                                   href="#" data-role="tooltip"
                                ></a>
                            {% endif %}
                        </th>
                        {% set column = column + 1 %}
                        {% endfor %}
                    {% endblock %}
                </tr>
            </thead>
            {% for row in data %}
            <tr>
                {% block list_row scoped %}
                    {% if actions %}
                    <td>
                        <input type="checkbox" name="rowid" class="action-checkbox" value="{{ get_pk_value(row) }}" />
                    </td>
                    {% endif %}
                    <td>
                        {% block list_row_actions scoped %}
                            {%- if admin_view.can_edit -%}
                            <a class="icon" href="{{ url_for('.edit_view', id=get_pk_value(row), url=return_url) }}">
                                <i class="icon-pencil"></i>
                            </a>
                            {%- endif -%}
                            {%- if admin_view.can_delete -%}
                            <form class="icon" method="POST" action="{{ url_for('.delete_view', id=get_pk_value(row), url=return_url) }}">
                                <button onclick="return confirm('{{ _gettext('You sure you want to delete this item?') }}');">
                                    <i class="icon-remove"></i>
                                </button>
                            </form>
                            {%- endif -%}
                        {% endblock %}
                    </td>
                    {% for c, name in list_columns %}
                    <td>{{ get_value(row, c) }}</td>
                    {% endfor %}
                {% endblock %}
            </tr>
            {% endfor %}
        </table>

        {# Multiple update form container #}
        <div class="overlay" id="multiple_update">
            <input type="hidden" name="action" value="multiple_update" />
            <input type="hidden" name="url" value="{{ request.url }}" />
            <fieldset>

                {#            {{ lib.render_form_fields(multiple_update_form, enable_disabling=False) }}#}
                {{ lib.render_form_fields(multiple_update_form, enable_disabling=True) }}

                {{ lib.render_form_buttons(cancel_url=None) }}
            </fieldset>
        </div>
    {% endcall %}

    {{ lib.pager(page, num_pages, pager_url) }}

    {{ actionlib.form(actions, url_for('.action_view')) }}



{% endblock %}


{% block tail %}
    <script src="{{ url_for('admin.static', filename='js/bootstrap-datepicker.js') }}"></script>
    <script src="{{ url_for('admin.static', filename='js/form.js') }}"></script>
    <script src="{{ url_for('admin.static', filename='js/filters.js') }}"></script><commit_msg>Fluid<commit_after>{% extends 'admin/master.html' %}
{% import 'admin/lib.html' as lib with context %}
{% import 'admin/actions.html' as actionlib with context %}

{% block head %}
    <link href="{{ url_for('admin.static', filename='overlay/overlay.css') }}" rel="stylesheet">
    <link href="{{ url_for('admin.static', filename='select2/select2.css') }}" rel="stylesheet">
    <link href="{{ url_for('admin.static', filename='css/datepicker.css') }}" rel="stylesheet">
{% endblock %}

{% block body %}
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="#">{{ _gettext('List') }} ({{ count }})</a>
        </li>
        {% if admin_view.can_create %}
        <li>
            <a href="{{ url_for('.create_view', url=return_url) }}">{{ _gettext('Create') }}</a>
        </li>
        {% endif %}

        {% if filter_groups %}
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {{ _gettext('Add Filter') }}<b class="caret"></b>
            </a>
            <ul class="dropdown-menu field-filters">
                {% for k in filter_groups %}
                <li>
                    <a href="#" class="filter" onclick="return false;">{{ k[0] }}</a>
                </li>
                {% endfor %}
            </ul>
        </li>
        {% endif %}

        {% if actions %}
        <li class="dropdown">
            {{ actionlib.dropdown(actions) }}
        </li>
        {% endif %}

        {% if search_supported %}
        <li>
            <form method="GET" action="{{ return_url }}" class="search-form">
                {% if sort_column is not none %}
                <input type="hidden" name="sort" value="{{ sort_column }}"></input>
                {% endif %}
                {% if sort_desc %}
                <input type="hidden" name="desc" value="{{ sort_desc }}"></input>
                {% endif %}
                <input type="text" name="search" value="{{ search or '' }}" class="search-query span2" placeholder="{{ _gettext('Search') }}"></input>
                {% if search %}
                    <a href="{{ clear_search_url }}" class="clear">
                        <i class="icon-remove"></i>
                    </a>
                {% endif %}
            </form>
        </li>
        {% endif %}
    </ul>
    {% if filter_groups %}
        <form id="filter_form" method="GET" action="{{ return_url }}">
            <div class="pull-right">
                <button type="submit" class="btn btn-primary" style="display: none">{{ _gettext('Apply') }}</button>
                {% if active_filters %}
                <a href="{{ clear_search_url }}" class="btn">{{ _gettext('Reset Filters') }}</a>
                {% endif %}
            </div>

            <div class="filters">
                {%- for i, flt in enumerate(active_filters) -%}
                <div class="filter-row">
                    {% set filter = admin_view._filters[flt[0]] %}
                    <a href="#" class="btn remove-filter" title="{{ _gettext('Remove Filter') }}">
                        <span class="close-icon">&times;</span>&nbsp;{{ filters[flt[0]] }}
                    </a><select class="filter-op" data-role="select2">
                        {% for op in admin_view._filter_dict[filter.name] %}
                        <option value="{{ op[0] }}"{% if flt[0] == op[0] %} selected="selected"{% endif %}>{{ op[1] }}</option>
                        {% endfor %}
                    </select>
                    {%- set data = filter_data.get(flt[0]) -%}
                    {%- if data -%}
                    <select name="flt{{ i }}_{{ flt[0] }}" class="filter-val" data-role="select2">
                        {%- for d in data %}
                        <option value="{{ d[0] }}"{% if flt[1] == d[0] %} selected{% endif %}>{{ d[1] }}</option>
                        {%- endfor %}
                    </select>
                    {%- else -%}
                        <input name="flt{{ i }}_{{ flt[0] }}" type="text" value="{{ flt[1] or '' }}" class="filter-val"{% if flt[0] in filter_types %} data-role="{{ filter_types[flt[0]] }}"{% endif %}></input>
                    {%- endif -%}
                </div>
                {% endfor %}
            </div>
        </form>
    {% endif %}

    {% block table %}
    {% call lib.form_tag(action=multiple_update_action) %}
        <table class="table table-striped table-bordered model-list">
            <thead>
                <tr>
                    {% block list_header scoped %}
                        {% if actions %}
                        <th class="span1">
                            <input type="checkbox" name="rowtoggle" class="action-rowtoggle" />
                        </th>
                        {% endif %}
                        <th class="span1">&nbsp;</th>
                        {% set column = 0 %}
                        {% for c, name in list_columns %}
                        <th>
                            {% if admin_view.is_sortable(c) %}
                                {% if sort_column == column %}
                                    <a href="{{ sort_url(column, True) }}">
                                        {{ name }}
                                        {% if sort_desc %}
                                            <i class="icon-chevron-up"></i>
                                        {% else %}
                                            <i class="icon-chevron-down"></i>
                                        {% endif %}
                                    </a>
                                {% else %}
                                    <a href="{{ sort_url(column) }}">{{ name }}</a>
                                {% endif %}
                            {% else %}
                                {{ name }}
                            {% endif %}
                            {% if admin_view.column_descriptions.get(c) %}
                                <a class="icon-question-sign"
                                   title="{{ admin_view.column_descriptions[c] }}"
                                   href="#" data-role="tooltip"
                                ></a>
                            {% endif %}
                        </th>
                        {% set column = column + 1 %}
                        {% endfor %}
                    {% endblock %}
                </tr>
            </thead>
            {% for row in data %}
            <tr>
                {% block list_row scoped %}
                    {% if actions %}
                    <td>
                        <input type="checkbox" name="rowid" class="action-checkbox" value="{{ get_pk_value(row) }}" />
                    </td>
                    {% endif %}
                    <td>
                        {% block list_row_actions scoped %}
                            {%- if admin_view.can_edit -%}
                            <a class="icon" href="{{ url_for('.edit_view', id=get_pk_value(row), url=return_url) }}">
                                <i class="icon-pencil"></i>
                            </a>
                            {%- endif -%}
                            {%- if admin_view.can_delete -%}
                            <form class="icon" method="POST" action="{{ url_for('.delete_view', id=get_pk_value(row), url=return_url) }}">
                                <button onclick="return confirm('{{ _gettext('You sure you want to delete this item?') }}');">
                                    <i class="icon-remove"></i>
                                </button>
                            </form>
                            {%- endif -%}
                        {% endblock %}
                    </td>
                    {% for c, name in list_columns %}
                    <td>{{ get_value(row, c) }}</td>
                    {% endfor %}
                {% endblock %}
            </tr>
            {% endfor %}
        </table>

        {# Multiple update form container #}
        <div class="overlay" id="multiple_update">
            <input type="hidden" name="action" value="multiple_update" />
            <input type="hidden" name="url" value="{{ request.url }}" />
            <fieldset>

                {#            {{ lib.render_form_fields(multiple_update_form, enable_disabling=False) }}#}
                {{ lib.render_form_fields(multiple_update_form, enable_disabling=True) }}

                {{ lib.render_form_buttons(cancel_url=None) }}
            </fieldset>
        </div>
    {% endcall %}
    {% endblock %}

    {{ lib.pager(page, num_pages, pager_url) }}

    {{ actionlib.form(actions, url_for('.action_view')) }}



{% endblock %}


{% block tail %}
    <script src="{{ url_for('admin.static', filename='js/bootstrap-datepicker.js') }}"></script>
    <script src="{{ url_for('admin.static', filename='js/form.js') }}"></script>
    <script src="{{ url_for('admin.static', filename='js/filters.js') }}"></script>
{'fraction_non_alphanumeric': 0.16604570983706834, 'fraction_numerical': 0.0028916198632041373, 'mean_word_length': 1.2158698866436668, 'pattern_counts': {'":': 0, '<': 245, '<?xml version=': 0, '>': 245, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7648911', 'n_tokens_mistral': 5091, 'n_tokens_neox': 4510, 'n_words': 954}