<commit_before><!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>Remote file for Bootstrap Modal</title>
    </head>

    <body>
        <div class="modal-body">

            {% if context.pathsegments|length > 0 %}
                <p>
                    {{ __('Path:') }}
                    <a href="#" data-action="bolt.stack.changeFolder('{{ context.key }}', '{{ path('asyncbrowse', {'namespace': context.namespace, 'key': context.key}) }}');" class="folder">
                        {{ context.namespace -}}
                    </a> /
                    {% for path, segment in context.pathsegments %}
                    {% if not loop.first %} / {% endif %}
                    <a href="#" data-action="bolt.stack.changeFolder('{{ context.key }}', '{{ path('asyncbrowse', {'namespace': context.namespace, 'path': path, 'key': context.key}) }}');" class="folder">{{ segment|default('…') }}</a>
                    {% endfor %}
                </p>
            {% endif %}

            {% if context.folders|length > 0 %}
                <table class="dashboardlisting">
                    <tr>
                        <th>{{ __('Folders') }}</th>
                    </tr>

                    {% for folder in context.folders %}
                        <tr style="height: 30px;">
                            <td> <i class="fa fa-fw fa-folder-open-o"></i>
                                <a href="#" data-action="bolt.stack.changeFolder('{{ context.key }}', '{{ path('asyncbrowse', {'namespace': context.namespace, 'path': folder.newpath, 'key': context.key}) }}');" class="folder"><b>{{ folder.foldername }}/</b>
                                </a>
                            </td>
                        </tr>
                    {% endfor %}
                </table>
            {% endif %}

            {% if context.files|length > 0 %}
            <table class="dashboardlisting">
                <tr>
                    <th>{{ __('Files') }}</th>
                    <th>{{ __('Filesize') }}</th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    {# <th>&nbsp;</th> #}
                </tr>

                {% for file in context.files %}
                    {% if file.type in ['jpeg', 'jpg', 'png', 'gif'] %}
                        <tr>
                            <td>

                                <i class="fa fa-fw fa-file-image-o"></i>

                                {% if file.readable %}
                                    <a href="#" data-action="bolt.stack.selectFromPulldown('{{ context.key }}', '{{ file.relativepath }}');" class="file">
                                        <b>{{ file.filename|trimtext(30) }}</b>
                                    </a>
                                {% else %}
                                    <b>{{ file.filename|trimtext(30) }} </b><i class="fa fa-lock"></i>
                                {% endif %}
                            </td>

                            <td>{{ file.filesize }}.</td>

                            <td>{% if file.imagesize is defined %}{{ file.imagesize }} px.{% endif %}</td>

                            <td class="listthumb">
                                    {{file.newpath|showimage(54, 40, 'c')}}
                            </td>

                            {# <td>
                                <a href="{{ file.newpath|thumbnail(1000, 1000, 'r') }}" class="btn btn-small preview magnific" title="Image: {{ file.filename }}">
                                {{ __('Preview') }}</a>
                            </td> #}
                        </tr>
                    {% endif %}
                {% endfor %}
                </table>
            {% endif %}
        </div>

        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">{{ __('Cancel') }}</button>
        </div>

    </body>

    <script type="text/javascript">
        $(function() {
            init.dataActions();
        });
    </script>
</html>
<commit_msg>Show other files than images in "async browse". fixes #2136<commit_after><!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>Remote file for Bootstrap Modal</title>
    </head>

    <body>
        <div class="modal-body">

            {% if context.pathsegments|length > 0 %}
                <p>
                    {{ __('Path:') }}
                    <a href="#" data-action="bolt.stack.changeFolder('{{ context.key }}', '{{ path('asyncbrowse', {'namespace': context.namespace, 'key': context.key}) }}');" class="folder">
                        {{ context.namespace -}}
                    </a> /
                    {% for path, segment in context.pathsegments %}
                    {% if not loop.first %} / {% endif %}
                    <a href="#" data-action="bolt.stack.changeFolder('{{ context.key }}', '{{ path('asyncbrowse', {'namespace': context.namespace, 'path': path, 'key': context.key}) }}');" class="folder">{{ segment|default('…') }}</a>
                    {% endfor %}
                </p>
            {% endif %}

            {% if context.folders|length > 0 %}
                <table class="dashboardlisting">
                    <tr>
                        <th>{{ __('Folders') }}</th>
                    </tr>

                    {% for folder in context.folders %}
                        <tr style="height: 30px;">
                            <td> <i class="fa fa-fw fa-folder-open-o"></i>
                                <a href="#" data-action="bolt.stack.changeFolder('{{ context.key }}', '{{ path('asyncbrowse', {'namespace': context.namespace, 'path': folder.newpath, 'key': context.key}) }}');" class="folder"><b>{{ folder.foldername }}/</b>
                                </a>
                            </td>
                        </tr>
                    {% endfor %}
                </table>
            {% endif %}

            {% if context.files|length > 0 %}
            <table class="dashboardlisting">
                <tr>
                    <th>{{ __('Files') }}</th>
                    <th>{{ __('Filesize') }}</th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    {# <th>&nbsp;</th> #}
                </tr>

                {% for file in context.files %}
                    {% if file.type in ['jpeg', 'jpg', 'png', 'gif'] %}
                        <tr>
                            <td>

                                <i class="fa fa-fw fa-file-image-o"></i>

                                {% if file.readable %}
                                    <a href="#" data-action="bolt.stack.selectFromPulldown('{{ context.key }}', '{{ file.relativepath }}');" class="file">
                                        <b>{{ file.filename|trimtext(30) }}</b>
                                    </a>
                                {% else %}
                                    <b>{{ file.filename|trimtext(30) }} </b><i class="fa fa-lock"></i>
                                {% endif %}
                            </td>

                            <td>{{ file.filesize }}.</td>

                            <td>{% if file.imagesize is defined %}{{ file.imagesize }} px.{% endif %}</td>

                            <td class="listthumb">
                                    {{file.newpath|showimage(54, 40, 'c')}}
                            </td>

                            {# <td>
                                <a href="{{ file.newpath|thumbnail(1000, 1000, 'r') }}" class="btn btn-small preview magnific" title="Image: {{ file.filename }}">
                                {{ __('Preview') }}</a>
                            </td> #}
                        </tr>
                    {% else %}

                        <tr>
                            <td>

                                <i class="fa fa-fw fa-file-image-o"></i>

                                {% if file.readable %}
                                    <a href="#" data-action="bolt.stack.selectFromPulldown('{{ context.key }}', '{{ file.relativepath }}');" class="file">
                                        <b>{{ file.filename|trimtext(30) }}</b>
                                    </a>
                                {% else %}
                                    <b>{{ file.filename|trimtext(30) }} </b><i class="fa fa-lock"></i>
                                {% endif %}
                            </td>

                            <td>{{ file.filesize }}.</td>

                            <td>&nbsp;</td>

                            <td class="listthumb">&nbsp;</td>

                            {# <td>
                                <a href="{{ file.newpath|thumbnail(1000, 1000, 'r') }}" class="btn btn-small preview magnific" title="Image: {{ file.filename }}">
                                {{ __('Preview') }}</a>
                            </td> #}
                        </tr>

                    {% endif %}
                {% endfor %}
                </table>
            {% endif %}
        </div>

        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">{{ __('Cancel') }}</button>
        </div>

    </body>

    <script type="text/javascript">
        $(function() {
            init.dataActions();
        });
    </script>
</html>

{'fraction_non_alphanumeric': 0.1723956690844108, 'fraction_numerical': 0.00630715862503942, 'mean_word_length': 1.0425075139544868, 'pattern_counts': {'":': 0, '<': 183, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '515723', 'n_tokens_mistral': 2682, 'n_tokens_neox': 2343, 'n_words': 480}