{% if (file_item.type == 'folder') %}
    <a
        id="fs{{random()}}"
        href="{{ path('visual_m_media_manager_folder_index', { 'config' : config, 'path' : file_item.RelativePath}|merge(extra_args)) }}" 
        class="filesystem-item filesystem-folder {% if extra_args.fs_callback is not empty %}filesystem-item-small{% endif %}"
        data-filesystem-rel-path="{{ file_item.RelativePath }}"
        data-filesystem-editable="{{ file_item.Editable ? '1' : '0' }}"
        data-filesystem-deletable="{{ file_item.Deleteable ? '1' : '0' }}"
    >
        <img src="{{ asset(file_item.Icon) }}" />
        <span class="filesystem-filename">{{ file_item.Name }}</span>
    </a>
{% else %}
    <a 
        id="fs{{random()}}"
        href="{{ path('visual_m_media_manager_file_view', { 'config' : config, 'path' : file_item.RelativePath}|merge(extra_args)) }}" 
        class="filesystem-item filesystem-file {% if extra_args.fs_callback is not empty %}filesystem-item-small{% endif %}"
        data-filesystem-rel-path="{{ file_item.RelativePath }}"
        data-filesystem-editable="{{ file_item.Editable ? '1' : '0' }}"
        data-filesystem-deletable="{{ file_item.Deleteable ? '1' : '0' }}"
        {% if extra_args.fs_callback is not empty %}
            data-filesystem-webpath="{{ file_item.WebPath }}"           
        {% endif %}
    >
        <img src="{{ asset(file_item.Icon) }}" />
        <span class="filesystem-filename">{{ file_item.Name }}</span>
    </a>
{% endif %}