<commit_before>{% load i18n static fb_tags mezzanine_tags %}

{% if query.pop %}
<style>
h1 {margin:-30px 0 15px 0;}
</style>
{% endif %}

{% for file in page.object_list|dictsort:"filetype" %}
<tr class="{% cycle 'row1' 'row2' %}">

    <!-- FILESELECT FOR FILEBROWSEFIELD -->
    {% ifequal query.pop '1' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="javascript://" onclick="FileSubmit('{{ file.path }}', '{{ file.url }}', '{{ MEDIA_URL }}{% ifequal file.filetype 'Image' %}{% thumbnail file.path 60 60 %}{% else %}{{ file.path }}{% endifequal %}', '{{ file.filetype }}');" class="fb_selectlink" title="{% trans 'Select' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endifequal %}

    <!-- FILESELECT FOR RTE/TINYMCE -->
    {% if query.pop == '2' or query.pop == '5' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="javascript:FileBrowserDialogue.fileSubmit('{{ file.url|escapejs }}');" class="fb_selectlink" title="{% trans 'Select File' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endif %}

    <!-- FILESELECT FOR CKEDITOR (FORMER "FCKEDITOR") -->
    {% ifequal query.pop '3' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="#" onclick="OpenFile(ProtectPath('{{ file.url|escapejs }}'));return false;" class="fb_selectlink" title="{% trans 'Select File' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endifequal %}

    <!-- GENERIC FILESELECT: opener grabs file url from rel attribute dynamically on click -->
    {% ifequal query.pop '4' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="#" rel="{{ file.url|escape }}" class="fb_selectlink" title="{% trans 'Select File' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endifequal %}

    <!-- FILEICON -->
    <td class="fb_icon"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_type_{{ file.filetype|lower }}.gif" /></td>

    <!-- THUMBNAIL -->
    {% if results_var.images_total %}
    <td class="fb_icon">
        {% ifequal file.filetype 'Image' %}
        <a href="{{ file.url }}" target="_blank"><img src="{{ MEDIA_URL }}{% thumbnail file.path 60 60 %}" title="{% trans 'View Image' %}" /></a>
        {% endifequal %}
    </td>
    {% endif %}

    <!-- FILENAME/DIMENSIONS -->
    {% ifequal file.filetype 'Folder' %}
    <td><b><a href="{% url "fb_browse" %}{% query_string "" "q,dir,p" %}&amp;dir={{ file.path_relative_directory|urlencode }}">{{ file.filename }}</a></b></td>
    {% else %}
    <td><b><a href="{{ file.url }}" target="_blank">{{ file.filename }}</a></b></td>
    {% endifequal %}<commit_msg>MEDIA_URL -> settings_var.MEDIA_URL<commit_after>{% load i18n static fb_tags mezzanine_tags %}

{% if query.pop %}
<style>
h1 {margin:-30px 0 15px 0;}
</style>
{% endif %}

{% for file in page.object_list|dictsort:"filetype" %}
<tr class="{% cycle 'row1' 'row2' %}">

    <!-- FILESELECT FOR FILEBROWSEFIELD -->
    {% ifequal query.pop '1' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="javascript://" onclick="FileSubmit('{{ file.path }}', '{{ file.url }}', '{{ settings_var.MEDIA_URL }}{% ifequal file.filetype 'Image' %}{% thumbnail file.path 60 60 %}{% else %}{{ file.path }}{% endifequal %}', '{{ file.filetype }}');" class="fb_selectlink" title="{% trans 'Select' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endifequal %}

    <!-- FILESELECT FOR RTE/TINYMCE -->
    {% if query.pop == '2' or query.pop == '5' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="javascript:FileBrowserDialogue.fileSubmit('{{ file.url|escapejs }}');" class="fb_selectlink" title="{% trans 'Select File' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endif %}

    <!-- FILESELECT FOR CKEDITOR (FORMER "FCKEDITOR") -->
    {% ifequal query.pop '3' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="#" onclick="OpenFile(ProtectPath('{{ file.url|escapejs }}'));return false;" class="fb_selectlink" title="{% trans 'Select File' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endifequal %}

    <!-- GENERIC FILESELECT: opener grabs file url from rel attribute dynamically on click -->
    {% ifequal query.pop '4' %}
    {% if results_var.select_total %}
    <td class="fb_icon">
        {% selectable file.filetype query.type %}
        {% if selectable %}
        <a href="#" rel="{{ file.url|escape }}" class="fb_selectlink" title="{% trans 'Select File' %}"></a>
        {% else %}
        <img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_select_disabled.gif" width="23" height="17" />
        {% endif %}
    </td>
    {% endif %}
    {% endifequal %}

    <!-- FILEICON -->
    <td class="fb_icon"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_type_{{ file.filetype|lower }}.gif" /></td>

    <!-- THUMBNAIL -->
    {% if results_var.images_total %}
    <td class="fb_icon">
        {% ifequal file.filetype 'Image' %}
        <a href="{{ file.url }}" target="_blank"><img src="{{ settings_var.MEDIA_URL }}{% thumbnail file.path 60 60 %}" title="{% trans 'View Image' %}" /></a>
        {% endifequal %}
    </td>
    {% endif %}

    <!-- FILENAME/DIMENSIONS -->
    {% ifequal file.filetype 'Folder' %}
    <td><b><a href="{% url "fb_browse" %}{% query_string "" "q,dir,p" %}&amp;dir={{ file.path_relative_directory|urlencode }}">{{ file.filename }}</a></b></td>
    {% else %}
    <td><b><a href="{{ file.url }}" target="_blank">{{ file.filename }}</a></b></td>
    {% endifequal %}
{'fraction_non_alphanumeric': 0.20694905869324473, 'fraction_numerical': 0.01107419712070875, 'mean_word_length': 3.0888511601584607, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 104, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '531544', 'n_tokens_mistral': 2683, 'n_tokens_neox': 2374, 'n_words': 507}