<commit_before>{% set ckParameters = {'CKEditor': app.request.get('CKEditor'), 'CKEditorFuncNum': app.request.get('CKEditorFuncNum')} %}
{% set previewLink = false %}
{% for object in datagrid.results %}
    {% set path = path('networking_init_cms_file_download', {'id': object.id, 'name': object.getMetadataValue('filename')}) %}
    {% if object.width %}
        {% set path = 'networking_init_cms_image_view' %}
    {% endif %}

    {% if object.width is defined and object.width %}
        {% if object.providerName == 'sonata.media.provider.youtube' %}
            {% set previewLink %}//www.youtube.com/embed/{{ object.providerreference }}?autoplay=1{% endset %}
            {% set previewType = 'iframe'%}
            {% set iframeWidth = '600px' %}
            {% set iframeHeight = '300px' %}
        {% elseif object.providerName == 'sonata.media.provider.vimeo' %}
            {% set previewLink %}//player.vimeo.com/video/{{ object.providerreference }}?autoplay=1{% endset %}
            {% set previewType = 'iframe'%}
            {% set iframeWidth = '600px' %}
            {% set iframeHeight = '300px' %}
        {% else %}
            {% set previewLink %}{% path object, 'reference' %}{% endset %}
            {% set previewType = 'image'%}
        {% endif %}
    {% else %}
        {% if object.contentType == 'application/pdf' %}
            {% set previewLink %}{{ admin.generateUrl('pdf_preview', {'id': object.id}) }}{% endset %}
        {% endif %}
        {% set previewType = 'iframe' %}
        {% set iframeWidth = '700px' %}
        {% set iframeHeight = '989px' %}
    {% endif %}

    <div class="media-box">
        <div class="zero-clipboard">
            {% if previewLink %}
            <div class="btn-clipboard btn-clipboard-left">
                <a href="{{ previewLink }}"
                        {% if previewType == 'iframe' %}
                            data-featherlight-iframe-width="{{ iframeWidth }}"
                            data-featherlight-iframe-height="{{ iframeHeight }}"
                        {% endif %}
                   data-featherlight-variant="initcms-featherlight"
                   data-featherlight="{{ previewType }}"
                   class="image-preview-link" title="{{ object.name }}">
                    <i class="glyphicon glyphicon-zoom-in"></i>
                </a>
            </div>
            {% endif %}
            <div class="btn-clipboard btn-clipboard-right">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                   aria-haspopup="true" aria-expanded="false">Actions <span
                            class="caret"></span></a>
                <ul class="dropdown-menu" role="menu" >
                    <li>
                        <a href="{% path object, 'reference' %}"  tabindex="-1"
                           class="select">{{ 'list.label_select'|trans({}, 'MediaAdmin') }}: {{ 'list.label_original'|trans({}, 'MediaAdmin') }}</a>
                    </li>
                    {% if formats[object.id]|length > 0 %}
                        {% if object.width %}
                            <li class="divider"></li>
                            <li class="dropdown-header">{{ 'list.label_select'|trans({}, 'MediaAdmin') }} - {{ 'title.formats'|trans({}, 'SonataMediaBundle') }}:</li>
                            {% for name, format in formats[object.id] %}
                                <li><a href="{% path object, name %}" tabindex="-1"
                                       class="select">{% if format.width %}{{ 'label.width'|trans({}, 'MediaAdmin') }}: {{ format.width }}{% if format.height %}x {{ 'label.height'|trans({}, 'MediaAdmin') }}: {{ format.height }}{% endif %}px{% endif %}</a>
                                </li>
                            {% endfor %}
                        {% endif %}
                    {% endif %}
                </ul>
            </div>
        </div>
        <div class="thumbnail context">
            <div class="media-element" data-toggle="context" data-target="#context-menu-{{ object.id }}">
                {% if object.width is defined and object.width %}
                    <img src="{% path object, 'admin' %}" class="img-responsive  center-block"/>
                {% else %}
                    <i class="{{ get_file_icon(object.getMetadataValue('filename')) }}"></i>
                {% endif %}
            </div>
            <div class="media-title small" data-toggle="context" data-target="#context-menu-{{ object.id }}">
                <a href="{% path object, 'reference' %}"
                   data-toggle="tooltip" data-placement="top"  class="select" title="{{ object.name }}">{{ object.name }}</a> <br/>
            </div>
        </div>
    </div>
{% endfor %}
<div class="clearfix">&nbsp;</div>
{% if datagrid.pager.haveToPaginate() %}
<div class="col-md-3 col-xs-12 text-right pull-right">
    <label class="control-label"><strong>{% transchoice datagrid.pager.nbresults with {'%count%': datagrid.pager.nbresults} from 'SonataAdminBundle' %}
                list_results_count{% endtranschoice %}</strong></label>
    {% block max_per_page %}
        <br>
        <label class="control-label"
               for="{{ admin.uniqid }}_per_page">{% trans from 'SonataAdminBundle' %}
                label_per_page{% endtrans %}</label>
        <select class="per-page small" id="{{ admin.uniqid }}_per_page"
                style="width: auto; height: auto">
            {% for per_page in admin.getperpageoptions %}
                <option {% if per_page ==datagrid.pager.maxperpage %}selected="selected"{% endif %}
                        value="{{ admin.generateUrl('init_ckeditor_browser', {'filter':datagrid.values|merge({'_per_page': per_page})}|merge(ckParameters)) }}">
                    {{ per_page }}
                </option>
            {% endfor %}
        </select>
    {% endblock %}
</div>
    <div class="pagination col-md-3 hidden-xs hidden-sm text-left">
        {{ datagrid.pager.page }} / {{ datagrid.pager.lastpage }}
    </div>
    <div class="col-xs-12 col-md-6 text-center">
        <ul class="pagination pagination-xs">

            {% if datagrid.pager.page != 1 %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters( datagrid, 1)|merge(ckParameters)) }}"
                       data-page="1" class="media-pager"
                       data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                       data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                       data-sort-order="{{ datagrid.values._sort_order }}"
                       data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_first_pager'|trans({}, 'SonataAdminBundle') }}">&laquo;</a>
                </li>
            {% endif %}

            {% if datagrid.pager.page != datagrid.pager.previouspage %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, datagrid.pager.previouspage)|merge(ckParameters)) }}"
                       data-page="{{ datagrid.pager.previouspage }}" class="media-pager"
                       data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                       data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                       data-sort-order="{{ datagrid.values._sort_order }}"
                       data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_previous_pager'|trans({}, 'SonataAdminBundle') }}">&lsaquo;</a>
                </li>
            {% endif %}

            {# Set the number of pages to display in the pager #}
            {% for page in datagrid.pager.getLinks(admin_pool.getOption('pager_links')) %}
                {% if page == datagrid.pager.page %}
                    <li class="active">
                        <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, page)|merge(ckParameters)) }}"
                           data-page="{{ page }}" class="media-pager"
                           data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                           data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                           data-sort-order="{{ datagrid.values._sort_order }}">{{ page }}</a>
                    </li>
                {% else %}
                    <li>
                        <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, page)|merge(ckParameters)) }}"
                           data-page="{{ page }}" class="media-pager"
                           data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                           data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                           data-sort-order="{{ datagrid.values._sort_order }}"
                           data-sort-by="{{ datagrid.values._sort_by.fieldName}}">{{ page }}</a>
                    </li>
                {% endif %}
            {% endfor %}

            {% if datagrid.pager.page != datagrid.pager.nextpage %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, datagrid.pager.nextpage)|merge(ckParameters)) }}"
                        ata-page="{{ datagrid.pager.nextpage }}" class="media-pager"
                        data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                        data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                        data-sort-order="{{ datagrid.values._sort_order }}"
                        data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_next_pager'|trans({}, 'SonataAdminBundle') }}">&rsaquo;</a>
                </li>
            {% endif %}

            {% if datagrid.pager.page != datagrid.pager.lastpage %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, datagrid.pager.lastpage)|merge(ckParameters)) }}"
                       data-page="{{ datagrid.pager.lastpage }}" class="media-pager"
                       data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                       data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                       data-sort-order="{{ datagrid.values._sort_order }}"
                       data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_last_pager'|trans({}, 'SonataAdminBundle') }}">&raquo;</a>
                </li>
            {% endif %}

        </ul>
    </div>
{% endif %}
{% if datagrid.results|length < 1 %}
<p class="notice">
    {{ 'no_result'|trans({}, 'NetworkingInitCmsBundle') }}
</p>
{% endif %}<commit_msg>correct icon in browser list<commit_after>{% set ckParameters = {'CKEditor': app.request.get('CKEditor'), 'CKEditorFuncNum': app.request.get('CKEditorFuncNum')} %}
{% set previewLink = false %}
{% for object in datagrid.results %}
    {% set path = path('networking_init_cms_file_download', {'id': object.id, 'name': object.getMetadataValue('filename')}) %}
    {% if object.width %}
        {% set path = 'networking_init_cms_image_view' %}
    {% endif %}

    {% if object.width is defined and object.width %}
        {% if object.providerName == 'sonata.media.provider.youtube' %}
            {% set previewLink %}//www.youtube.com/embed/{{ object.providerreference }}?autoplay=1{% endset %}
            {% set previewType = 'iframe'%}
            {% set iframeWidth = '600px' %}
            {% set iframeHeight = '300px' %}
        {% elseif object.providerName == 'sonata.media.provider.vimeo' %}
            {% set previewLink %}//player.vimeo.com/video/{{ object.providerreference }}?autoplay=1{% endset %}
            {% set previewType = 'iframe'%}
            {% set iframeWidth = '600px' %}
            {% set iframeHeight = '300px' %}
        {% else %}
            {% set previewLink %}{% path object, 'reference' %}{% endset %}
            {% set previewType = 'image'%}
        {% endif %}
    {% else %}
        {% if object.contentType == 'application/pdf' %}
            {% set previewLink %}{{ admin.generateUrl('pdf_preview', {'id': object.id}) }}{% endset %}
        {% endif %}
        {% set previewType = 'iframe' %}
        {% set iframeWidth = '700px' %}
        {% set iframeHeight = '989px' %}
    {% endif %}

    <div class="media-box">
        <div class="zero-clipboard">
            {% if previewLink %}
            <div class="btn-clipboard btn-clipboard-left">
                <a href="{{ previewLink }}"
                        {% if previewType == 'iframe' %}
                            data-featherlight-iframe-width="{{ iframeWidth }}"
                            data-featherlight-iframe-height="{{ iframeHeight }}"
                        {% endif %}
                   data-featherlight-variant="initcms-featherlight"
                   data-featherlight="{{ previewType }}"
                   class="image-preview-link" title="{{ object.name }}">
                    <i class="glyphicon glyphicon-zoom-in"></i>
                </a>
            </div>
            {% endif %}
            <div class="btn-clipboard btn-clipboard-right">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                   aria-haspopup="true" aria-expanded="false">Actions <span
                            class="caret"></span></a>
                <ul class="dropdown-menu" role="menu" >
                    <li>
                        <a href="{% path object, 'reference' %}"  tabindex="-1"
                           class="select">{{ 'list.label_select'|trans({}, 'MediaAdmin') }}: {{ 'list.label_original'|trans({}, 'MediaAdmin') }}</a>
                    </li>
                    {% if formats[object.id]|length > 0 %}
                        {% if object.width %}
                            <li class="divider"></li>
                            <li class="dropdown-header">{{ 'list.label_select'|trans({}, 'MediaAdmin') }} - {{ 'title.formats'|trans({}, 'SonataMediaBundle') }}:</li>
                            {% for name, format in formats[object.id] %}
                                <li><a href="{% path object, name %}" tabindex="-1"
                                       class="select">{% if format.width %}{{ 'label.width'|trans({}, 'MediaAdmin') }}: {{ format.width }}{% if format.height %}x {{ 'label.height'|trans({}, 'MediaAdmin') }}: {{ format.height }}{% endif %}px{% endif %}</a>
                                </li>
                            {% endfor %}
                        {% endif %}
                    {% endif %}
                </ul>
            </div>
        </div>
        <div class="thumbnail context">
            <div class="media-element" data-toggle="context" data-target="#context-menu-{{ object.id }}">
                {% if object.width is defined and object.width %}
                    <img src="{% path object, 'admin' %}" class="img-responsive  center-block"/>
                {% else %}
                    <i class="{{ get_file_icon(object.getMetadataValue('filename')) }} fa-4x center-block"></i>
                {% endif %}
            </div>
            <div class="media-title small" data-toggle="context" data-target="#context-menu-{{ object.id }}">
                <a href="{% path object, 'reference' %}"
                   data-toggle="tooltip" data-placement="top"  class="select" title="{{ object.name }}">{{ object.name }}</a> <br/>
            </div>
        </div>
    </div>
{% endfor %}
<div class="clearfix">&nbsp;</div>
{% if datagrid.pager.haveToPaginate() %}
<div class="col-md-3 col-xs-12 text-right pull-right">
    <label class="control-label"><strong>{% transchoice datagrid.pager.nbresults with {'%count%': datagrid.pager.nbresults} from 'SonataAdminBundle' %}
                list_results_count{% endtranschoice %}</strong></label>
    {% block max_per_page %}
        <br>
        <label class="control-label"
               for="{{ admin.uniqid }}_per_page">{% trans from 'SonataAdminBundle' %}
                label_per_page{% endtrans %}</label>
        <select class="per-page small" id="{{ admin.uniqid }}_per_page"
                style="width: auto; height: auto">
            {% for per_page in admin.getperpageoptions %}
                <option {% if per_page ==datagrid.pager.maxperpage %}selected="selected"{% endif %}
                        value="{{ admin.generateUrl('init_ckeditor_browser', {'filter':datagrid.values|merge({'_per_page': per_page})}|merge(ckParameters)) }}">
                    {{ per_page }}
                </option>
            {% endfor %}
        </select>
    {% endblock %}
</div>
    <div class="pagination col-md-3 hidden-xs hidden-sm text-left">
        {{ datagrid.pager.page }} / {{ datagrid.pager.lastpage }}
    </div>
    <div class="col-xs-12 col-md-6 text-center">
        <ul class="pagination pagination-xs">

            {% if datagrid.pager.page != 1 %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters( datagrid, 1)|merge(ckParameters)) }}"
                       data-page="1" class="media-pager"
                       data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                       data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                       data-sort-order="{{ datagrid.values._sort_order }}"
                       data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_first_pager'|trans({}, 'SonataAdminBundle') }}">&laquo;</a>
                </li>
            {% endif %}

            {% if datagrid.pager.page != datagrid.pager.previouspage %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, datagrid.pager.previouspage)|merge(ckParameters)) }}"
                       data-page="{{ datagrid.pager.previouspage }}" class="media-pager"
                       data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                       data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                       data-sort-order="{{ datagrid.values._sort_order }}"
                       data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_previous_pager'|trans({}, 'SonataAdminBundle') }}">&lsaquo;</a>
                </li>
            {% endif %}

            {# Set the number of pages to display in the pager #}
            {% for page in datagrid.pager.getLinks(admin_pool.getOption('pager_links')) %}
                {% if page == datagrid.pager.page %}
                    <li class="active">
                        <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, page)|merge(ckParameters)) }}"
                           data-page="{{ page }}" class="media-pager"
                           data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                           data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                           data-sort-order="{{ datagrid.values._sort_order }}">{{ page }}</a>
                    </li>
                {% else %}
                    <li>
                        <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, page)|merge(ckParameters)) }}"
                           data-page="{{ page }}" class="media-pager"
                           data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                           data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                           data-sort-order="{{ datagrid.values._sort_order }}"
                           data-sort-by="{{ datagrid.values._sort_by.fieldName}}">{{ page }}</a>
                    </li>
                {% endif %}
            {% endfor %}

            {% if datagrid.pager.page != datagrid.pager.nextpage %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, datagrid.pager.nextpage)|merge(ckParameters)) }}"
                        ata-page="{{ datagrid.pager.nextpage }}" class="media-pager"
                        data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                        data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                        data-sort-order="{{ datagrid.values._sort_order }}"
                        data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_next_pager'|trans({}, 'SonataAdminBundle') }}">&rsaquo;</a>
                </li>
            {% endif %}

            {% if datagrid.pager.page != datagrid.pager.lastpage %}
                <li>
                    <a href="{{ admin.generateUrl('init_ckeditor_browser', admin.modelmanager.paginationparameters(  datagrid, datagrid.pager.lastpage)|merge(ckParameters)) }}"
                       data-page="{{ datagrid.pager.lastpage }}" class="media-pager"
                       data-name="{{ datagrid.values.name?datagrid.values.name.value:'' }}"
                       data-tags="{{ datagrid.values.tags?datagrid.values.tags.value:'' }}"
                       data-sort-order="{{ datagrid.values._sort_order }}"
                       data-sort-by="{{ datagrid.values._sort_by.fieldName}}"
                       title="{{ 'link_last_pager'|trans({}, 'SonataAdminBundle') }}">&raquo;</a>
                </li>
            {% endif %}

        </ul>
    </div>
{% endif %}
{% if datagrid.results|length < 1 %}
<p class="notice">
    {{ 'no_result'|trans({}, 'NetworkingInitCmsBundle') }}
</p>
{% endif %}
{'fraction_non_alphanumeric': 0.1699480937891534, 'fraction_numerical': 0.0030875246107034187, 'mean_word_length': 1.8480948133044475, 'pattern_counts': {'":': 0, '<': 183, '<?xml version=': 0, '>': 183, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6611517', 'n_tokens_mistral': 6784, 'n_tokens_neox': 6179, 'n_words': 1049}